All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Murphy <dmurphy@ti.com>
To: "Marek Behún" <marek.behun@nic.cz>
Cc: <linux-leds@vger.kernel.org>, Pavel Machek <pavel@ucw.cz>,
	<jacek.anaszewski@gmail.com>
Subject: Re: [PATCH v4 2/2] leds: initial support for Turris Omnia LEDs
Date: Wed, 15 Jul 2020 14:10:34 -0500	[thread overview]
Message-ID: <2c1470ae-5a5a-5f75-b08b-4fb47afe02ca@ti.com> (raw)
In-Reply-To: <20200715210358.567e0df5@dellmb.labs.office.nic.cz>

Marek

On 7/15/20 2:03 PM, Marek Behún wrote:
> On Wed, 15 Jul 2020 08:27:51 -0500
> Dan Murphy <dmurphy@ti.com> wrote:
>
>> Can this be built as a module?
> Yes. But only if MC framework is compiled in. If MC framework is
> compiled as module as well, this results in
>    FATAL: modpost: GPL-incompatible module led-class-multicolor.ko uses
>    GPL-only symbol 'led_set_brightness'

Hmm.  That is interesting

<snip>

>>> +	led->subled_info[0].color_index = LED_COLOR_ID_RED;
>>> +	led->subled_info[0].channel = 0;
>>> +	led->subled_info[1].color_index = LED_COLOR_ID_GREEN;
>>> +	led->subled_info[1].channel = 1;
>>> +	led->subled_info[2].color_index = LED_COLOR_ID_BLUE;
>>> +	led->subled_info[2].channel = 2;
>> OK this is why you may want to have sub-nodes.  Where reg is the
>> channel and color is the color.  Then you can do a for_each_child.
> Rob says that it doesn't need to be in DT if the controller only
> supports RGB LEDs. This controller is only in Turris Omnia which was
> never made with another kind of LEDs. So I think it is pointless and
> would only grow the DT and complicate the driver.
OK I know there was a discussion on this
>>> +	cdev->max_brightness = 255;
>> This is not needed.  It is defaulted to LED_FULL in led_class
> This was discussed last year and resulted in LED_FULL being
> declared obsolete in the header file.

No I am referring to setting the max_brightness to 255 the LED class 
sets this to 255 if the value is not set.


>>> +/*
>>> + * On the front panel of the Turris Omnia router there is also a
>>> button which can be used to control
>>> + * the intensity of all the LEDs at once, so that if they are too
>>> bright, user can dim them.
>>> + * The microcontroller cycles between 8 levels of this global
>>> brightness (from 100% to 0%), but this
>>> + * setting can have any integer value between 0 and 100.
>>> + * It is usable to be able to change this value from software, so
>>> that it does not start at 100%
>> This does not make sense.
> It does. The user changes the brightness of all 12 LEDs with the button
> to his liking and wants to have the same setting after powering
> the router on again.

No the english does not make sense

" It is usable to be able to change this value from software, so
that it does not start at 100%"

"It is usable" is not really clear.

>>> + * after every power on and annoy the user.
>>> + * We expose this setting via a sysfs attribute file called
>>> "brightness". This file lives in the
>>> + * device directory of the LED controller, not an individual LED,
>>> so it should not confuse users.
>>> + */
>> Sorry if this has been discussed already
>>
>> This seems a bit wonky.  You are overriding the brightness set by the
>> LED class.
> I am not. Pressing the button does not change the brightness read from
> the /sys/class/leds/<LED>/brightness file. This is different brightness,
> it is above the classic brightnes in the PWM hierarchy in the
> microcontroller. I discussed this with Pavel and he said we can call
> this file brightness as well (since it is brightness of the whole
> panel), and the file does not reside in /sys/class/leds/<LED> directory.

OK then there needs to be some ABI documentation no?

Dan

  reply	other threads:[~2020-07-15 19:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-15 12:40 [PATCH v4 0/2] Add Turris Omnia LEDs driver Marek Behún
2020-07-15 12:40 ` [PATCH v4 1/2] dt-bindings: leds: add cznic,turris-omnia-leds binding Marek Behún
2020-07-15 12:47   ` Dan Murphy
2020-07-15 13:02     ` Marek Behún
2020-07-15 12:40 ` [PATCH v4 2/2] leds: initial support for Turris Omnia LEDs Marek Behún
2020-07-15 13:27   ` Dan Murphy
2020-07-15 19:03     ` Marek Behún
2020-07-15 19:10       ` Dan Murphy [this message]
2020-07-16 10:32         ` Marek Behún

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=2c1470ae-5a5a-5f75-b08b-4fb47afe02ca@ti.com \
    --to=dmurphy@ti.com \
    --cc=jacek.anaszewski@gmail.com \
    --cc=linux-leds@vger.kernel.org \
    --cc=marek.behun@nic.cz \
    --cc=pavel@ucw.cz \
    /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.