Re: [PATCH v1] usb: typec: add missing uevent when partner support PD

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx

What commit does this fix?

> Signed-off-by: Linyu Yuan <quic_linyyuan@xxxxxxxxxxx>
> ---
>  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



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux