Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1544254 > unrolled thread

[PATCH 1/8] extcon: axp288: Remove dependency on non-existing platform_data

Started byHans de Goede <hdegoede@redhat.com>
First post2016-12-19 01:20 +0100
Last post2016-12-19 09:30 +0100
Articles 9 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 1/8] extcon: axp288: Remove dependency on non-existing platform_data Hans de Goede <hdegoede@redhat.com> - 2016-12-19 01:20 +0100
    [PATCH 4/8] extcon: axp288: Fix possibly reporting 2 cables in state true Hans de Goede <hdegoede@redhat.com> - 2016-12-19 01:20 +0100
      Re: [PATCH 4/8] extcon: axp288: Fix possibly reporting 2 cables in  state true Chanwoo Choi <cw00.choi@samsung.com> - 2016-12-19 07:30 +0100
    [PATCH 2/8] extcon: axp288: Remove usb_phy notification code Hans de Goede <hdegoede@redhat.com> - 2016-12-19 01:20 +0100
      Re: [PATCH 2/8] extcon: axp288: Remove usb_phy notification code Chanwoo Choi <cw00.choi@samsung.com> - 2016-12-19 08:00 +0100
    Re: [PATCH 1/8] extcon: axp288: Remove dependency on non-existing  platform_data Chanwoo Choi <cw00.choi@samsung.com> - 2016-12-19 07:20 +0100
      Re: [PATCH 1/8] extcon: axp288: Remove dependency on non-existing  platform_data Chanwoo Choi <cw00.choi@samsung.com> - 2016-12-19 08:00 +0100
        Re: [PATCH 1/8] extcon: axp288: Remove dependency on non-existing  platform_data Hans de Goede <hdegoede@redhat.com> - 2016-12-19 09:20 +0100
          Re: [PATCH 1/8] extcon: axp288: Remove dependency on non-existing  platform_data Chanwoo Choi <cw00.choi@samsung.com> - 2016-12-19 09:30 +0100

#1544254 — [PATCH 1/8] extcon: axp288: Remove dependency on non-existing platform_data

FromHans de Goede <hdegoede@redhat.com>
Date2016-12-19 01:20 +0100
Subject[PATCH 1/8] extcon: axp288: Remove dependency on non-existing platform_data
Message-ID<sPTQl-tj-5@gated-at.bofh.it>
When the extcon_axp288 driver was originally merged, it was merged with
a dependency on some other driver providing platform data for it.

However such another driver was never merged, so the extcon_axp288 as
merged upstream has never worked, its probe method simply always returns
-ENODEV.

This commit drops the dependency on the pdata always being there, instead
it treats not having pdata as the pdata having a NULL gpio_mux_control,
something which the code was already prepared to handle.

Note that the code for controlling the mux_control gpio is left in place,
as this may be necessary to allow the axp288 pmic to properly detect the
charger type (instead of assuming 500mA max charge current) on some
tablets. This will make it easier for future patches to add support for
this gpio by getting the gpio info from somewhere.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/extcon/extcon-axp288.c | 25 ++++++++++---------------
 1 file changed, 10 insertions(+), 15 deletions(-)

