[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPDyKFrFe_V0SVH_yCzfLAJ2mObvGGPELFUb8WOAFKGjqohN5w@mail.gmail.com>
Date: Tue, 2 Jan 2018 16:41:30 +0100
From: Ulf Hansson <ulf.hansson@...aro.org>
To: Geert Uytterhoeven <geert@...ux-m68k.org>
Cc: "Rafael J. Wysocki" <rafael@...nel.org>,
Geert Uytterhoeven <geert+renesas@...der.be>,
Linux PM <linux-pm@...r.kernel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Jason Cooper <jason@...edaemon.net>,
Marc Zyngier <marc.zyngier@....com>,
Linus Walleij <linus.walleij@...aro.org>,
Simon Horman <horms@...ge.net.au>,
Niklas Soderlund <niklas.soderlund+renesas@...natech.se>,
Linux-Renesas <linux-renesas-soc@...r.kernel.org>,
linux-gpio@...r.kernel.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 3/3] gpio: rcar: Use WAKEUP_PATH driver PM flag
On 2 January 2018 at 14:53, Geert Uytterhoeven <geert@...ux-m68k.org> wrote:
> On Tue, Jan 2, 2018 at 1:53 PM, Ulf Hansson <ulf.hansson@...aro.org> wrote:
>> On 2 January 2018 at 11:48, Rafael J. Wysocki <rafael@...nel.org> wrote:
>>> On Tue, Jan 2, 2018 at 11:44 AM, Geert Uytterhoeven
>>> <geert@...ux-m68k.org> wrote:
>>>> On Tue, Jan 2, 2018 at 11:32 AM, Rafael J. Wysocki <rafael@...nel.org> wrote:
>>>>> On Fri, Dec 29, 2017 at 2:31 PM, Ulf Hansson <ulf.hansson@...aro.org> wrote:
>>>>>> --- a/drivers/gpio/gpio-rcar.c
>>>>>> +++ b/drivers/gpio/gpio-rcar.c
>>>>
>>>>>> @@ -415,6 +402,18 @@ static int gpio_rcar_parse_dt(struct gpio_rcar_priv *p, unsigned int *npins)
>>>>>> return 0;
>>>>>> }
>>>>>>
>>>>>> +#ifdef CONFIG_PM_SLEEP
>>>>>> +static int gpio_rcar_suspend(struct device *dev)
>>>>>> +{
>>>>>> + struct gpio_rcar_priv *p = dev_get_drvdata(dev);
>>>>>> +
>>>>>> + dev_pm_set_driver_flags(dev, p->wakeup_path ? DPM_FLAG_WAKEUP_PATH : 0);
>>>>>
>>>>> Why don't you simply set dev->power.wakeup_path here?
>>>>
>>>> That's what my v1 did (https://patchwork.kernel.org/patch/10050995/).
>>>
>>> I very much prefer this one. :-)
>>
>> Okay!
>
>>> What's wrong with it?
>>
>> It works, although I would rather change the assignment of the flag to
>> respect if the current value is true, something like this:
>>
>> dev->power.wakeup_path = dev->power.wakeup_path || p->wakeup_path;
>
> dev->power.wakeup_path |= p->wakeup_path?
Yeah, correct.
Br
Uffe
Powered by blists - more mailing lists