Re: [PATCH 00/10] PM / Domain: renesas: Fix active wakeup behavior

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

 



Hi Ulf,

On Wed, Oct 25, 2017 at 10:49 PM, Ulf Hansson <ulf.hansson@xxxxxxxxxx> wrote:
> On 16 October 2017 at 15:55, Geert Uytterhoeven <geert+renesas@xxxxxxxxx> wrote:
>> If a device in a Renesas ARM SoC is part of a Clock Domain, and it is
>> used as a wakeup source, it must be kept active during system suspend.
>>
>> Currently this is handled in device-specific drivers by explicitly
>> increasing the use count of the module clock when the device is
>> configured as a wakeup source.  However, the proper way to prevent the
>> device from being stopped is to inform this requirement to the genpd
>> core.  Hence this series does that, so the workarounds can be removed.
>>
>> This patch series consist of 4 parts:
>>   1. Patches 1-3 fix the clk-renesas-mstp, clk-renesas-cpg-mssr, and
>>      rcar-sysc Clock and/or PM Domain drivers by providing
>>      gpd_dev_ops.active_wakeup() callbacks,
>
> As we spoked about at ELC yesterday, I think the genpd specific
> callback for dealing with this is not really the proper solution.
>
> Instead I think this should be treated as a generic problem. In
> principle I think we need a way for drivers to inform the
> middle-layer/genpd about wakeup requirements during system-wide PM.

Note that the platform (through genpd?) also matters.
The same device may need to be kept enabled on one platform to generate
wakeup events, and may generate such events while disabled on another
platform.

> Allow me to post a patch showing what I had in mind, then we can see
> what you think about it.

OK. Looking forward to it...

>>   2. Patch 4 adds a new GENPD_FLAG_ACTIVE_WAKEUP flag, to avoid various
>>      PM Domain drivers that need similar behavior having to provide
>>      their own identical .active_wakeup() callbacks,
>
> This makes sense, however I think it's sufficient to make genpd check
> the flag, rather than assigning and using the ->active_wakeup()
> callback.

OK. That can definitely be done.

> That would then make it possible to remove the callback altogether.
> Can you do that instead?

drivers/soc/mediatek/mtk-scpsys.c and drivers/soc/rockchip/pm_domains.c
seem to use a more complex callback, but it looks like it can be simplified to
a boolean flag, too.

Thanks!

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds



[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux