* [PATCH v2] usb: roles: disable pm for role switch device
@ 2023-02-03 11:55 Linyu Yuan
2023-02-06 11:31 ` Heikki Krogerus
0 siblings, 1 reply; 4+ messages in thread
From: Linyu Yuan @ 2023-02-03 11:55 UTC (permalink / raw)
To: Heikki Krogerus, Greg Kroah-Hartman
Cc: linux-usb, Jack Pham, Wesley Cheng, Pratham Pratap, Linyu Yuan
there is no PM operation for a role switch device,
call device_set_pm_not_required() in usb_role_switch_register() to disable.
Signed-off-by: Linyu Yuan <quic_linyyuan@quicinc.com>
---
v2: remove cc stable
drivers/usb/roles/class.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/roles/class.c b/drivers/usb/roles/class.c
index eacb46e..b303c64 100644
--- a/drivers/usb/roles/class.c
+++ b/drivers/usb/roles/class.c
@@ -344,6 +344,7 @@ usb_role_switch_register(struct device *parent,
dev_set_drvdata(&sw->dev, desc->driver_data);
dev_set_name(&sw->dev, "%s-role-switch",
desc->name ? desc->name : dev_name(parent));
+ device_set_pm_not_required(&sw->dev);
ret = device_register(&sw->dev);
if (ret) {
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] usb: roles: disable pm for role switch device
2023-02-03 11:55 [PATCH v2] usb: roles: disable pm for role switch device Linyu Yuan
@ 2023-02-06 11:31 ` Heikki Krogerus
2023-02-07 7:41 ` Linyu Yuan
0 siblings, 1 reply; 4+ messages in thread
From: Heikki Krogerus @ 2023-02-06 11:31 UTC (permalink / raw)
To: Linyu Yuan
Cc: Greg Kroah-Hartman, linux-usb, Jack Pham, Wesley Cheng, Pratham Pratap
On Fri, Feb 03, 2023 at 07:55:14PM +0800, Linyu Yuan wrote:
> there is no PM operation for a role switch device,
> call device_set_pm_not_required() in usb_role_switch_register() to disable.
>
> Signed-off-by: Linyu Yuan <quic_linyyuan@quicinc.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> ---
> v2: remove cc stable
>
> drivers/usb/roles/class.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/usb/roles/class.c b/drivers/usb/roles/class.c
> index eacb46e..b303c64 100644
> --- a/drivers/usb/roles/class.c
> +++ b/drivers/usb/roles/class.c
> @@ -344,6 +344,7 @@ usb_role_switch_register(struct device *parent,
> dev_set_drvdata(&sw->dev, desc->driver_data);
> dev_set_name(&sw->dev, "%s-role-switch",
> desc->name ? desc->name : dev_name(parent));
> + device_set_pm_not_required(&sw->dev);
>
> ret = device_register(&sw->dev);
> if (ret) {
> --
> 2.7.4
--
heikki
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] usb: roles: disable pm for role switch device
2023-02-06 11:31 ` Heikki Krogerus
@ 2023-02-07 7:41 ` Linyu Yuan
2023-02-07 7:48 ` Greg Kroah-Hartman
0 siblings, 1 reply; 4+ messages in thread
From: Linyu Yuan @ 2023-02-07 7:41 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Heikki Krogerus, linux-usb, Jack Pham, Wesley Cheng, Pratham Pratap
On 2/6/2023 7:31 PM, Heikki Krogerus wrote:
> On Fri, Feb 03, 2023 at 07:55:14PM +0800, Linyu Yuan wrote:
>> there is no PM operation for a role switch device,
>> call device_set_pm_not_required() in usb_role_switch_register() to disable.
>>
>> Signed-off-by: Linyu Yuan <quic_linyyuan@quicinc.com>
> Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
as discussion in Re: [PATCH] usb: typec: disable pm for typec class
devices - Heikki Krogerus (kernel.org)
<https://lore.kernel.org/linux-usb/Y+H+8Nt%2F5bgTBv4Y@kuha.fi.intel.com/> ,
please don't merge this change after we have final solution with Heikki.
>> ---
>> v2: remove cc stable
>>
>> drivers/usb/roles/class.c | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/usb/roles/class.c b/drivers/usb/roles/class.c
>> index eacb46e..b303c64 100644
>> --- a/drivers/usb/roles/class.c
>> +++ b/drivers/usb/roles/class.c
>> @@ -344,6 +344,7 @@ usb_role_switch_register(struct device *parent,
>> dev_set_drvdata(&sw->dev, desc->driver_data);
>> dev_set_name(&sw->dev, "%s-role-switch",
>> desc->name ? desc->name : dev_name(parent));
>> + device_set_pm_not_required(&sw->dev);
>>
>> ret = device_register(&sw->dev);
>> if (ret) {
>> --
>> 2.7.4
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] usb: roles: disable pm for role switch device
2023-02-07 7:41 ` Linyu Yuan
@ 2023-02-07 7:48 ` Greg Kroah-Hartman
0 siblings, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2023-02-07 7:48 UTC (permalink / raw)
To: Linyu Yuan
Cc: Heikki Krogerus, linux-usb, Jack Pham, Wesley Cheng, Pratham Pratap
On Tue, Feb 07, 2023 at 03:41:17PM +0800, Linyu Yuan wrote:
>
> On 2/6/2023 7:31 PM, Heikki Krogerus wrote:
> > On Fri, Feb 03, 2023 at 07:55:14PM +0800, Linyu Yuan wrote:
> > > there is no PM operation for a role switch device,
> > > call device_set_pm_not_required() in usb_role_switch_register() to disable.
> > >
> > > Signed-off-by: Linyu Yuan <quic_linyyuan@quicinc.com>
> > Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
>
>
> as discussion in Re: [PATCH] usb: typec: disable pm for typec class devices
> - Heikki Krogerus (kernel.org)
> <https://lore.kernel.org/linux-usb/Y+H+8Nt%2F5bgTBv4Y@kuha.fi.intel.com/> ,
>
>
> please don't merge this change after we have final solution with Heikki.
I will just drop this from my review queue. Please feel free to resend
it when you all have it worked out.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-02-07 7:48 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-03 11:55 [PATCH v2] usb: roles: disable pm for role switch device Linyu Yuan
2023-02-06 11:31 ` Heikki Krogerus
2023-02-07 7:41 ` Linyu Yuan
2023-02-07 7:48 ` 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.