[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1479475723-4857-19-git-send-email-kishon@ti.com>
Date: Fri, 18 Nov 2016 18:58:41 +0530
From: Kishon Vijay Abraham I <kishon@...com>
To: <gregkh@...uxfoundation.org>
CC: <kishon@...com>, <linux-kernel@...r.kernel.org>
Subject: [PATCH 18/20] phy: phy-twl4030-usb: emit VBUS status events to userspace
From: Matt Ranostay <mranostay@...il.com>
Emit KOBJ_ONLINE/KOBJ_OFFLINE action uevent on VBUS status changes.
Cc: Tony Lindgren <tony@...mide.com>
Signed-off-by: Matt Ranostay <matt@...ostay.consulting>
Acked-by: Tony Lindgren <tony@...mide.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@...com>
---
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 87e6334..daf2aa1 100644
--- a/drivers/phy/phy-twl4030-usb.c
+++ b/drivers/phy/phy-twl4030-usb.c
@@ -317,6 +317,9 @@ static bool twl4030_is_driving_vbus(struct twl4030_usb *twl)
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);
--
1.7.9.5
Powered by blists - more mailing lists