summaryrefslogtreecommitdiffstats
path: root/drivers/phy
diff options
context:
space:
mode:
authorMatt Ranostay <mranostay@gmail.com>2016-09-21 04:58:04 +0200
committerKishon Vijay Abraham I <kishon@ti.com>2016-11-18 13:49:16 +0100
commit9d052aa01b7805e7bc4ebd9e92fb3d51808dad81 (patch)
tree6e8acf49ef2ddb087a97fabae29adfe6a37c8b30 /drivers/phy
parentphy_sun4i_usb: set_mode: Allow using set_mode to force end the current session (diff)
downloadlinux-9d052aa01b7805e7bc4ebd9e92fb3d51808dad81.tar.xz
linux-9d052aa01b7805e7bc4ebd9e92fb3d51808dad81.zip
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);