[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VdaDP8GZGz5ZkKpSDdszjRzA+Miw=K7d_g3aeKTN4Ce=A@mail.gmail.com>
Date: Thu, 20 Apr 2017 10:29:36 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Sven Van Asbroeck <thesven73@...il.com>
Cc: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Thierry Reding <thierry.reding@...il.com>,
"Rafael J. Wysocki" <rjw@...ysocki.net>, linux-pwm@...r.kernel.org,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Clemens Gruber <clemens.gruber@...ruber.com>,
Mika Westerberg <mika.westerberg@...ux.intel.com>,
Sven Van Asbroeck <TheSven73@...glemail.com>
Subject: Re: [PATCH v4 1/1] pwm: pca9685: fix gpio-only operation.
On Tue, Apr 18, 2017 at 6:52 PM, Sven Van Asbroeck <thesven73@...il.com> wrote:
> Thanks for the feedback Andy !!
You're welcome.
>
>> I would go with
>>
>> /* Wait for @sleep microseconds for the oscillator to be back up */
>> if (sleep)
>> udelay(sleep);
>>
>> Otherwise int sleep is oddly here.
>>
>> Or
>>
>> bool sleep
>>
>> /* Wait 500us ... */
>> if (sleep)
>> udelay(500);
>>
>>> +}
>
> I think you may be getting confused between:
> - the chip's SLEEP bit (int sleep)
> - the amount of time to delay after chip comes _out of_ sleep.
> (always 500 us)
>
> If it's confusing for you, it might be confusing for others?
> Perhaps change the parameter to 'bool sleep_bit' or 'bool do_sleep'
> to make the distinction clearer?
Taking above into consideration perhaps sleep is not quite good word
at all. By functional description it sounds like latency tolerance to
me.
>> __maybe_unused and remove ugly #ifdef:ery.
>
> If this works on non- CONFIG_PM systems, I'm all for it !
> Grepping the drivers/ directory, I see that some drivers use
> #ifdef CONFIG_PM, some use __maybe_unused for runtime_pm.
This approach kinda new that's why you see variety of approaches.
> Mika and Thierry, thoughts ?
At the end it's Thierry's call, so, I'm not insisting.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists