[U-Boot] [PATCH 23/23] ARM: tegra: Enable PCIe on Jetson TK1

Simon Glass
2014-08-22T20:12:19Z

Hi Thierry,

On 22 August 2014 13:40, Thierry Reding <thierry.reding@gmail.com> wrote:
> On Fri, Aug 22, 2014 at 01:27:57PM -0600, Simon Glass wrote:
>> On 22 August 2014 06:09, Thierry Reding <thierry.reding@gmail.com> wrote:
> [...]
>> > Note that I haven't turned the AS3722 support into a "PMIC" driver,
>> > because the framework for that seems to be unusable. It doesn't seem to
>> > abstract away driver-specifics at all but rather provides a way to
>> > access registers in a uniform way (sort of what regmap does in Linux).
>> > Using that framework would therefore require knowledge about the exact
>> > register accesses within drivers and therefore wouldn't be an
>> > improvement over the current situation.
>> >
>>
>> It doesn't provide a PMIC API as such - just a way to find a PMIC and the
>> access registers. I think it is useful for that at least.
>
> But that's not very useful in itself, is it? I mean, there's no
> abstraction whatsoever for the PMIC functionality, so all users will
> need to implement direct register accesses, which essentially means
> there's about zero code reuse. So the abstraction is at the wrong point
> in my opinion and the only use-case where I think it would be beneficial
> is if the same PMIC could be used on different interfaces (I2C vs. SPI)
> and therefore the register access abstraction could allow a single
> driver to control both types.

Yes that's right.

>
> I've opted instead to provide an somewhat higher-level API that users
> can call to set voltages on the regulators and enable them.

But then this should use/extend the pmic interface I think, and not
create a parallel one.

Regards,
Simon