mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dan Murphy <dmurphy@ti.com>
To: Marek Behun <kabel@blackhole.sk>
Cc: <ultracoolguy@tutanota.com>, Pavel <pavel@ucw.cz>,
	Linux Leds <linux-leds@vger.kernel.org>,
	Linux Kernel <linux-kernel@vger.kernel.org>,
	Rob Herring <robh+dt@kernel.org>, <devicetree@vger.kernel.org>
Subject: Re: [PATCH] leds: lm3697: Fix out-of-bound access
Date: Tue, 6 Oct 2020 09:57:08 -0500	[thread overview]
Message-ID: <85515ccd-3431-4565-eaad-3e1d116bf89f@ti.com> (raw)
In-Reply-To: <20201006164101.2c3fa0d7@blackhole.sk>

Marek

On 10/6/20 9:41 AM, Marek Behun wrote:
> Adding Rob to Cc, Rob, could we have your opinion on this? Mine is below.
>
> Dan, I looked at the datasheet, I understand this.
>
> Nonetheless, device tree should describe how devices are connected to
> each other. The chip has 3 pins for 3 LED strings.
>
> If this controller should be able to support 3 LED strings via 3
> outputs, the device tree binding nodes should, in my opinion, describe
> each pin connected string. The nodes should maybe even be called
> 'led-string@N' where N is from [0, 1, 2].
>
> The fact that the device is bank controlled and there are only two
> banks (and it is configurable by which bank each LED string is
> controlled) is more relevant to the driver, not as much to device tree
> binding.
>
> But yes, I do realize that if we had 3 child nodes, and the driver
> created 3 LEDs, then changing brithrness on one of the 3 LEDs would
> change brightness on at least another one, which we do not want.
>
> Maybe this driver could parse these 3 `led-string` nodes, each having
> defined bank via `led-sources`, and then register LED classdevs for
> each bank that is mentioned. This way the device tree would be more
> correct, IMO, and the driver would not have the problem mentioned in
> the paragraph above.

Unfortunately we cannot and should not change the ABI now.

Using the led-sources as the bank indicator does not conform to the 
definition of the description of the led-sources in the yaml.

The preference was to use the led-sources to define the LED out to the bank.

Here is the conversation on how the driver got to where it is.

https://lore.kernel.org/patchwork/patch/972337/

Dan



  reply	other threads:[~2020-10-06 14:57 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-03 13:02 ultracoolguy
2020-10-03 13:56 ` Pavel Machek
2020-10-03 14:43   ` ultracoolguy
2020-10-05 12:13 ` Marek Behun
2020-10-05 13:50   ` Pavel Machek
2020-10-05 13:57   ` ultracoolguy
2020-10-05 14:33     ` Dan Murphy
2020-10-05 14:37       ` Dan Murphy
2020-10-05 14:38       ` ultracoolguy
2020-10-05 14:41         ` Dan Murphy
2020-10-05 15:35           ` ultracoolguy
2020-10-05 16:05             ` Pavel Machek
2020-10-05 16:48             ` Alexander Dahl
2020-10-05 17:14               ` ultracoolguy
2020-10-05 17:32                 ` Pavel Machek
2020-10-05 18:29                   ` ultracoolguy
2020-10-05 18:31                     ` ultracoolguy
2020-10-05 18:39                       ` Pavel Machek
2020-10-05 18:48                         ` ultracoolguy
2020-10-06  7:33                   ` Marek Behun
2020-10-06 11:59                     ` ultracoolguy
2020-10-06 12:21                       ` Dan Murphy
2020-10-06 14:41                         ` Marek Behun
2020-10-06 14:57                           ` Dan Murphy [this message]
2020-10-06 15:14                             ` Marek Behun
2020-10-06 17:26                           ` Pavel Machek
2020-10-05 15:59       ` Pavel Machek

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=85515ccd-3431-4565-eaad-3e1d116bf89f@ti.com \
    --to=dmurphy@ti.com \
    --cc=devicetree@vger.kernel.org \
    --cc=kabel@blackhole.sk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=robh+dt@kernel.org \
    --cc=ultracoolguy@tutanota.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®