Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1212371 > unrolled thread
| Started by | Tim Bird <tim.bird@sonymobile.com> |
|---|---|
| First post | 2015-08-24 19:20 +0200 |
| Last post | 2015-09-07 10:00 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH] usb: phy: msm: Unregister driver interest for VBUS and ID events Tim Bird <tim.bird@sonymobile.com> - 2015-08-24 19:20 +0200
Re: [PATCH] usb: phy: msm: Unregister driver interest for VBUS and ID events "Ivan T. Ivanov" <ivan.ivanov@linaro.org> - 2015-09-07 10:00 +0200
| From | Tim Bird <tim.bird@sonymobile.com> |
|---|---|
| Date | 2015-08-24 19:20 +0200 |
| Subject | Re: [PATCH] usb: phy: msm: Unregister driver interest for VBUS and ID events |
| Message-ID | <q13zA-5J3-13@gated-at.bofh.it> |
On 08/18/2015 12:56 AM, Ivan T. Ivanov wrote:
> Right now even if driver failed to probe extcon framework will
> still deliver its VBUS and ID events, which will lead to random
> exception codes.
>
> Fix this by removing driver interest for VBUS and ID events when
> probe fail.
>
> Fixes: 591fc116f330 ("usb: phy: msm: Use extcon framework for VBUS and ID detection")
>
> Reported-by: Tim Bird <tim.bird@sonymobile.com>
> Signed-off-by: Ivan T. Ivanov <ivan.ivanov@linaro.org>
> ---
> drivers/usb/phy/phy-msm-usb.c | 26 +++++++++++++++++---------
> 1 file changed, 17 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/usb/phy/phy-msm-usb.c
> index 00c49bb1bd29..a9082567f114 100644
> --- a/drivers/usb/phy/phy-msm-usb.c
> +++ b/drivers/usb/phy/phy-msm-usb.c
> @@ -1581,6 +1581,8 @@ static int msm_otg_read_dt(struct platform_device *pdev, struct msm_otg *motg)
> ret = extcon_register_interest(&motg->id.conn, ext_id->name,
> "USB-HOST", &motg->id.nb);
> if (ret < 0) {
> + if (!IS_ERR(ext_vbus))
> + extcon_unregister_interest(&motg->vbus.conn);
> dev_err(&pdev->dev, "register ID notifier failed\n");
> return ret;
> }
...
This patch is obsoleted by commit 83b7b67c7, which changes the extcon API
a bit (from register_interest to register_notifier, among other things).
But, in general, I would expect this approach to work.
Do you want me to re-spin this with the new API?
-- Tim
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | "Ivan T. Ivanov" <ivan.ivanov@linaro.org> |
|---|---|
| Date | 2015-09-07 10:00 +0200 |
| Message-ID | <q5Zvk-7Lo-11@gated-at.bofh.it> |
| In reply to | #1212371 |
On Mon, 2015-08-24 at 10:11 -0700, Tim Bird wrote:
> On 08/18/2015 12:56 AM, Ivan T. Ivanov wrote:
> > Right now even if driver failed to probe extcon framework will
> > still deliver its VBUS and ID events, which will lead to random
> > exception codes.
> >
> > Fix this by removing driver interest for VBUS and ID events when
> > probe fail.
> >
> > Fixes: 591fc116f330 ("usb: phy: msm: Use extcon framework for VBUS and ID detection")
> >
> > Reported-by: Tim Bird bird@sonymobile.com>
> > Signed-off-by: Ivan T. Ivanov ivanov@linaro.org>
> > ---
> > drivers/usb/phy/phy-msm-usb.c | 26 +++++++++++++++++---------
> > 1 file changed, 17 insertions(+), 9 deletions(-)
> >
> > diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/usb/phy/phy-msm-usb.c
> > index 00c49bb1bd29..a9082567f114 100644
> > --- a/drivers/usb/phy/phy-msm-usb.c
> > +++ b/drivers/usb/phy/phy-msm-usb.c
> > @@ -1581,6 +1581,8 @@ static int msm_otg_read_dt(struct platform_device *pdev, struct msm_otg *motg)
> > ret = extcon_register_interest(&motg->id.conn, ext_id->name,
> > "USB-HOST", &motg->id.nb);
> > if (ret < 0) {
> > + if (!IS_ERR(ext_vbus))
> > + extcon_unregister_interest(&motg->vbus.conn);
> > dev_err(&pdev->dev, "register ID notifier failed\n");
> > return ret;
> > }
> ...
>
> This patch is obsoleted by commit 83b7b67c7, which changes the extcon API
> a bit (from register_interest to register_notifier, among other things).
Ah, sorry, missed this. New version is coming.
Regards,
Ivan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web