Re: [PATCH 2/2] mmc: sdhci-pci: add runtime pm support

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

 




It has been discussed on the list before that the host controller driver should be solely responsible for host controller power.

OK I see, sorry that I missed that discussion earlier!

Anyway this should be feasible as well even it might mean duplicated code in each host driver. A positive side is that it gets more flexible for each host driver.



Moreover 1:
I have noticed the pm_runtime support is implemented for sdio and when having
MMC_CAP_POWER_OFF_CARD. This needs to be "cleaned up" after such a change. It
might also conflict with your patch considering "moreover 2" below.

No. The card and the host controller are separate devices. The card can be powered up when the host controller is off and vice versa. They are not inter-dependent in that regard.

I see your point, but it is somewhere here it is getting a bit "messy". :-)

If I understand correct, you mean that the mmc/sd/sdio framework shall
be responsible of handling power management of the bus/card devices. In
other words the framework shall itself decide when it is feasible of
doing mmc_power_restore_host, mmc_power_save_host, mmc_suspend_host,
mmc_resume_host.

This is not the case right now, since most host drivers are normally in
control of calling these functions themselves. Should this be moved to the framework then?


Moreover 2:
dev_pm_ops with runtime functions, are implemented for the mmc bus (core/bus.c).
Maybe this should be moved from the responsibility of the bus into the mmc host
drivers instead!? I think it makes more sense to leave such decisions as doing
"mmc_power_save_host/mmc_power_restore_host" to each mmc host driver. Just
because we get runtime suspended that does not have to mean we wnat to do
mmc_power_save_host... What do you think?

Again, this has been discussed before on the list, that the power management of the card is something that only upper layers control e.g. sdio function driver


I got it, thanks a lot for your answers and feedback!


--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



BR
Ulf Hansson
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux