public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Darren Hart <dvhart@infradead.org>
To: Hans de Goede <hdegoede@redhat.com>
Cc: Benjamin Berg <benjamin@sipsolutions.net>,
	Chris Chiu <chiu@endlessm.com>,
	Bastien Nocera <hadess@hadess.net>,
	Daniel Drake <drake@endlessm.com>,
	Corentin Chary <corentin.chary@gmail.com>,
	Andy Shevchenko <andy.shevchenko@gmail.com>,
	Linux Kernel <linux-kernel@vger.kernel.org>,
	Platform Driver <platform-driver-x86@vger.kernel.org>,
	acpi4asus-user <acpi4asus-user@lists.sourceforge.net>,
	Linux Upstreaming Team <linux@endlessm.com>
Subject: Re: [PATCH 1/2] platform/x86: asus-wmi: Call new led hw_changed API on kbd brightness change
Date: Fri, 8 Jun 2018 17:33:03 -0700	[thread overview]
Message-ID: <20180609003303.GD111314@localhost.localdomain> (raw)
In-Reply-To: <173fdeb2-8129-57eb-fe2e-3ae16eec54b6@redhat.com>

On Wed, Jun 06, 2018 at 05:32:52PM +0200, Hans de Goede wrote:

> > > > > If we are adding hwdb entries anyway to control the userspace
> > > > > interpretation of the TOGGLE key, then we could also add the new CYCLE
> > > > > key and explicitly re-map it to TOGGLE. That requires slightly more
> > > > > logic in hwdb, but it does mean that we could theoretically just drop
> > > > > the workaround if we ever stop caring about Xorg.
> > > > 
> > > > Hmm, interesting proposal, I say go for it :)
> > > > 
> > > 
> > > So maybe the next stop is that I can follow Darren's suggestion to eliminate
> > > the is_kbd_led_event() and send a v2 for review?
> > 
> > I believe the best compromise we have right now is to do what Hans
> > suggested in an earlier proposal. That is implementing the two separate
> > behaviours in the kernel
> > 
> >   1) handle this in the kernel as if the hardware changed it, and
> >   2) send a new KEY_KBDILLUMCYCLE event [default].
> 
> I think you mean or, not and, depending on a module option the
> code should do either 1) or 2) not both :)
> 
> Darren, Andy could you live with a module option for this?

We are of course strongly opposed to adding module options.

I agree we can't ignore Xorg.

I agree policy in general should not be in the kernel.

I also see many of these drivers as the last mile to getting a platform
fully working. If there is a place for one-off fixes, it's in these
drivers. I'd love to refactor and use proper abstractions and all that
as the patterns make those abstractions clear - but I don't want to
delay getting something working waiting for the ideal solution.

So I have two questions I'd like to confirm before saying "OK" to a
module option.

1) Hans I think you said that doing the code conversion from TOGGLE to
UP based on the LED value and the max value was racy with userspace.
What is the failure mode here? Is it not easily recoverable? And how do
I enter it? Do I have to simultaneously modify the software brightness
control AND press the keyboard brightness control? How practical is
that? If recoverable AND hard to trigger, I think there is value in the
very simple 3 level brightness cycle being handled in the kernel.

2) Why is a module option preferable to a compile time option? It seems
to me the policy will be largely distro dependent, and the same kernel
needing to support both modes seems likely to be pretty rare.

-- 
Darren Hart
VMware Open Source Technology Center

  reply	other threads:[~2018-06-09  0:33 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-04 12:32 [PATCH 1/2] platform/x86: asus-wmi: Call new led hw_changed API on kbd brightness change Chris Chiu
2018-06-04 12:32 ` [PATCH 2/2] platform/x86: asus-wmi: Add keyboard backlight toggle support Chris Chiu
2018-06-04 13:22 ` [PATCH 1/2] platform/x86: asus-wmi: Call new led hw_changed API on kbd brightness change Hans de Goede
2018-06-04 13:51   ` Daniel Drake
2018-06-04 14:23     ` Hans de Goede
2018-06-04 15:46       ` Azael Avalos
2018-06-05  2:31       ` Darren Hart
2018-06-05  3:18         ` Chris Chiu
2018-06-05  7:37           ` Hans de Goede
2018-06-05  9:58             ` Bastien Nocera
2018-06-05 10:05               ` Hans de Goede
2018-06-05 10:14                 ` Bastien Nocera
2018-06-05 10:31                   ` Hans de Goede
2018-06-05 10:46                     ` Benjamin Berg
2018-06-05 11:06                       ` Hans de Goede
2018-06-06  2:50                         ` Chris Chiu
2018-06-06 14:27                           ` Benjamin Berg
2018-06-06 15:32                             ` Hans de Goede
2018-06-09  0:33                               ` Darren Hart [this message]
2018-06-09 11:13                                 ` Hans de Goede
2018-06-05  7:35         ` Hans de Goede
2018-06-05  2:17 ` Darren Hart

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=20180609003303.GD111314@localhost.localdomain \
    --to=dvhart@infradead.org \
    --cc=acpi4asus-user@lists.sourceforge.net \
    --cc=andy.shevchenko@gmail.com \
    --cc=benjamin@sipsolutions.net \
    --cc=chiu@endlessm.com \
    --cc=corentin.chary@gmail.com \
    --cc=drake@endlessm.com \
    --cc=hadess@hadess.net \
    --cc=hdegoede@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@endlessm.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