[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20220113141132.vec2zisfdkrznyis@pengutronix.de>
Date: Thu, 13 Jan 2022 15:11:32 +0100
From: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: vishakha.joshi@...el.com, thierry.reding@...il.com,
lee.jones@...aro.org, linux-pwm@...r.kernel.org,
linux-kernel@...r.kernel.org, jarkko.nikula@...ux.intel.com,
vijayakannan.ayyathurai@...el.com, bala.senthil@...el.com,
tamal.saha@...el.com, lakshmi.bai.raja.subramanian@...el.com
Subject: Re: [PATCH v1 1/2] pwm: Add count to sysfs for Intel PWM driver
Hello,
On Tue, Jan 04, 2022 at 03:58:55PM +0200, Andy Shevchenko wrote:
> On Mon, Jan 03, 2022 at 01:14:54PM +0100, Uwe Kleine-König wrote:
> > If we really want to support a count, I request that all drivers that
> > don't support it get updated to refuse a request with count != 0.
>
> Hmm... Not sure it worth it, perhaps taking into account above the -1
> (in unsigned type) returned on ->get_state() can suffice as not supporting
> feature?
In my eyes that's a bad idea. You have to touch most drivers anyhow to
set the -1. So the outcome is the worst possible combination: Many
changes and still much implicit logic distributed between the drivers
and the core about what is supported and what not.
(Or you have to initialize .count = -1 before calling the get_state
callback. Then you get rid of "have to touch most drivers". But that's
still ugly IMO.)
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists