Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1659170

Re: [PATCH V2 1/2] leds: leds-qti-rgb: Add LED driver for QTI TRI_LED module

From Jacek Anaszewski <jacek.anaszewski@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH V2 1/2] leds: leds-qti-rgb: Add LED driver for QTI TRI_LED module
Date 2017-06-06 22:10 +0200
Message-ID <tPsXF-54F-29@gated-at.bofh.it> (permalink)
References <tNsIq-7Yb-19@gated-at.bofh.it> <tOIBr-pc-3@gated-at.bofh.it> <tP7zP-870-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi,

On 06/05/2017 11:16 PM, Pavel Machek wrote:
> Hi!
> 
>> Generally I came to a conclusion that it will be best to register
>> additional LED RGB class device in an addition to three LED class
>> devices representing each color. In order to avoid hard to solve
>> locking problems I propose to allow for simultaneous access to LED
>> class devices and LED RGB class device gathering them.
>>
>> All in all, currently we also don't give an exclusive access to
>> a particular LED class device, which always can lead to overwriting
>> current brightness by another process. These issues must be arbitrated
>> by user space.
>>
>> I propose that LED RGB class device exposed following files:
>>
>> - red_brightness
>> - green_brightness
>> - blue_brightness
>> - latch_color
> 
> Actually, I'd just do single file, "rgb_brightness" with 3
> values. Overhead of writing 3 values is pretty much 0.

You've always been strongly in favor of one-value-per-file
sysfs rule of thumb, but I'm OK with this approach as well :-)

-- 
Best regards,
Jacek Anaszewski

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH V2 1/2] leds: leds-qti-rgb: Add LED driver for QTI TRI_LED module fenglinw@codeaurora.org - 2017-06-01 09:30 +0200
  Re: [PATCH V2 1/2] leds: leds-qti-rgb: Add LED driver for QTI TRI_LED  module Jacek Anaszewski <jacek.anaszewski@gmail.com> - 2017-06-04 20:40 +0200
    Re: [PATCH V2 1/2] leds: leds-qti-rgb: Add LED driver for QTI  TRI_LED module Pavel Machek <pavel@ucw.cz> - 2017-06-05 23:20 +0200
      Re: [PATCH V2 1/2] leds: leds-qti-rgb: Add LED driver for QTI TRI_LED  module Jacek Anaszewski <jacek.anaszewski@gmail.com> - 2017-06-06 22:10 +0200
        Re: [PATCH V2 1/2] leds: leds-qti-rgb: Add LED driver for QTI  TRI_LED module Pavel Machek <pavel@ucw.cz> - 2017-06-06 22:20 +0200

csiph-web