All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: vishakha.joshi@intel.com, thierry.reding@gmail.com,
	lee.jones@linaro.org, linux-pwm@vger.kernel.org,
	linux-kernel@vger.kernel.org, jarkko.nikula@linux.intel.com,
	vijayakannan.ayyathurai@intel.com, bala.senthil@intel.com,
	tamal.saha@intel.com, lakshmi.bai.raja.subramanian@intel.com
Subject: Re: [PATCH v1 1/2] pwm: Add count to sysfs for Intel PWM driver
Date: Thu, 13 Jan 2022 15:11:32 +0100	[thread overview]
Message-ID: <20220113141132.vec2zisfdkrznyis@pengutronix.de> (raw)
In-Reply-To: <YdRSnxqIJf1C14+x@smile.fi.intel.com>

[-- Attachment #1: Type: text/plain, Size: 1064 bytes --]

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/ |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2022-01-13 14:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-03  8:16 [PATCH v1 0/2] pwm: Add count to sysfs for Intel PWM driver vishakha.joshi
2022-01-03  8:16 ` [PATCH v1 1/2] " vishakha.joshi
2022-01-03 12:14   ` Uwe Kleine-König
2022-01-04 13:58     ` Andy Shevchenko
2022-01-13 14:11       ` Uwe Kleine-König [this message]
2022-01-03  8:16 ` [PATCH v1 2/2] pwm: Update the REPEAT_COUNT value vishakha.joshi

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=20220113141132.vec2zisfdkrznyis@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=bala.senthil@intel.com \
    --cc=jarkko.nikula@linux.intel.com \
    --cc=lakshmi.bai.raja.subramanian@intel.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=tamal.saha@intel.com \
    --cc=thierry.reding@gmail.com \
    --cc=vijayakannan.ayyathurai@intel.com \
    --cc=vishakha.joshi@intel.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 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.