lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1474426684-15862-1-git-send-email-matt@ranostay.consulting>
Date:   Tue, 20 Sep 2016 19:58:04 -0700
From:   Matt Ranostay <mranostay@...il.com>
To:     linux-kernel@...r.kernel.org,
        Kishon Vijay Abraham I <kishon@...com>
Cc:     Matt Ranostay <matt@...ostay.consulting>,
        Tony Lindgren <tony@...mide.com>
Subject: [PATCH] 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@...mide.com>
Signed-off-by: Matt Ranostay <matt@...ostay.consulting>
---
 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 d9b10a39a2cf..4830392c2fe1 100644
--- a/drivers/phy/phy-twl4030-usb.c
+++ b/drivers/phy/phy-twl4030-usb.c
@@ -316,6 +316,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);
 
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