[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <37ae7275-3c85-e94e-4ed1-95b6b901c2ed@nvidia.com>
Date: Tue, 24 Nov 2020 13:41:16 +0000
From: Jon Hunter <jonathanh@...dia.com>
To: <Claudiu.Beznea@...rochip.com>, <lgirdwood@...il.com>,
<broonie@...nel.org>
CC: <s.hauer@...gutronix.de>, <ttynkkynen@...dia.com>,
<linus.walleij@...aro.org>, <axel.lin@...ics.com>,
<linux-kernel@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-tegra@...r.kernel.org>
Subject: Re: [PATCH v3 1/6] regulator: core: validate selector against
linear_min_sel
On 24/11/2020 11:14, Claudiu.Beznea@...rochip.com wrote:
...
> I would say that a solution would be to have a new helper to retrieve the
> linear_min_sel (e.g. regulator_min_sel()) and use this for all the
> consumers of regulator_list_voltage() and the other APIs that patch
> "regulator: core: validate selector against linear_min_sel" has changed
> (regulator_list_voltage_table(), regulator_set_voltage_time()). With this
> change the loop in find_vdd_map_entry_exact() should be b/w
> regulator_min_sel() and regulator_count_voltages().
>
> Maybe Mark has a better solution for this.
By the way, I don't think that Tegra is alone here. I see some other
drivers doing some similar things [0][1][2] and so I am wondering if
this is going to be a problem for a few drivers.
Jon
[0]
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/mmc/core/regulator.c#n61
[1]
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/cpufreq/s3c2416-cpufreq.c#n263
[2]
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/leds/leds-regulator.c#n29
--
nvpublic
Powered by blists - more mailing lists