All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Hans de Goede <hdegoede@redhat.com>
Cc: "Jacek Anaszewski" <j.anaszewski@samsung.com>,
	"Pali Rohár" <pali.rohar@gmail.com>,
	"Jacek Anaszewski" <jacek.anaszewski@gmail.com>,
	"Darren Hart" <dvhart@infradead.org>,
	"Matthew Garrett" <mjg59@srcf.ucam.org>,
	"Henrique de Moraes Holschuh" <ibm-acpi@hmh.eng.br>,
	"Richard Purdie" <rpurdie@rpsys.net>,
	ibm-acpi-devel@lists.sourceforge.net,
	platform-driver-x86@vger.kernel.org, linux-leds@vger.kernel.org
Subject: Re: [PATCH v5 2/6] leds: triggers: Add a keyboard backlight trigger
Date: Fri, 25 Nov 2016 11:07:31 +0100	[thread overview]
Message-ID: <20161125100730.GD4062@amd> (raw)
In-Reply-To: <2e1ddcc3-489d-bab1-ebb9-dad02db7b37c@redhat.com>

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

On Mon 2016-11-21 10:31:33, Hans de Goede wrote:
> Hi,
> 
> On 21-11-16 09:35, Jacek Anaszewski wrote:
> >On 11/20/2016 04:05 PM, Pali Rohár wrote:
> >>On Saturday 19 November 2016 16:44:09 Jacek Anaszewski wrote:
> >>>Hi,
> >>>
> >>>On 11/18/2016 07:47 PM, Hans de Goede wrote:
> >>>>HI,
> >>>>
> >>>>On 18-11-16 17:03, Jacek Anaszewski wrote:
> >>>>>Hi,
> >>>>>
> >>>>>On 11/18/2016 10:07 AM, Hans de Goede wrote:
> >>>>>>Hi,
> >>>>>>
> >>>>>>On 18-11-16 09:55, Jacek Anaszewski wrote:
> >>>>>>>Hi Hans,
> >>>>>>>
> >>>>>>>Thanks for the patch.
> >>>>>>>
> >>>>>>>I think we need less generic trigger name.
> >>>>>>>With present name we pretend that all kbd-backlight controllers
> >>>>>>>can change LED brightness autonomously.
> >>>>>>>
> >>>>>>>How about kbd-backlight-pollable ?
> >>>>>>
> >>>>>>This is a trigger to control kbd-backlights, in the
> >>>>>>current use-case the brightness change is already done
> >>>>>>by the firmware, hence the set_brightness argument to
> >>>>>>ledtrig_kbd_backlight(), so that we can avoid setting
> >>>>>>it again.
> >>>>>>
> >>>>>>But I can see future cases where we do want to have some
> >>>>>>event (e.g. a wmi hotkey event on a laptop where the firmware
> >>>>>>does not do the adjustment automatically) which does
> >>>>>>lead to actually updating the brightness.
> >>>>>>
> >>>>>>So I decided to go with a generic kbd-backlight trigger,
> >>>>>>which in the future can also be used to directly control
> >>>>>>kbd-backlight brightness; and not just to make ot
> >>>>>>poll-able.
> >>>>>
> >>>>>I thought that kbd-backlight stands for "keyboard backlight",
> >>>>
> >>>>It does.
> >>>>
> >>>>>that's why I assessed it is too generic.
> >>>>
> >>>>The whole purpose of the trigger as implemented is to be
> >>>>generic, as it seems senseless to implement a one off
> >>>>trigger for just the dell / thinkpad case.
> >>>>
> >>>>>It seems however to be
> >>>>>the other way round - if kbd-backlight means that this is
> >>>>>a trigger only for use with dell-laptop keyboard driver
> >>>>>(I see kbd namespacing prefix in the driver functions) than it is
> >>>>>not generic at all.
> >>>>
> >>>>The trigger as implemented is generic, if you think
> >>>>otherwise, please let me know which part is not generic
> >>>>according to you.
> >>>
> >>>I think I was too meticulous here. In the end of the previous
> >>>message I mentioned that we cannot guarantee that all keyboard
> >>>backlight controllers can adjust brightness autonomously.
> >>>Nonetheless, for the ones that cannot do that it would make no sense
> >>>to have a trigger. In view of that this trigger is generic enough.
> >>>
> >>>I'll wait for Pavel's opinion before merging the patch set
> >>>as he was also involved in this whole thread.
> >>
> >>Do you mean me? Or Pavel Machek (CCed) who was involved in LEDs for input devices?
> >
> >I meant Pavel Machek, I haven't known that Pali is an equivalent of
> >Pavel :-)
> >Your opinion is very much appreciated though, thanks.
> >
> >>As pointed in other email, we do not know if HW really controls keyboard backlight,
> >>so adding "fake" trigger on machines without HW control is not a good idea.
> >>
> >
> >Yes, I had also similar doubts, but got almost convinced due to
> >no objections. Now it becomes clear that we need to improve this
> >feature.
> 
> But we are not adding such a fake trigger. We are only setting up the
> kbd-backlight trigger on systems where there actually is hw-control.
> 
> Sure someone can do echo "kbd-backlight" > trigger to enable it,
> but the same is true for e.g. "mtd" or "nand-disk" on systems
> without an mtd-device / a nand-disk, and the result is the same,
> the LED gets coupled to the trigger, but nothing ever triggers
> the trigger.

