From: Matt Ranostay <mranostay@gmail.com>
To: linux-kernel@vger.kernel.org, Kishon Vijay Abraham I <kishon@ti.com>
Cc: Matt Ranostay <matt@ranostay.consulting>,
Tony Lindgren <tony@atomide.com>
Subject: [PATCH] phy: phy-twl4030-usb: emit VBUS status events to userspace
Date: Tue, 20 Sep 2016 19:58:04 -0700 [thread overview]
Message-ID: <1474426684-15862-1-git-send-email-matt@ranostay.consulting> (raw)
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>
---
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
next reply other threads:[~2016-09-21 2:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-21 2:58 Matt Ranostay [this message]
2016-09-21 21:24 ` [PATCH] phy: phy-twl4030-usb: emit VBUS status events to userspace Tony Lindgren
2016-11-15 13:52 ` Kishon Vijay Abraham I
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1474426684-15862-1-git-send-email-matt@ranostay.consulting \
--to=mranostay@gmail.com \
--cc=kishon@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=matt@ranostay.consulting \
--cc=tony@atomide.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).