Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753126AbcKHQFN (ORCPT ); Tue, 8 Nov 2016 11:05:13 -0500 Received: from hqemgate16.nvidia.com ([216.228.121.65]:8633 "EHLO hqemgate16.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751157AbcKHQFJ (ORCPT ); Tue, 8 Nov 2016 11:05:09 -0500 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Tue, 08 Nov 2016 08:05:07 -0800 Message-ID: <5821F3E6.6020401@nvidia.com> Date: Tue, 8 Nov 2016 21:18:54 +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: Linus Walleij CC: "thierry.reding@gmail.com" , Stephen Warren , Rob Herring , Mark Rutland , Jon Hunter , Masahiro Yamada , "linux-gpio@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-tegra@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH 2/2] pinctrl: tegra: Add driver to configure voltage and power of io pads References: <1478077742-25437-1-git-send-email-ldewangan@nvidia.com> <1478077742-25437-3-git-send-email-ldewangan@nvidia.com> <58201401.8050805@nvidia.com> <5821A6D3.7010000@nvidia.com> <5821D49E.2070308@nvidia.com> In-Reply-To: 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="UTF-8"; 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: 1812 Lines: 43 On Tuesday 08 November 2016 09:16 PM, Linus Walleij wrote: > On Tue, Nov 8, 2016 at 2:35 PM, Laxman Dewangan wrote: > >> There is two types of configuration in given platform, the IO voltage does >> not get change (fixed in given platform) and in some of cases, get change >> dynamically like SDIO3.0 where the voltage switches to 3.3V and 1.8V. >> >> Yes, it can be integrated with the regulator handle and then it can call the >> required configurations through notifier and regulator_get_voltage(). >> But I think it is too much complex for the static configurations. This >> mandate also to populate the regulator handle and all power tree. >> >> The simple way for static configuration (case where voltage does not get >> change), just take the power tree IO voltage from DT and configure the IO >> pad control register. >> >> For dynamic case, there is some sequence need to be followed based on >> voltage direction change (towards lower or towards higher) for the voltage >> change and the IO pad voltage configuration and it is simple to do it from >> client driver. > The devicetree should describe the platform. > > Adding this custom attribute does not describe the platform very > well since the dependency to the corresponding regulator is hidden. > > The point of device tree is not as much to make things simple as > to describe the world properly. > > So to me it is simple: use regulators and phandles. > > It might require a bit of upfront coding but the result will look > much nicer. Oops, I asked same clarification when replying the Thierry's comment. Got answer now.. only via regulator support. I am going to support the IO pad voltage control with regulator only. No custom attribute for this. However, for support for low-power will be same as this patch.