Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1487775 > unrolled thread
| Started by | Matt Ranostay <mranostay@gmail.com> |
|---|---|
| First post | 2016-09-21 05:00 +0200 |
| Last post | 2016-09-21 23:30 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] phy: phy-twl4030-usb: emit VBUS status events to userspace Matt Ranostay <mranostay@gmail.com> - 2016-09-21 05:00 +0200
Re: [PATCH] phy: phy-twl4030-usb: emit VBUS status events to userspace Tony Lindgren <tony@atomide.com> - 2016-09-21 23:30 +0200
| From | Matt Ranostay <mranostay@gmail.com> |
|---|---|
| Date | 2016-09-21 05:00 +0200 |
| Subject | [PATCH] phy: phy-twl4030-usb: emit VBUS status events to userspace |
| Message-ID | <sjFVn-3eu-5@gated-at.bofh.it> |
Emit KOBJ_ONLINE/KOBJ_OFFLINE action uevent on VBUS status changes. Cc: Tony Lindgren <tony@atomide.com> Signed-off-by: Matt Ranostay <matt@ranostay.consulting> --- drivers/phy/phy-twl4030-usb.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/phy/phy-twl4030-usb.c b/drivers/phy/phy-twl4030-usb.c index d9b10a39a2cf..4830392c2fe1 100644 --- a/drivers/phy/phy-twl4030-usb.c +++ b/drivers/phy/phy-twl4030-usb.c @@ -316,6 +316,9 @@ static enum musb_vbus_id_status linkstat = MUSB_VBUS_OFF; } + kobject_uevent(&twl->dev->kobj, linkstat == MUSB_VBUS_VALID + ? KOBJ_ONLINE : KOBJ_OFFLINE); + dev_dbg(twl->dev, "HW_CONDITIONS 0x%02x/%d; link %d\n", status, status, linkstat); -- 2.7.4
[toc] | [next] | [standalone]
| From | Tony Lindgren <tony@atomide.com> |
|---|---|
| Date | 2016-09-21 23:30 +0200 |
| Subject | Re: [PATCH] phy: phy-twl4030-usb: emit VBUS status events to userspace |
| Message-ID | <sjXfz-5O8-9@gated-at.bofh.it> |
| In reply to | #1487775 |
* Matt Ranostay <mranostay@gmail.com> [160920 19:58]: > Emit KOBJ_ONLINE/KOBJ_OFFLINE action uevent on VBUS status changes. Makes sense for configuring USB gadgets on demand when connected: Acked-by: Tony Lindgren <tony@atomide.com> > > Cc: Tony Lindgren <tony@atomide.com> > Signed-off-by: Matt Ranostay <matt@ranostay.consulting> > --- > drivers/phy/phy-twl4030-usb.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/phy/phy-twl4030-usb.c b/drivers/phy/phy-twl4030-usb.c > index d9b10a39a2cf..4830392c2fe1 100644 > --- a/drivers/phy/phy-twl4030-usb.c > +++ b/drivers/phy/phy-twl4030-usb.c > @@ -316,6 +316,9 @@ static enum musb_vbus_id_status > linkstat = MUSB_VBUS_OFF; > } > > + kobject_uevent(&twl->dev->kobj, linkstat == MUSB_VBUS_VALID > + ? KOBJ_ONLINE : KOBJ_OFFLINE); > + > dev_dbg(twl->dev, "HW_CONDITIONS 0x%02x/%d; link %d\n", > status, status, linkstat); > > -- > 2.7.4 >
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web