We can do that, yes.

Alternatively, we could do some magic so that kbd-backlight trigger is
not available for other leds, and that _only_ kbd-backlight trigger is
available for leds that are always controlled by the hardware. But we
can do that in future patch...

> I really believe that we have the right design now (I was skeptical
> about the trigger approach at first, but it has turned out really
> well) and unless Pavel Machek has any objections I would really like
> patches 1-2 of this series merged.

I certainly like the interface from thedescription.

									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

  parent reply	other threads:[~2016-11-25 10:07 UTC|newest]

Thread overview: 77+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-17 22:24 [PATCH v5 1/6] leds: triggers: Add current_brightness trigger parameter Hans de Goede
2016-11-17 22:24 ` [PATCH v5 2/6] leds: triggers: Add a keyboard backlight trigger Hans de Goede
2016-11-18  8:55   ` Jacek Anaszewski
     [not found]     ` <af5a6b68-310d-85ec-16db-5c9036f38ba5-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2016-11-18  9:07       ` Hans de Goede
2016-11-18 16:03         ` Jacek Anaszewski
2016-11-18 18:47           ` Hans de Goede
2016-11-19 15:44             ` Jacek Anaszewski
2016-11-20 15:05               ` Pali Rohár
2016-11-20 16:21                 ` Pavel Machek
2016-11-20 18:48                   ` Hans de Goede
     [not found]                     ` <acd1691b-56be-c902-feff-7ecf38ea102a-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-11-20 19:45                       ` Pali Rohár
2016-11-21 10:24                   ` Jacek Anaszewski
2016-11-21 10:42                     ` Hans de Goede
2016-11-21 11:24                       ` Jacek Anaszewski
2016-11-21 11:56                         ` Hans de Goede
2016-11-21 13:29                           ` Jacek Anaszewski
2016-11-22 14:58                             ` Pali Rohár
2016-11-22 15:20                               ` [ibm-acpi-devel] " Glenn Golden
2016-11-23 11:01                               ` Jacek Anaszewski
2016-11-24  9:15                                 ` Pali Rohár
2016-11-24  9:21                                   ` Hans de Goede
2016-11-24 14:21                                   ` Jacek Anaszewski
2016-11-24 14:26                                     ` Pali Rohár
2016-11-24 15:32                                       ` Jacek Anaszewski
     [not found]                                         ` <50225a88-b928-c61b-bf6f-6c85fb6a9082-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2016-11-24 15:36                                           ` Pali Rohár
2016-11-24 16:21                                             ` Jacek Anaszewski
2016-11-24 16:51                                               ` Pali Rohár
2016-11-24 21:35                                                 ` Jacek Anaszewski
     [not found]                                                   ` <5238be1f-d669-07e6-c796-5bc0126cb456-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-11-24 21:45                                                     ` Pali Rohár
