lkml.org 
[lkml]   [2020]   [Oct]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] leds: lm3697: Rename struct into more appropriate name
On Sat, 10 Oct 2020 20:57:00 +0200
Pavel Machek <pavel@ucw.cz> wrote:

> On Fri 2020-10-09 15:51:35, Gabriel David wrote:
> > The mentioned struct, lm3697_led, was renamed to lm3697_bank since the
> > structure is representing the control banks. This name, in my opinion,
> > is more semantically correct. The pointers referring to it were also
> > renamed.
>
> > Signed-off-by: Gabriel David <ultracoolguy4@protonmail.com>
> > ---
> > Yes, this is the same Gabriel David from ultracoolguy@tutanota.org and
> > ultracoolguy@disroot.org. If you want me to confirm it I'll gladly do
> > it.
>
> No problem with that, and no need to resend. This can proably wait
> for 5.11...
>
> I'd like some comment from Dan... and perhaps I'd want to understand
> what the difference between LED and bank is.
>
> ...there can be more than one LED connected to the given bank, that's
> what you are pointing out?
>
> ...but these LEDs will always work in unison, and they are handled as
> single LED by Linux, right?
>

Pavel,

the controller can connect 3 LED strips (to 3 different pins on the
chip). There are 2 LED control banks (this is where you can set
brightness). For each LED strip (each output pin) you can configure to
which control bank it connects. So you have 3 LED strips and 2 control
banks, that is 2^3 = 8 different configurations of connecting LED
control bank to LED strip.

From the perspective of Linux you see the two control banks as 2 LED
class devices (because you are setting brightness for control banks,
not for the LED strips).

Marek

\
 
 \ /
  Last update: 2020-10-11 01:10    [W:0.083 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site