diff --git a/drivers/extcon/extcon-axp288.c b/drivers/extcon/extcon-axp288.c
index 42f41e8..a84fab8 100644
--- a/drivers/extcon/extcon-axp288.c
+++ b/drivers/extcon/extcon-axp288.c
@@ -112,7 +112,7 @@ struct axp288_extcon_info {
 	struct device *dev;
 	struct regmap *regmap;
 	struct regmap_irq_chip_data *regmap_irqc;
-	struct axp288_extcon_pdata *pdata;
+	struct gpio_desc *gpio_mux_cntl;
 	int irq[EXTCON_IRQ_END];
 	struct extcon_dev *edev;
 	struct notifier_block extcon_nb;
@@ -216,8 +216,8 @@ static int axp288_handle_chrg_det_event(struct axp288_extcon_info *info)
 		 * If VBUS is absent Connect D+/D- lines to PMIC for BC
 		 * detection. Else connect them to SOC for USB communication.
 		 */
-		if (info->pdata->gpio_mux_cntl)
-			gpiod_set_value(info->pdata->gpio_mux_cntl,
+		if (info->gpio_mux_cntl)
+			gpiod_set_value(info->gpio_mux_cntl,
 				vbus_attach ? EXTCON_GPIO_MUX_SEL_SOC
 						: EXTCON_GPIO_MUX_SEL_PMIC);
 
@@ -271,6 +271,7 @@ static int axp288_extcon_probe(struct platform_device *pdev)
 {
 	struct axp288_extcon_info *info;
 	struct axp20x_dev *axp20x = dev_get_drvdata(pdev->dev.parent);
+	struct axp288_extcon_pdata *pdata = pdev->dev.platform_data;
 	int ret, i, pirq, gpio;
 
 	info = devm_kzalloc(&pdev->dev, sizeof(*info), GFP_KERNEL);
@@ -280,15 +281,9 @@ static int axp288_extcon_probe(struct platform_device *pdev)
 	info->dev = &pdev->dev;
 	info->regmap = axp20x->regmap;
 	info->regmap_irqc = axp20x->regmap_irqc;
-	info->pdata = pdev->dev.platform_data;
-
-	if (!info->pdata) {
-		/* Try ACPI provided pdata via device properties */
-		if (!device_property_present(&pdev->dev,
-					"axp288_extcon_data\n"))
-			dev_err(&pdev->dev, "failed to get platform data\n");
-		return -ENODEV;
-	}
+	if (pdata)
+		info->gpio_mux_cntl = pdata->gpio_mux_cntl;
+
 	platform_set_drvdata(pdev, info);
 
 	axp288_extcon_log_rsi(info);
@@ -316,15 +311,15 @@ static int axp288_extcon_probe(struct platform_device *pdev)
 	}
 
 	/* Set up gpio control for USB Mux */
-	if (info->pdata->gpio_mux_cntl) {
-		gpio = desc_to_gpio(info->pdata->gpio_mux_cntl);
+	if (info->gpio_mux_cntl) {
+		gpio = desc_to_gpio(info->gpio_mux_cntl);
 		ret = devm_gpio_request(&pdev->dev, gpio, "USB_MUX");
 		if (ret < 0) {
 			dev_err(&pdev->dev,
 				"failed to request the gpio=%d\n", gpio);
 			return ret;
 		}
-		gpiod_direction_output(info->pdata->gpio_mux_cntl,
+		gpiod_direction_output(info->gpio_mux_cntl,
 						EXTCON_GPIO_MUX_SEL_PMIC);
 	}
 
-- 
2.9.3

[toc] | [next] | [standalone]


#1544255 — [PATCH 4/8] extcon: axp288: Fix possibly reporting 2 cables in state true

FromHans de Goede <hdegoede@redhat.com>
Date2016-12-19 01:20 +0100
Subject[PATCH 4/8] extcon: axp288: Fix possibly reporting 2 cables in state true
Message-ID<sPTQl-tj-25@gated-at.bofh.it>
In reply to#1544254
When the charger type changes from e.g. SDP to CDP, without Vbus being
seen as low in between axp288_handle_chrg_det_event would set the state
for the new cable type to true, without clearing the state of the
previous cable type to false.

This commit fixes this and also gets rid of the function local static
cable variable, properly storing all drv state in the axp288_extcon_info
struct.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/extcon/extcon-axp288.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/extcon/extcon-axp288.c b/drivers/extcon/extcon-axp288.c
index 43b3637..ded0bd9 100644
--- a/drivers/extcon/extcon-axp288.c
+++ b/drivers/extcon/extcon-axp288.c
@@ -115,6 +115,7 @@ struct axp288_extcon_info {
 	int irq[EXTCON_IRQ_END];
 	struct extcon_dev *edev;
 	struct notifier_block extcon_nb;
+	unsigned int previous_cable;
 };
 
 /* Power up/down reason string array */
@@ -154,9 +155,9 @@ static void axp288_extcon_log_rsi(struct axp288_extcon_info *info)
 
 static int axp288_handle_chrg_det_event(struct axp288_extcon_info *info)
 {
-	static unsigned int cable;
 	int ret, stat, cfg, pwr_stat;
 	u8 chrg_type;
+	unsigned int cable = info->previous_cable;
 	bool vbus_attach = false;
 
 	ret = regmap_read(info->regmap, AXP288_PS_STAT_REG, &pwr_stat);
@@ -212,7 +213,11 @@ static int axp288_handle_chrg_det_event(struct axp288_extcon_info *info)
 			vbus_attach ? EXTCON_GPIO_MUX_SEL_SOC
 					: EXTCON_GPIO_MUX_SEL_PMIC);
 
-	extcon_set_state_sync(info->edev, cable, vbus_attach);
+	extcon_set_state_sync(info->edev, info->previous_cable, false);
+	if (vbus_attach) {
+		extcon_set_state_sync(info->edev, cable, vbus_attach);
+		info->previous_cable = cable;
+	}
 
 	return 0;
 
@@ -263,6 +268,7 @@ static int axp288_extcon_probe(struct platform_device *pdev)
 	info->dev = &pdev->dev;
 	info->regmap = axp20x->regmap;
 	info->regmap_irqc = axp20x->regmap_irqc;
+	info->previous_cable = axp288_extcon_cables[0];
 	if (pdata)
 		info->gpio_mux_cntl = pdata->gpio_mux_cntl;
 
-- 
2.9.3

[toc] | [prev] | [next] | [standalone]


#1544330 — Re: [PATCH 4/8] extcon: axp288: Fix possibly reporting 2 cables in state true

FromChanwoo Choi <cw00.choi@samsung.com>
Date2016-12-19 07:30 +0100
SubjectRe: [PATCH 4/8] extcon: axp288: Fix possibly reporting 2 cables in state true
Message-ID<sPZCp-49P-7@gated-at.bofh.it>
In reply to#1544255
Hi Hans,

This patch looks good to me. But I have one comment
when setting the previous_cable in probe().

On 2016년 12월 19일 09:13, Hans de Goede wrote:
> When the charger type changes from e.g. SDP to CDP, without Vbus being
> seen as low in between axp288_handle_chrg_det_event would set the state
> for the new cable type to true, without clearing the state of the
> previous cable type to false.
> 
> This commit fixes this and also gets rid of the function local static
> cable variable, properly storing all drv state in the axp288_extcon_info
> struct.
> 
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
>  drivers/extcon/extcon-axp288.c | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/extcon/extcon-axp288.c b/drivers/extcon/extcon-axp288.c
> index 43b3637..ded0bd9 100644
> --- a/drivers/extcon/extcon-axp288.c
> +++ b/drivers/extcon/extcon-axp288.c
> @@ -115,6 +115,7 @@ struct axp288_extcon_info {
>  	int irq[EXTCON_IRQ_END];
>  	struct extcon_dev *edev;
>  	struct notifier_block extcon_nb;
> +	unsigned int previous_cable;
>  };
>  
>  /* Power up/down reason string array */
> @@ -154,9 +155,9 @@ static void axp288_extcon_log_rsi(struct axp288_extcon_info *info)
>  
>  static int axp288_handle_chrg_det_event(struct axp288_extcon_info *info)
>  {
> -	static unsigned int cable;
>  	int ret, stat, cfg, pwr_stat;
>  	u8 chrg_type;
> +	unsigned int cable = info->previous_cable;
>  	bool vbus_attach = false;
>  
>  	ret = regmap_read(info->regmap, AXP288_PS_STAT_REG, &pwr_stat);
> @@ -212,7 +213,11 @@ static int axp288_handle_chrg_det_event(struct axp288_extcon_info *info)
>  			vbus_attach ? EXTCON_GPIO_MUX_SEL_SOC
>  					: EXTCON_GPIO_MUX_SEL_PMIC);
>  
> -	extcon_set_state_sync(info->edev, cable, vbus_attach);
> +	extcon_set_state_sync(info->edev, info->previous_cable, false);
> +	if (vbus_attach) {
> +		extcon_set_state_sync(info->edev, cable, vbus_attach);
> +		info->previous_cable = cable;
> +	}
>  
>  	return 0;
>  
> @@ -263,6 +268,7 @@ static int axp288_extcon_probe(struct platform_device *pdev)
>  	info->dev = &pdev->dev;
>  	info->regmap = axp20x->regmap;
>  	info->regmap_irqc = axp20x->regmap_irqc;
> +	info->previous_cable = axp288_extcon_cables[0];

I think that you better to use "EXTCON_NONE" instead of
"axp288_extcon_cables[0]" as following:
	info->previous_cable = EXTCON_NONE;


>  	if (pdata)
>  		info->gpio_mux_cntl = pdata->gpio_mux_cntl;
>  
> 

-- 
Regards,
Chanwoo Choi

[toc] | [prev] | [next] | [standalone]


#1544257 — [PATCH 2/8] extcon: axp288: Remove usb_phy notification code

FromHans de Goede <hdegoede@redhat.com>
Date2016-12-19 01:20 +0100
Subject[PATCH 2/8] extcon: axp288: Remove usb_phy notification code
Message-ID<sPTQl-tj-29@gated-at.bofh.it>
In reply to#1544254
The usb_phy based intel-usb-phy code never got merged into the
mainline kernel, so the devm_usb_get_phy() call will always fail,
blocking the driver from loading.

Since new drivers should use the generic-phy framework, not the
old-style usb_phy stuff, keeping this around is not useful.

Therefor this patch removes the usb_phy notification bits, which together
with the patch to remove the platform_data dependency, makes this driver
actually successfully probe on systems with an axp288 pmic.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/extcon/extcon-axp288.c | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/drivers/extcon/extcon-axp288.c b/drivers/extcon/extcon-axp288.c
index a84fab8..3d5e84e 100644
--- a/drivers/extcon/extcon-axp288.c
+++ b/drivers/extcon/extcon-axp288.c
@@ -21,7 +21,6 @@
 #include <linux/interrupt.h>
 #include <linux/platform_device.h>
 #include <linux/property.h>
-#include <linux/usb/phy.h>
 #include <linux/notifier.h>
 #include <linux/extcon.h>
 #include <linux/regmap.h>
@@ -116,7 +115,6 @@ struct axp288_extcon_info {
 	int irq[EXTCON_IRQ_END];
 	struct extcon_dev *edev;
 	struct notifier_block extcon_nb;
-	struct usb_phy *otg;
 };
 
 /* Power up/down reason string array */
@@ -220,9 +218,6 @@ static int axp288_handle_chrg_det_event(struct axp288_extcon_info *info)
 			gpiod_set_value(info->gpio_mux_cntl,
 				vbus_attach ? EXTCON_GPIO_MUX_SEL_SOC
 						: EXTCON_GPIO_MUX_SEL_PMIC);
-
-		atomic_notifier_call_chain(&info->otg->notifier,
-			vbus_attach ? USB_EVENT_VBUS : USB_EVENT_NONE, NULL);
 	}
 
 	if (notify_charger)
@@ -303,13 +298,6 @@ static int axp288_extcon_probe(struct platform_device *pdev)
 		return ret;
 	}
 
-	/* Get otg transceiver phy */
-	info->otg = devm_usb_get_phy(&pdev->dev, USB_PHY_TYPE_USB2);
-	if (IS_ERR(info->otg)) {
-		dev_err(&pdev->dev, "failed to get otg transceiver\n");
-		return PTR_ERR(info->otg);
-	}
-
 	/* Set up gpio control for USB Mux */
 	if (info->gpio_mux_cntl) {
 		gpio = desc_to_gpio(info->gpio_mux_cntl);
-- 
2.9.3

[toc] | [prev] | [next] | [standalone]


#1544339 — Re: [PATCH 2/8] extcon: axp288: Remove usb_phy notification code

FromChanwoo Choi <cw00.choi@samsung.com>
Date2016-12-19 08:00 +0100
SubjectRe: [PATCH 2/8] extcon: axp288: Remove usb_phy notification code
Message-ID<sQ05s-4jb-9@gated-at.bofh.it>
In reply to#1544257
Hi Hans,

On 2016년 12월 19일 09:13, Hans de Goede wrote:
> The usb_phy based intel-usb-phy code never got merged into the
> mainline kernel, so the devm_usb_get_phy() call will always fail,
> blocking the driver from loading.
> 
> Since new drivers should use the generic-phy framework, not the
> old-style usb_phy stuff, keeping this around is not useful.
> 
> Therefor this patch removes the usb_phy notification bits, which together
> with the patch to remove the platform_data dependency, makes this driver
> actually successfully probe on systems with an axp288 pmic.
> 
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
>  drivers/extcon/extcon-axp288.c | 12 ------------
>  1 file changed, 12 deletions(-)
> 
> diff --git a/drivers/extcon/extcon-axp288.c b/drivers/extcon/extcon-axp288.c
> index a84fab8..3d5e84e 100644
> --- a/drivers/extcon/extcon-axp288.c
> +++ b/drivers/extcon/extcon-axp288.c
> @@ -21,7 +21,6 @@
>  #include <linux/interrupt.h>
>  #include <linux/platform_device.h>
>  #include <linux/property.h>
> -#include <linux/usb/phy.h>
>  #include <linux/notifier.h>
>  #include <linux/extcon.h>
>  #include <linux/regmap.h>
> @@ -116,7 +115,6 @@ struct axp288_extcon_info {
>  	int irq[EXTCON_IRQ_END];
>  	struct extcon_dev *edev;
>  	struct notifier_block extcon_nb;
> -	struct usb_phy *otg;
>  };
>  
>  /* Power up/down reason string array */
> @@ -220,9 +218,6 @@ static int axp288_handle_chrg_det_event(struct axp288_extcon_info *info)
>  			gpiod_set_value(info->gpio_mux_cntl,
>  				vbus_attach ? EXTCON_GPIO_MUX_SEL_SOC
>  						: EXTCON_GPIO_MUX_SEL_PMIC);
> -
> -		atomic_notifier_call_chain(&info->otg->notifier,
> -			vbus_attach ? USB_EVENT_VBUS : USB_EVENT_NONE, NULL);
>  	}
>  
>  	if (notify_charger)
> @@ -303,13 +298,6 @@ static int axp288_extcon_probe(struct platform_device *pdev)
>  		return ret;
>  	}
>  
> -	/* Get otg transceiver phy */
> -	info->otg = devm_usb_get_phy(&pdev->dev, USB_PHY_TYPE_USB2);
> -	if (IS_ERR(info->otg)) {
> -		dev_err(&pdev->dev, "failed to get otg transceiver\n");
> -		return PTR_ERR(info->otg);
> -	}
> -
>  	/* Set up gpio control for USB Mux */
>  	if (info->gpio_mux_cntl) {
>  		gpio = desc_to_gpio(info->gpio_mux_cntl);
> 

Looks good to me.
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>

-- 
Regards,
Chanwoo Choi

[toc] | [prev] | [next] | [standalone]


#1544327 — Re: [PATCH 1/8] extcon: axp288: Remove dependency on non-existing platform_data

FromChanwoo Choi <cw00.choi@samsung.com>
Date2016-12-19 07:20 +0100
SubjectRe: [PATCH 1/8] extcon: axp288: Remove dependency on non-existing platform_data
Message-ID<sPZsJ-46s-1@gated-at.bofh.it>
In reply to#1544254
Hi Hans,

On 2016년 12월 19일 09:13, Hans de Goede wrote:
> When the extcon_axp288 driver was originally merged, it was merged with
> a dependency on some other driver providing platform data for it.
> 
> However such another driver was never merged, so the extcon_axp288 as
> merged upstream has never worked, its probe method simply always returns
> -ENODEV.
> 
> This commit drops the dependency on the pdata always being there, instead
> it treats not having pdata as the pdata having a NULL gpio_mux_control,
> something which the code was already prepared to handle.
> 
> Note that the code for controlling the mux_control gpio is left in place,
> as this may be necessary to allow the axp288 pmic to properly detect the
> charger type (instead of assuming 500mA max charge current) on some
> tablets. This will make it easier for future patches to add support for
> this gpio by getting the gpio info from somewhere.
> 
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
>  drivers/extcon/extcon-axp288.c | 25 ++++++++++---------------
>  1 file changed, 10 insertions(+), 15 deletions(-)

Looks good to me.
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>

-- 
Regards,
Chanwoo Choi

[toc] | [prev] | [next] | [standalone]


#1544340 — Re: [PATCH 1/8] extcon: axp288: Remove dependency on non-existing platform_data

FromChanwoo Choi <cw00.choi@samsung.com>
Date2016-12-19 08:00 +0100
SubjectRe: [PATCH 1/8] extcon: axp288: Remove dependency on non-existing platform_data
Message-ID<sQ05s-4jb-21@gated-at.bofh.it>
In reply to#1544327
Hi Hans,

This series look good to me. I added the comment
for patch4/5. If you agree following two comment, I'll merge these series for 4.11.

- patch4 uses the EXTCON_NONE when setting the previous_cable in probe()
- patch5, I don't want to use the dev_info on the fly. So, I want to drop the patch5.

Regards,
Chanwoo Choi

On 2016년 12월 19일 15:10, Chanwoo Choi wrote:
> Hi Hans,
> 
> On 2016년 12월 19일 09:13, Hans de Goede wrote:
>> When the extcon_axp288 driver was originally merged, it was merged with
>> a dependency on some other driver providing platform data for it.
>>
>> However such another driver was never merged, so the extcon_axp288 as
>> merged upstream has never worked, its probe method simply always returns
>> -ENODEV.
>>
>> This commit drops the dependency on the pdata always being there, instead
>> it treats not having pdata as the pdata having a NULL gpio_mux_control,
>> something which the code was already prepared to handle.
>>
>> Note that the code for controlling the mux_control gpio is left in place,
>> as this may be necessary to allow the axp288 pmic to properly detect the
>> charger type (instead of assuming 500mA max charge current) on some
>> tablets. This will make it easier for future patches to add support for
>> this gpio by getting the gpio info from somewhere.
>>
>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>> ---
>>  drivers/extcon/extcon-axp288.c | 25 ++++++++++---------------
>>  1 file changed, 10 insertions(+), 15 deletions(-)
> 
> Looks good to me.
> Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
> 

[toc] | [prev] | [next] | [standalone]


#1544359 — Re: [PATCH 1/8] extcon: axp288: Remove dependency on non-existing platform_data

FromHans de Goede <hdegoede@redhat.com>
Date2016-12-19 09:20 +0100
SubjectRe: [PATCH 1/8] extcon: axp288: Remove dependency on non-existing platform_data
Message-ID<sQ1kS-5f4-13@gated-at.bofh.it>
In reply to#1544340
Hi,

On 19-12-16 07:58, Chanwoo Choi wrote:
> Hi Hans,
>
> This series look good to me. I added the comment
> for patch4/5. If you agree following two comment, I'll merge these series for 4.11.
>
> - patch4 uses the EXTCON_NONE when setting the previous_cable in probe()
> - patch5, I don't want to use the dev_info on the fly. So, I want to drop the patch5.

Sounds good to me, thank you for reviewing these patches so quickly.

Regards,

Hans


>
> Regards,
> Chanwoo Choi
>
> On 2016년 12월 19일 15:10, Chanwoo Choi wrote:
>> Hi Hans,
>>
>> On 2016년 12월 19일 09:13, Hans de Goede wrote:
>>> When the extcon_axp288 driver was originally merged, it was merged with
>>> a dependency on some other driver providing platform data for it.
>>>
>>> However such another driver was never merged, so the extcon_axp288 as
>>> merged upstream has never worked, its probe method simply always returns
>>> -ENODEV.
>>>
>>> This commit drops the dependency on the pdata always being there, instead
>>> it treats not having pdata as the pdata having a NULL gpio_mux_control,
>>> something which the code was already prepared to handle.
>>>
>>> Note that the code for controlling the mux_control gpio is left in place,
>>> as this may be necessary to allow the axp288 pmic to properly detect the
>>> charger type (instead of assuming 500mA max charge current) on some
>>> tablets. This will make it easier for future patches to add support for
>>> this gpio by getting the gpio info from somewhere.
>>>
>>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>>> ---
>>>  drivers/extcon/extcon-axp288.c | 25 ++++++++++---------------
>>>  1 file changed, 10 insertions(+), 15 deletions(-)
>>
>> Looks good to me.
>> Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
>>
>

[toc] | [prev] | [next] | [standalone]


#1544373 — Re: [PATCH 1/8] extcon: axp288: Remove dependency on non-existing platform_data

FromChanwoo Choi <cw00.choi@samsung.com>
Date2016-12-19 09:30 +0100
SubjectRe: [PATCH 1/8] extcon: axp288: Remove dependency on non-existing platform_data
Message-ID<sQ1ux-5il-13@gated-at.bofh.it>
In reply to#1544359
Hi Hans,

On 2016년 12월 19일 17:18, Hans de Goede wrote:
> Hi,
> 
> On 19-12-16 07:58, Chanwoo Choi wrote:
>> Hi Hans,
>>
>> This series look good to me. I added the comment
>> for patch4/5. If you agree following two comment, I'll merge these series for 4.11.
>>
>> - patch4 uses the EXTCON_NONE when setting the previous_cable in probe()
>> - patch5, I don't want to use the dev_info on the fly. So, I want to drop the patch5.
> 
> Sounds good to me, thank you for reviewing these patches so quickly.

Applied these series except for patch5 for 4.11.

Regards,
Chanwoo Choi

> 
> 
>>
>> Regards,
>> Chanwoo Choi
>>
>> On 2016년 12월 19일 15:10, Chanwoo Choi wrote:
>>> Hi Hans,
>>>
>>> On 2016년 12월 19일 09:13, Hans de Goede wrote:
>>>> When the extcon_axp288 driver was originally merged, it was merged with
>>>> a dependency on some other driver providing platform data for it.
>>>>
>>>> However such another driver was never merged, so the extcon_axp288 as
>>>> merged upstream has never worked, its probe method simply always returns
>>>> -ENODEV.
>>>>
>>>> This commit drops the dependency on the pdata always being there, instead
>>>> it treats not having pdata as the pdata having a NULL gpio_mux_control,
>>>> something which the code was already prepared to handle.
>>>>
>>>> Note that the code for controlling the mux_control gpio is left in place,
>>>> as this may be necessary to allow the axp288 pmic to properly detect the
>>>> charger type (instead of assuming 500mA max charge current) on some
>>>> tablets. This will make it easier for future patches to add support for
>>>> this gpio by getting the gpio info from somewhere.
>>>>
>>>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>>>> ---
>>>>  drivers/extcon/extcon-axp288.c | 25 ++++++++++---------------
>>>>  1 file changed, 10 insertions(+), 15 deletions(-)
>>>
>>> Looks good to me.
>>> Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
>>>
>>
> 
> 
> 

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web