All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mario Limonciello <mario_limonciello@dell.com>
To: Matthew Garrett <matthew.garrett@nebula.com>
Cc: "platform-driver-x86@vger.kernel.org"
	<platform-driver-x86@vger.kernel.org>
Subject: Re: [PATCH v4 0/1] Drop individual LED nodes for colors
Date: Fri, 28 Feb 2014 15:42:15 -0600	[thread overview]
Message-ID: <531102B7.1010205@dell.com> (raw)
In-Reply-To: <530FA738.9080207@dell.com>


On 02/27/2014 02:59 PM, Mario Limonciello wrote:
>
> On 02/27/2014 02:45 PM, Matthew Garrett wrote:
>> Hm. I'm not a huge fan of this approach - do any other drivers do it the
>> same way? It seems like this forces userspace code to special-case this
>> system.
>>
>
> Well i'm not aware of any other kernel drivers that control multi color LED zones like this.  This is the first alienware kernel driver.  The older MCU driven systems don't (yet) have a kernel module and instead there is a libusb driven project out there for them.
>
> The expectation is that the user-space color switcher that's written will have a color palette like this:
> http://www.nexthardware.com/repository/recensioni/611/immagini/img_AlienwareM17x-R3ControlCenter2_324312453106921989.jpg
>
> The tool will need to know how much of each color to mix to make the different colors in the palette anyway so how it's packed shouldn't matter.
>
> Also it shouldn't be a special case for this single system.  I'm pushing for the same BIOS interface to be used for any future Alienware systems without an MCU (some are in development).
>
> If you would still prefer that I revert to having individual color nodes I can switch it back, I'm just trying to avoid that situation where the user will need to have the system jump between multiple colors if they pick from two different ends of the spectrum in that palette.
>
> Also, any other feedback on the driver implementation?
Matthew,

I searched a little bit more in the kernel and found hid/hid-thingm.c.  The recent (2013) ThingM blink1 driver is for controlling an RGB LED.  The way they did it was having the LED device together with a separate sysfs interface both.  The LED device is used only for controlling the brightness whereas the sysfs interface is for accepting a 24-bit hexadecimal value for RGB.

So there has been a bunch of different methods I've implemented or come across.  Now that I've presented several, which of these would you like to see me use in this driver?

* custom RGB sysfs interface for color / LED class for brightness (ThingM style)
* Packed value in brightness node of LED class with all 32 bits used (v4 implementation)
* LED node for every color, brightness and state (v3 implementation)
* All custom sysfs nodes (v1 implementation)

Or something else?

I'm leaning on following the ThingM style and resubmitting with that.  It should then allow atomic commits as well as let me keep a separate node to control the state for the customization being made.

      reply	other threads:[~2014-02-28 21:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-27 20:33 [PATCH v4 0/1] Drop individual LED nodes for colors Mario Limonciello
2014-02-27 20:33 ` [PATCH v4 1/1] Add WMI driver for controlling AlienFX and HDMI on Alienware Mario Limonciello
2014-02-27 20:45 ` [PATCH v4 0/1] Drop individual LED nodes for colors Matthew Garrett
2014-02-27 20:59   ` Mario Limonciello
2014-02-28 21:42     ` Mario Limonciello [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=531102B7.1010205@dell.com \
    --to=mario_limonciello@dell.com \
    --cc=matthew.garrett@nebula.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 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.