* [PATCH v1] usb: typec: add missing uevent when partner support PD
@ 2022-07-01 1:01 Linyu Yuan
2022-07-01 6:08 ` Greg Kroah-Hartman
0 siblings, 1 reply; 2+ messages in thread
From: Linyu Yuan @ 2022-07-01 1:01 UTC (permalink / raw)
To: Heikki Krogerus, Greg Kroah-Hartman
Cc: linux-usb, stable, Jack Pham, Linyu Yuan
In typec_set_pwr_opmode(), if partner support PD, it need to send uevent.
Cc: stable@vger.kernel.org
Signed-off-by: Linyu Yuan <quic_linyyuan@quicinc.com>
---
drivers/usb/typec/class.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/typec/class.c b/drivers/usb/typec/class.c
index bbc46b1..3da94f712 100644
--- a/drivers/usb/typec/class.c
+++ b/drivers/usb/typec/class.c
@@ -1851,6 +1851,7 @@ void typec_set_pwr_opmode(struct typec_port *port,
partner->usb_pd = 1;
sysfs_notify(&partner_dev->kobj, NULL,
"supports_usb_power_delivery");
+ kobject_uevent(&partner_dev->kobj, KOBJ_CHANGE);
}
put_device(partner_dev);
}
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v1] usb: typec: add missing uevent when partner support PD
2022-07-01 1:01 [PATCH v1] usb: typec: add missing uevent when partner support PD Linyu Yuan
@ 2022-07-01 6:08 ` Greg Kroah-Hartman
0 siblings, 0 replies; 2+ messages in thread
From: Greg Kroah-Hartman @ 2022-07-01 6:08 UTC (permalink / raw)
To: Linyu Yuan; +Cc: Heikki Krogerus, linux-usb, stable, Jack Pham
On Fri, Jul 01, 2022 at 09:01:55AM +0800, Linyu Yuan wrote:
> In typec_set_pwr_opmode(), if partner support PD, it need to send uevent.
I do not understand, you need to explain this better.
> Cc: stable@vger.kernel.org
What commit does this fix?
> Signed-off-by: Linyu Yuan <quic_linyyuan@quicinc.com>
> ---
> drivers/usb/typec/class.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/usb/typec/class.c b/drivers/usb/typec/class.c
> index bbc46b1..3da94f712 100644
> --- a/drivers/usb/typec/class.c
> +++ b/drivers/usb/typec/class.c
> @@ -1851,6 +1851,7 @@ void typec_set_pwr_opmode(struct typec_port *port,
> partner->usb_pd = 1;
> sysfs_notify(&partner_dev->kobj, NULL,
> "supports_usb_power_delivery");
> + kobject_uevent(&partner_dev->kobj, KOBJ_CHANGE);
Why is this needed? Who will recieve this uevent? What will happen
when the uevent is sent? What userspace code requires this?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-07-01 6:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-01 1:01 [PATCH v1] usb: typec: add missing uevent when partner support PD Linyu Yuan
2022-07-01 6:08 ` Greg Kroah-Hartman
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.