LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Sven Van Asbroeck <thesven73@gmail.com>
To: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: "Thierry Reding" <thierry.reding@gmail.com>,
linux-pwm@vger.kernel.org,
"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
YueHaibing <yuehaibing@huawei.com>
Subject: Re: [PATCH] pwm: pca9685: fix pwm/gpio inter-operation
Date: Tue, 4 Jun 2019 09:34:46 -0400 [thread overview]
Message-ID: <CAGngYiUc5_A1umM=8f12BLejq-3aqHnExEQ2RxNABv8u3HdqnA@mail.gmail.com> (raw)
In-Reply-To: <20190604091425.GL2781@lahna.fi.intel.com>
Thank you for the review, Mika ! See comments below.
On Tue, Jun 4, 2019 at 5:14 AM Mika Westerberg
<mika.westerberg@linux.intel.com> wrote:
>
> > This approach will also prevent the request of the "all" pwm channel, if any
> > other pwm channel is already in use. Is this correct behaviour?
>
> Sounds correct to me.
Something that occurred to me right after I pressed the send button:
This patch will prevent a pwm 'all channels' request if at least one
of the pwm's is in use. But it will not guard against the opposite:
after the 'all channels' pwm is requested, it will still allow requests
for other pwms/gpios !
This is identical to the old behaviour. But maybe this is an oversight
and not a feature?
Proposal:
1. prevent request of 'all channel' if any of the pwms/gpios are in use
2. prevent request of all other pwms/gpios if 'all channels' is in use
>
> Can we call it pca9685_pwm_test_and_set_inuse() following naming of
> test_and_set_bit()?
Sounds good to me.
> >
> > +static void pca9685_pwm_clear_inuse(struct pca9685 *pca, struct pwm_device *pwm)
>
> I think it might be better if you provide __pca9685_pwm_clear_inuse()
> that does not take the lock and then pca9685_pwm_clear_inuse() that just
> calls the former. Then ->
I agree, this is much cleaner.
next prev parent reply other threads:[~2019-06-04 13:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-03 15:12 Sven Van Asbroeck
2019-06-04 9:14 ` Mika Westerberg
2019-06-04 13:34 ` Sven Van Asbroeck [this message]
2019-06-04 14:47 ` 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='CAGngYiUc5_A1umM=8f12BLejq-3aqHnExEQ2RxNABv8u3HdqnA@mail.gmail.com' \
--to=thesven73@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pwm@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=thierry.reding@gmail.com \
--cc=u.kleine-koenig@pengutronix.de \
--cc=yuehaibing@huawei.com \
--subject='Re: [PATCH] pwm: pca9685: fix pwm/gpio inter-operation' \
/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
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).