Re: [RESEND PATCH v4 3/3] mmc: sdhci-of-arasan: add runtime pm support
From: Ulf Hansson
Date: Tue Dec 15 2015 - 11:16:10 EST
Hi Shawn,
Sorry for the delay.
[...]
>>
>> I think your are in right track, but unfortunate you still have some
>> work to do. :-)
>>
>> You can't call sdhci_suspend_host() with a runtime suspended host. You
>> will for example access sdhci internal registers, even-though the
>> clock to the SDHCI controller is gated, which is not a good idea.
>>
>> Now, this leads me to the following questions/ideas, which I am really
>> glad we can bring up within this context.
>>
>> So, sdhci_suspend_host() and sdhci_runtime_suspend_host() performs
>> very similar actions, but not completely the same.
>>
>> I have a feeling that we might be able to merge the above functions
>> into one function. The only thing that may differ between system PM
>> and runtime PM, is probably the wakeup settings and since that is
>> possible to control before the sdhci variant host driver decide to
>> call these functions, merging them might work.
>>
>>> From a wakeup point of view, does your case have different settings
>>
>> between system PM and runtime PM?
>>
>> What do you think?
>
>
> My case doesn't have diff settings between system PM and runtime PM.
Okay!
> If my understanding is proper, I guess you want to remove
> sdhci_suspend|resume_host and assign pm_runtime_force_suspend|resume to
> SET_SYSTEM_SLEEP_PM_OPS directly by sdhci variant HCs?
>
Yes.
You may have a look at the following commit from Ludovic, which is
queued for 4.5 on my next branch. That should give you an idea.
"mmc: sdhci-of-at91: add PM support"
> If that is the case, I guess we should look more precisely into other
> sdhci variant HCs to check whether they need to do diff things for system PM
> and RPM or not.
Yes, please! It would be nice to get that code to actually work.
Currently it's mostly broken when runtime PM is enabled.
Kind regards
Uffe
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/