Re: [PATCH v2] usb: roles: disable pm for role switch device

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

 




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@xxxxxxxxxxx>
Reviewed-by: Heikki Krogerus <heikki.krogerus@xxxxxxxxxxxxxxx>


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@xxxxxxxxxxxxxxxxx/> ,


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



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux