Re: [PATCH] usb: typec: disable pm for typec class devices

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

 



On Tue, Feb 07, 2023 at 04:07:17PM +0800, Linyu Yuan wrote:
> > Note that for alt modes you can't do this. They can be bind to
> > drivers - there is a bus for them.
> 
> but even in the bus, there is power management,
> 
> struct bus_type typec_bus = {
>     .name = "typec",
>     .dev_groups = typec_groups,
>     .match = typec_match,
>     .uevent = typec_uevent,
>     .probe = typec_probe,
>     .remove = typec_remove,
> };
> 
> we can disable it, right ?

No. It does not matter if the bus does not have the PM ops, a driver
can still supply the PM ops for the device.

Check how it's handled in drivers/base/power/main.c. Basically, if the
bus, pm domain, device type, or the class don't supply the PM ops,
the drivers own PM ops are then just used directly.

thanks,

-- 
heikki



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

  Powered by Linux