From: Matt Ranostay Date: Wed, 21 Sep 2016 02:58:04 +0000 (-0700) Subject: phy: phy-twl4030-usb: emit VBUS status events to userspace X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9d052aa01b7805e7bc4ebd9e92fb3d51808dad81;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 --- 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);