linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Sven Van Asbroeck <thesven73@gmail.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Thierry Reding <thierry.reding@gmail.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	linux-pwm@vger.kernel.org,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Clemens Gruber <clemens.gruber@pqgruber.com>,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	Sven Van Asbroeck <TheSven73@googlemail.com>
Subject: Re: [PATCH v4 1/1] pwm: pca9685: fix gpio-only operation.
Date: Thu, 20 Apr 2017 10:29:36 +0300	[thread overview]
Message-ID: <CAHp75VdaDP8GZGz5ZkKpSDdszjRzA+Miw=K7d_g3aeKTN4Ce=A@mail.gmail.com> (raw)
In-Reply-To: <CAGngYiWj1jBsgYAL31Qb2Ne+Te34vpjWD14xbV+u9vRS0i8kkQ@mail.gmail.com>

On Tue, Apr 18, 2017 at 6:52 PM, Sven Van Asbroeck <thesven73@gmail.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

  parent reply	other threads:[~2017-04-20  7:29 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-13 12:58 [PATCH v4 0/1] pwm: pca9685: fix gpio-only operation Sven Van Asbroeck
2017-04-13 12:58 ` [PATCH v4 1/1] " Sven Van Asbroeck
2017-04-13 15:34   ` Thierry Reding
2017-04-18  9:14   ` Andy Shevchenko
2017-04-18 15:52     ` Sven Van Asbroeck
2017-04-19 20:24       ` Mika Westerberg
2017-04-20  7:29       ` Andy Shevchenko [this message]
2017-04-20 14:12         ` Sven Van Asbroeck
2017-04-20 15:07           ` Andy Shevchenko
2017-04-20 15:50             ` Sven Van Asbroeck
2017-04-20 16:13               ` Andy Shevchenko
2017-04-20 15:55             ` Mika Westerberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAHp75VdaDP8GZGz5ZkKpSDdszjRzA+Miw=K7d_g3aeKTN4Ce=A@mail.gmail.com' \
    --to=andy.shevchenko@gmail.com \
    --cc=TheSven73@googlemail.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=clemens.gruber@pqgruber.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=rjw@rjwysocki.net \
    --cc=thesven73@gmail.com \
    --cc=thierry.reding@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).