From 9d052aa01b7805e7bc4ebd9e92fb3d51808dad81 Mon Sep 17 00:00:00 2001 From: Matt Ranostay Date: Tue, 20 Sep 2016 19:58:04 -0700 Subject: phy: phy-twl4030-usb: emit VBUS status events to userspace Emit KOBJ_ONLINE/KOBJ_OFFLINE action uevent on VBUS status changes. Cc: Tony Lindgren Signed-off-by: Matt Ranostay Acked-by: Tony Lindgren Signed-off-by: Kishon Vijay Abraham I --- drivers/phy/phy-twl4030-usb.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/phy/phy-twl4030-usb.c') 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); -- cgit v1.2.3