Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965860AbcKXOgs (ORCPT ); Thu, 24 Nov 2016 09:36:48 -0500 Received: from hqemgate14.nvidia.com ([216.228.121.143]:9907 "EHLO hqemgate14.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965821AbcKXOgq (ORCPT ); Thu, 24 Nov 2016 09:36:46 -0500 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Thu, 24 Nov 2016 06:36:44 -0800 Message-ID: <5836F70A.9070109@nvidia.com> Date: Thu, 24 Nov 2016 19:49: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 , Mark Brown CC: Rob Herring , Stephen Warren , "thierry.reding@gmail.com" , Mark Rutland , Alexandre Courbot , "linux-gpio@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-tegra@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Joe Perches , Jon Hunter Subject: Re: [PATCH V3 2/2] pinctrl: tegra: Add driver to configure voltage and power of io pads References: <1479810013-29894-1-git-send-email-ldewangan@nvidia.com> <1479810013-29894-3-git-send-email-ldewangan@nvidia.com> <583580AD.60803@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: 965 Lines: 24 On Thursday 24 November 2016 07:41 PM, Linus Walleij wrote: > On Wed, Nov 23, 2016 at 12:42 PM, Laxman Dewangan wrote: > >> Here, we need the regulator handle which can support the other regulator >> APIs. >> >> In some of platforms, we do not use some of the io-pins and on this case, we >> do not connect the IO rail supply for these pins. So this is like a hardware >> optional. >> >> If the IO pins are used then it need to have the proper regulator handle. >> Missing regulator handle on DT will be like that IO pads are not used. > OK I buy that argument, unless Mark (Brown) has comments. > BTW, I resolved this in different way in V4 which I sent today, if regulator_get() succeed for dummy then regulator_get_voltage() failed and if it failed then assume that it is dummy and just ignore the further handling based on regulator. So when we really need the configuration based on voltage, we must supply the regulator handle.