summaryrefslogtreecommitdiff
path: root/drivers/phy
diff options
context:
space:
mode:
authorMatt Ranostay <mranostay@gmail.com>2016-09-20 19:58:04 -0700
committerKishon Vijay Abraham I <kishon@ti.com>2016-11-18 18:19:16 +0530
commit9d052aa01b7805e7bc4ebd9e92fb3d51808dad81 (patch)
tree6e8acf49ef2ddb087a97fabae29adfe6a37c8b30 /drivers/phy
parent5d04c883797209f566538e27441b2563afe4e9b9 (diff)
phy: phy-twl4030-usb: emit VBUS status events to userspace
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> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Diffstat (limited to 'drivers/phy')
-rw-r--r--drivers/phy/phy-twl4030-usb.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/phy/phy-twl4030-usb.c b/drivers/phy/phy-twl4030-usb.c
index 87e6334eab93..daf2aa1c5ce5 100644
--- a/drivers/phy/phy-twl4030-usb.c
+++ b/drivers/phy/phy-twl4030-usb.c
@@ -317,6 +317,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);