2016-11-25  8:33                                                       ` Jacek Anaszewski
2016-11-25 10:01                                                         ` Pavel Machek
2016-11-25 10:25                                                           ` Jacek Anaszewski
     [not found]                                                             ` <e32e3d6c-5d6d-c882-21d9-8028c8311b0b-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2016-11-25 11:05                                                               ` Pavel Machek
2016-11-25 11:19                                                                 ` Jacek Anaszewski
     [not found]                                                                   ` <2367b9a7-68f7-2038-0d3a-a9561055b4f6-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2016-11-25 14:49                                                                     ` Pavel Machek
2016-11-25 15:55                                                                       ` Jacek Anaszewski
2016-11-25 20:40                                                                         ` Pavel Machek
2016-11-25 22:28                                                                           ` Jacek Anaszewski
2016-12-21 18:49                                                                             ` Pavel Machek
2016-12-23 21:55                                                                               ` Jacek Anaszewski
2017-01-13 19:17                                                                                 ` Darren Hart
2017-01-15 10:54                                                                                   ` Hans de Goede
2017-01-15 12:25                                                                                     ` Henrique de Moraes Holschuh
2017-01-15 15:05                                                                                       ` Hans de Goede
2017-01-24 12:32                                                                                 ` Pavel Machek
2017-01-24 22:56                                                                                   ` Jacek Anaszewski
2017-01-25 13:12                                                                                     ` Hans de Goede
2016-11-25 11:14                                                           ` Hans de Goede
2016-11-25 11:26                                                             ` Pali Rohár
2016-11-25 12:05                                                               ` Pavel Machek
2016-11-25 15:46                                                               ` Jacek Anaszewski
2016-12-01 14:08                                                             ` Jacek Anaszewski
2016-11-25  9:56                                             ` Pavel Machek
2016-11-25  9:51                                   ` Pavel Machek
2016-11-21 11:41                     ` Pavel Machek
2016-11-21 13:29                       ` Jacek Anaszewski
2016-11-25  9:29                         ` Pavel Machek
2016-11-21  8:35                 ` Jacek Anaszewski
2016-11-21  9:31                   ` Hans de Goede
2016-11-21 10:12                     ` Pali Rohár
2016-11-21 10:16                       ` Hans de Goede
2016-11-25 10:07                     ` Pavel Machek [this message]
2016-11-17 22:24 ` [PATCH v5 3/6] leds: triggers: Add support for read-only triggers Hans de Goede
2016-11-18  8:52   ` Jacek Anaszewski
2016-11-18  9:04     ` Hans de Goede
2016-11-18 10:49       ` Jacek Anaszewski
2016-11-18 11:01         ` Hans de Goede
2016-11-17 22:24 ` [PATCH v5 4/6] platform: x86: thinkpad: Call led kbd_backlight trigger on kbd brightness change Hans de Goede
2016-11-17 22:24 ` [PATCH v5 5/6] platform: x86: dell-laptop: Set keyboard backlight led device default trigger Hans de Goede
2016-11-17 22:24 ` [PATCH v5 6/6] platform: x86: dell-wmi: Call led kbd_backlight trigger on kbd brightness change Hans de Goede
2016-11-20 14:59 ` [PATCH v5 1/6] leds: triggers: Add current_brightness trigger parameter Pali Rohár
2016-11-20 18:45   ` Hans de Goede
2016-11-20 19:40     ` Pali Rohár
2016-11-20 22:12       ` Pavel Machek
2016-11-20 23:07 ` Pali Rohár
2016-11-20 23:48   ` Pavel Machek
2016-11-21 10:02     ` Pali Rohár

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=20161125100730.GD4062@amd \
    --to=pavel@ucw.cz \
    --cc=dvhart@infradead.org \
    --cc=hdegoede@redhat.com \
    --cc=ibm-acpi-devel@lists.sourceforge.net \
    --cc=ibm-acpi@hmh.eng.br \
    --cc=j.anaszewski@samsung.com \
    --cc=jacek.anaszewski@gmail.com \
    --cc=linux-leds@vger.kernel.org \
    --cc=mjg59@srcf.ucam.org \
    --cc=pali.rohar@gmail.com \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=rpurdie@rpsys.net \
    /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.