From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Glass Date: Fri, 22 Aug 2014 14:12:19 -0600 Subject: [U-Boot] [PATCH 23/23] ARM: tegra: Enable PCIe on Jetson TK1 In-Reply-To: <20140822194030.GB31506@ulmo> References: <1408346196-30419-1-git-send-email-thierry.reding@gmail.com> <1408346196-30419-24-git-send-email-thierry.reding@gmail.com> <53F4EE37.3020003@wwwdotorg.org> <20140822120943.GA15686@ulmo> <20140822194030.GB31506@ulmo> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Thierry, On 22 August 2014 13:40, Thierry Reding wrote: > On Fri, Aug 22, 2014 at 01:27:57PM -0600, Simon Glass wrote: >> On 22 August 2014 06:09, Thierry Reding 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