[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <144aa75a-4369-cd81-d7dc-2354a9afd7c5@ti.com>
Date: Tue, 6 Oct 2020 07:21:14 -0500
From: Dan Murphy <dmurphy@...com>
To: <ultracoolguy@...anota.com>, Marek Behun <kabel@...ckhole.sk>
CC: Pavel <pavel@....cz>, Linux Leds <linux-leds@...r.kernel.org>,
Linux Kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] leds: lm3697: Fix out-of-bound access
All
On 10/6/20 6:59 AM, ultracoolguy@...anota.com wrote:
> While I do agree with you that having the child nodes be led strings make more sense, would it be possible to have, for example, three strings controlled by the same label?
>
> Oct 6, 2020, 07:33 by kabel@...ckhole.sk:
>
>> By the way I just realized that the DT binding in this driver seems
>> incorrect to me.
>>
>> The controller logically supports 3 LED strings, each having
>> configurable control bank.
There are two control banks. You can connect the HVLED outputs to either
control bank A or B there is no individual control of the LED strings.
>> But the DT binding supports 2 DT nodes, one for each control bank
>> (identified by the `reg` property) and then `led-sources` says which
>> string should be controlled by given bank.
>>
>> But taking in mind that DT should describe how devices are connected to
>> each other, I think the child nodes in the binding should instead
>> describe the 3 supported LED strings...
The outputs in this case are virtual outputs which are the banks (A and B).
Since the device is bank controlled the actual current sinks are not
defined thus making the the banks the actual outputs.
This is why the 'reg' property defines the control bank either A or B
and the led-sources indicates the strings associated with the control bank.
Dan
Powered by blists - more mailing lists