linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] phy: phy-twl4030-usb: emit VBUS status events to userspace
@ 2016-09-21  2:58 Matt Ranostay
  2016-09-21 21:24 ` Tony Lindgren
  0 siblings, 1 reply; 3+ messages in thread
From: Matt Ranostay @ 2016-09-21  2:58 UTC (permalink / raw)
  To: linux-kernel, Kishon Vijay Abraham I; +Cc: Matt Ranostay, Tony Lindgren

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

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

end of thread, other threads:[~2016-11-15 13:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-21  2:58 [PATCH] phy: phy-twl4030-usb: emit VBUS status events to userspace Matt Ranostay
2016-09-21 21:24 ` Tony Lindgren
2016-11-15 13:52   ` Kishon Vijay Abraham I

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).