From: Thierry Reding <thierry.reding@gmail.com>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: linux-pwm@vger.kernel.org, kernel@pengutronix.de
Subject: Re: [PATCH] pwm: poke users of legacy drivers with a warning
Date: Tue, 12 Mar 2019 13:28:35 +0100 [thread overview]
Message-ID: <20190312122835.GN31026@ulmo> (raw)
In-Reply-To: <20190312120355.dfpcmuetcr56klbp@pengutronix.de>
[-- Attachment #1: Type: text/plain, Size: 2358 bytes --]
On Tue, Mar 12, 2019 at 01:03:55PM +0100, Uwe Kleine-König wrote:
> On Tue, Mar 12, 2019 at 12:39:44PM +0100, Thierry Reding wrote:
> > On Tue, Mar 12, 2019 at 10:42:49AM +0100, Uwe Kleine-König wrote:
> > > As it is hard to convert a given driver from the legacy functions
> > > (.enable, .disable, .config) to the atomic stuff (.apply) without
> > > testing make users aware that there is something to do with a warning to
> > > eventually get rid of the legacy drivers.
> > >
> > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > > ---
> > > drivers/pwm/core.c | 14 +++++++++-----
> > > 1 file changed, 9 insertions(+), 5 deletions(-)
> >
> > I don't think that's a good idea. What are regular users supposed to do
> > when they see this warning?
>
> Ask on this list for directions or volunteer as tester.
I don't think that's fair to expect from users. There's nothing risky
about using a legacy API driver, so users shouldn't need to do anything.
This is a maintenance issue that users don't have to be concerned about.
> Then in a few years we can as a next step make these drivers fail to
> probe if they are still unfixed.
Erm... no. Why would you want to purposely break a driver that's working
perfectly fine?
> If you don't agree I wonder how you want to complete the task to convert
> all drivers to the atomic API.
There's technically nothing wrong with using the legacy API. It's worked
well for a number of years and a large number of drivers. We have
helpers that allow atomic API users to work with legacy API drivers.
From my point of view there's no need to convert drivers that work fine
with the legacy API.
That said, it would be nice if it did happen eventually, if for no other
reason than to get rid of the compatibility shims, which aren't really
that bad in the first place. But I think the conversion could be done in
a relatively automated way. pwm_apply_state() codifies what the sequence
of calls is for the atomic API, so that's the sequence that ->apply()
would need to implement as well, given the existing legacy callbacks.
Another way of saying this is to push pwm_apply_state() down into driver
implementations. That's probably not the ideal way of implementing the
changes in a driver, but it's certainly one that should work.
Thierry
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2019-03-12 12:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-12 9:42 [PATCH] pwm: poke users of legacy drivers with a warning Uwe Kleine-König
2019-03-12 11:39 ` Thierry Reding
2019-03-12 12:03 ` Uwe Kleine-König
2019-03-12 12:28 ` Thierry Reding [this message]
2019-03-12 13:48 ` Uwe Kleine-König
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=20190312122835.GN31026@ulmo \
--to=thierry.reding@gmail.com \
--cc=kernel@pengutronix.de \
--cc=linux-pwm@vger.kernel.org \
--cc=u.kleine-koenig@pengutronix.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.