Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753508AbcDOIhG (ORCPT ); Fri, 15 Apr 2016 04:37:06 -0400 Received: from hqemgate14.nvidia.com ([216.228.121.143]:16209 "EHLO hqemgate14.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750942AbcDOIhB (ORCPT ); Fri, 15 Apr 2016 04:37:01 -0400 X-PGP-Universal: processed; by hqnvupgp08.nvidia.com on Fri, 15 Apr 2016 01:35:10 -0700 Message-ID: <5710A583.2010102@nvidia.com> Date: Fri, 15 Apr 2016 13:55:39 +0530 From: Laxman Dewangan User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: Mark Brown , Linus Walleij CC: Liam Girdwood , Arnd Bergmann , "Olof Johansson" , Stephen Warren , "Thierry Reding" , Alexandre Courbot , "Rob Herring" , Mark Rutland , Jon Hunter , "linux-tegra@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-gpio@vger.kernel.org" , Ulf Hansson Subject: Re: [PATCH 4/7] soc/tegra: pmc: Add interface to set voltage of IO rails References: <1460473007-11535-1-git-send-email-ldewangan@nvidia.com> <1460473007-11535-5-git-send-email-ldewangan@nvidia.com> <20160415080027.GB3217@sirena.org.uk> In-Reply-To: <20160415080027.GB3217@sirena.org.uk> X-Originating-IP: [10.19.65.30] X-ClientProxiedBy: DRHKMAIL103.nvidia.com (10.25.59.17) To bgmail102.nvidia.com (10.25.59.11) Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1790 Lines: 37 On Friday 15 April 2016 01:30 PM, Mark Brown wrote: > * PGP Signed by an unknown key > > On Fri, Apr 15, 2016 at 09:54:34AM +0200, Linus Walleij wrote: >> On Tue, Apr 12, 2016 at 4:56 PM, Laxman Dewangan 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. >> 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 > The above changelog sounds like a regulator consumer not a regulator - > based on what I'm reading there it's a driver that looks at the voltage > being supplied to the device and sets some configuration in the device > based on that voltage. This isn't that unusual for analogue circuits > but it's definitely not something that's actually doing voltage > regulation. Yes, this is not the voltage regulation or supply the voltage and hence can not be in regulator. The IO pads voltage need to be configure by SW based on voltage level on this it is connected. Some of tegra IO pads design like that they do not have auto detect for voltage level and SW needs to explicitly set. Because this is for making IO interface to be proper functioning, I put this in the pin controller rather than some other folder. Other place my be soc/tegra but as the interfaces are from pin control framework, it is here. Hope I have not confused with APIs, tegra_io_rail_voltage_set(). Otherwise, tegra_io_rail_voltage_configure()??