linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] extcon: qcom-spmi-misc: Sync the extcon state on interrupt
@ 2016-10-18  0:16 ` Stephen Boyd
  2016-10-19 10:11   ` Chanwoo Choi
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen Boyd @ 2016-10-18  0:16 UTC (permalink / raw)
  To: linux-arm-kernel

The driver was changed after submission to use the new style APIs
like extcon_set_state(). Unfortunately, that only sets the state,
and doesn't notify any consumers that the cable state has
changed. Use extcon_set_state_sync() here instead so that we
notify cable consumers of the state change. This fixes USB
host-device role switching on the db8074 platform.

Fixes: 38085c987f52 ("extcon: Add support for qcom SPMI PMIC USB id detection hardware")
Signed-off-by: Stephen Boyd <stephen.boyd@linaro.org>
---
 drivers/extcon/extcon-qcom-spmi-misc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/extcon/extcon-qcom-spmi-misc.c b/drivers/extcon/extcon-qcom-spmi-misc.c
index ca957a5f4291..b8cde096a808 100644
--- a/drivers/extcon/extcon-qcom-spmi-misc.c
+++ b/drivers/extcon/extcon-qcom-spmi-misc.c
@@ -51,7 +51,7 @@ static void qcom_usb_extcon_detect_cable(struct work_struct *work)
 	if (ret)
 		return;
 
-	extcon_set_state(info->edev, EXTCON_USB_HOST, !id);
+	extcon_set_state_sync(info->edev, EXTCON_USB_HOST, !id);
 }
 
 static irqreturn_t qcom_usb_irq_handler(int irq, void *dev_id)
-- 
2.10.0.297.gf6727b0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH] extcon: qcom-spmi-misc: Sync the extcon state on interrupt
  2016-10-18  0:16 ` [PATCH] extcon: qcom-spmi-misc: Sync the extcon state on interrupt Stephen Boyd
@ 2016-10-19 10:11   ` Chanwoo Choi
  0 siblings, 0 replies; 2+ messages in thread
From: Chanwoo Choi @ 2016-10-19 10:11 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Stephen,

On 2016? 10? 18? 09:16, Stephen Boyd wrote:
> The driver was changed after submission to use the new style APIs
> like extcon_set_state(). Unfortunately, that only sets the state,
> and doesn't notify any consumers that the cable state has
> changed. Use extcon_set_state_sync() here instead so that we
> notify cable consumers of the state change. This fixes USB
> host-device role switching on the db8074 platform.
> 
> Fixes: 38085c987f52 ("extcon: Add support for qcom SPMI PMIC USB id detection hardware")
> Signed-off-by: Stephen Boyd <stephen.boyd@linaro.org>
> ---
>  drivers/extcon/extcon-qcom-spmi-misc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/extcon/extcon-qcom-spmi-misc.c b/drivers/extcon/extcon-qcom-spmi-misc.c
> index ca957a5f4291..b8cde096a808 100644
> --- a/drivers/extcon/extcon-qcom-spmi-misc.c
> +++ b/drivers/extcon/extcon-qcom-spmi-misc.c
> @@ -51,7 +51,7 @@ static void qcom_usb_extcon_detect_cable(struct work_struct *work)
>  	if (ret)
>  		return;
>  
> -	extcon_set_state(info->edev, EXTCON_USB_HOST, !id);
> +	extcon_set_state_sync(info->edev, EXTCON_USB_HOST, !id);
>  }
>  
>  static irqreturn_t qcom_usb_irq_handler(int irq, void *dev_id)
> 

Applied it.

Best Regards,
Chanwoo Choi

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-10-19 10:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CGME20161018001726epcas1p338c9fc5887017571f8a3fd954e0ae216@epcas1p3.samsung.com>
2016-10-18  0:16 ` [PATCH] extcon: qcom-spmi-misc: Sync the extcon state on interrupt Stephen Boyd
2016-10-19 10:11   ` Chanwoo Choi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).