mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jonathan Woithe <jwoithe@just42.net>
To: Matej Groma <matejgroma@gmail.com>
Cc: Darren Hart <dvhart@infradead.org>,
	platform-driver-x86@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] fujitsu-laptop: Unify max brightness of exported leds
Date: Mon, 4 Jul 2016 09:05:41 +0930	[thread overview]
Message-ID: <20160703233541.GB1198@marvin.atrad.com.au> (raw)
In-Reply-To: <20160701212913.GA11588@Matej-PC.localdomain>

On Fri, Jul 01, 2016 at 11:29:14PM +0200, Matej Groma wrote:
> On Fri, Jul 01, 2016 at 12:19:27PM -0700, Darren Hart wrote:
> > 1) Matej, why do you want to make this change? You mention consistency with
> > other LEDs drivers - which ones? Also, why? Is there a tool or something that
> > expects this behavior which you want to use? Why is this better than sticking
> > with LED_OFF and LED_FULL?
> 
> I got the idea looking at the input leds - they all have set max
> brightness at 1. I find it more intuitive because there are no
> intermediate brightness levels changing nothing. Also, I think
> brightness level 1 somewhat implies that the led should be at
> least "a little on".
> 
> > 2) If we change it, we need to first introduce a version attribute (separate
> > patch), and this patch following it should increment that version indicating the
> > value policy change.
> 
> I understand your concerns about breaking the userspace. Another way of
> handling this that comes to mind is not changing the max_brightness
> but activating the leds on values 1-255. This does not break things
> "as much". A version bump would be of course legitimate in either case.
> However, a problem with the second approach is that the set value would
> have to be stored in order to return the same when querying the status
> of the led. Or, on second thought, it's probably best to leave this all
> as it is.

At this point I am inclined to agree with you: leaving it as it is.  The
need to version the user space attribute just to make what is ultimately a
cosmetic change seems like a lot of churn which bring no practical benefit.

> By the way, the eco led patch (d6b88f64b0d46) I sent previously has set
> max_brightness of the led to 1. If that was a slip through, I can send
> a patch that corrects it.

I could argue both ways here because there's no userspace API to worry about
at this stage.  Given what Darren said there's no definitive convention to
call on.  I think on balance it would make more sense if the API for the
Fujitsu LEDS was consistent within itself as much as possible, so if you
could do up a patch to correct this for the eco LED that would be
appreciated.

If down the track circumstances create a practical benefit to an API change
then we can always revisit this.

Regards
  jonathan

      reply	other threads:[~2016-07-03 23:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-29  7:28 Matej Groma
2016-06-30 13:00 ` Jonathan Woithe
2016-07-01 19:19   ` Darren Hart
2016-07-01 21:29     ` Matej Groma
2016-07-03 23:35       ` Jonathan Woithe [this message]

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=20160703233541.GB1198@marvin.atrad.com.au \
    --to=jwoithe@just42.net \
    --cc=dvhart@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matejgroma@gmail.com \
    --cc=platform-driver-x86@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®