Re: [PATCH 4/7] soc/tegra: pmc: Add interface to set voltage of IO rails
From: Linus Walleij
Date: Fri Apr 15 2016 - 03:54:41 EST
On Tue, Apr 12, 2016 at 4:56 PM, Laxman Dewangan <ldewangan@xxxxxxxxxx> wrote:
> NVIDIA Tegra210 supports some of the IO interface which can operate
> at 1.8V or 3.3V I/O rail voltage levels. SW needs to configure
> Tegra PMC register to set different voltage level of IO interface based
> on IO rail voltage from power supply i.e. power regulators.
>
> Add APIs to set and get IO rail voltage from the client driver.
>
> Signed-off-by: Laxman Dewangan <ldewangan@xxxxxxxxxx>
Nobody seems to mention the elephant in the room: why is this
not using the regulator subsystem and instead using custom
code under drivers/soc? We have worried before about drivers/soc
becoming a dumping ground akin to drivers/misc
IIRC in the past we tried to use regulators for this kind of fast
switches at ST-Ericsson, and the problem we ran into was that
regulators were kind of heavyweight and would need some
locking and required to run in slowpath.
But as complexity increases the question has to be asked
again, because what we don't want is for every SOC to start
reimplementing stuff from the regulator framework under
drivers/soc.
I'm asking you to make a case for this necessarily
different, "we are special" custom code.
Yours,
Linus Walleij