Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1236134yba; Tue, 2 Apr 2019 05:15:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqxAotzBO/jJaipaHOAva/VhWnEKgh3cRZhvb9NjFcErXoloE+RLiuJJISivAznia+4+4stX X-Received: by 2002:a63:e845:: with SMTP id a5mr65947384pgk.246.1554207340872; Tue, 02 Apr 2019 05:15:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554207340; cv=none; d=google.com; s=arc-20160816; b=AKPjasgbFp5pfNxOriPO+/xFxflBELEwxOUOhSSVikLnzraj8vioM0PoFPGZ+5s4kN ep0RsCGjEwcdjt0zeNkiXL13Q+Qs0rvI56SFn4dD+X47EXzYZnxMyrf6mDID2MMCGFY8 bxphAMQ38zWAIzULMpSTEprQDNwCmipsvHXt2XqSmBu7S19hcJr0mJ+p09l9tXScrXEL R6lwET5diplUyD8pzbh6clUQ30Fi5tDOMEp7Uohaf25dVvESF9j3x3otQ8Tbo0fyXnRy Hk/5q58ULWzVWUwf2mp3H4aoxBMnxRTY4YBmEZf9XItg0M9aIVUf3wTeZgPHEgqzLJDH d1iQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=2J8KQu8yjS5ZtPeCDJllDx33ES+eCEH6qt0qOJc6BBc=; b=X+x3D4vvTne/YMs7RF3taWGVTOsrk1nUU+8poTtcXVazddMFY1XdDh7tIrzdi13Tx4 DmE+KHLcL/oufZzYlsj/7wOrQ67HqzBw3oxFb6Ts8IRg1I4M1xqK9NkwRrBD2+1SMJy+ NFaIYYrAEMHtKBIqeQH0XohwulR9p5tptv/1oJuPpSlzAMSFVEHvO/W9Sy/aMo9aJ5bs BY5+Nui5Potucv0yP5xiCE+1Gk0iO8wzBlM1m45aV1I/UhQ8UV42Mr44chkkc1/LUkwE pDKObPeA8qFeWBwhv3NU04e/eMSpMLqEMM6u/G6O3xZ6dNt/ot/r0x6ZnOjUNdXk/2fE +4DQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=NH+xDUnC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bc12si10854633plb.13.2019.04.02.05.15.25; Tue, 02 Apr 2019 05:15:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=NH+xDUnC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729576AbfDBLB7 (ORCPT + 99 others); Tue, 2 Apr 2019 07:01:59 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:56932 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726193AbfDBLB6 (ORCPT ); Tue, 2 Apr 2019 07:01:58 -0400 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id x32B1lNv027810; Tue, 2 Apr 2019 06:01:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1554202907; bh=2J8KQu8yjS5ZtPeCDJllDx33ES+eCEH6qt0qOJc6BBc=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=NH+xDUnCZRuYNrskDtOSrLyXs10E0CBBT3PxayCCJWM0rpD1ozOsqty4zBM3YjxiH In+W3JzymCvmBh6rmb9zRMTZjn/JD6Za0ILJMnOc/lkiia3kbX85jbJoWahYZ25/sO vjSjMEJ78tbmMAb3CaUmUwuy3Fa9LY3gUJErJ19o= Received: from DLEE104.ent.ti.com (dlee104.ent.ti.com [157.170.170.34]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x32B1laa008029 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 2 Apr 2019 06:01:47 -0500 Received: from DLEE113.ent.ti.com (157.170.170.24) by DLEE104.ent.ti.com (157.170.170.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Tue, 2 Apr 2019 06:01:47 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Tue, 2 Apr 2019 06:01:47 -0500 Received: from [172.24.190.172] (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id x32B1hq3024444; Tue, 2 Apr 2019 06:01:44 -0500 Subject: Re: [PATCH v2 4/6] ARM: davinci: omapl138-hawk: add a fixed regulator for ohci-da8xx To: Bartosz Golaszewski , Kevin Hilman , Alan Stern , Greg Kroah-Hartman CC: , , , Bartosz Golaszewski References: <20190329093334.3885-1-brgl@bgdev.pl> <20190329093334.3885-5-brgl@bgdev.pl> From: Sekhar Nori Message-ID: <8346cd90-3558-479b-2129-8ae7915b3bda@ti.com> Date: Tue, 2 Apr 2019 16:31:42 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: <20190329093334.3885-5-brgl@bgdev.pl> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Bart, On 29/03/19 3:03 PM, Bartosz Golaszewski wrote: > From: Bartosz Golaszewski > > Instead of directly using the vbus GPIO we should model it as a fixed > regulator. Add all necessary fix-ups for the regulator to be registered > and configure the vbus GPIO as its enable pin. > > Signed-off-by: Bartosz Golaszewski > --- > arch/arm/mach-davinci/board-omapl138-hawk.c | 49 +++++++++++++++++++-- > 1 file changed, 46 insertions(+), 3 deletions(-) > > diff --git a/arch/arm/mach-davinci/board-omapl138-hawk.c b/arch/arm/mach-davinci/board-omapl138-hawk.c > index e244c8648594..0039b4d4c935 100644 > --- a/arch/arm/mach-davinci/board-omapl138-hawk.c > +++ b/arch/arm/mach-davinci/board-omapl138-hawk.c > @@ -21,6 +21,7 @@ > #include > #include > #include > +#include > #include > > #include > @@ -298,15 +299,50 @@ static const short da850_hawk_usb11_pins[] = { > -1 > }; > > -static struct gpiod_lookup_table hawk_usb_gpio_lookup = { > +static struct regulator_consumer_supply hawk_usb_supplies[] = { > + REGULATOR_SUPPLY("vbus", NULL), > +}; > + > +static struct regulator_init_data hawk_usb_vbus_data = { > + .consumer_supplies = hawk_usb_supplies, > + .num_consumer_supplies = ARRAY_SIZE(hawk_usb_supplies), > +}; > + > +static struct fixed_voltage_config hawk_usb_vbus = { > + .supply_name = "vbus", > + .microvolts = 3300000, > + .init_data = &hawk_usb_vbus_data, > +}; > + > +static struct platform_device hawk_usb_vbus_device = { > + .name = "reg-fixed-voltage", > + .id = 1, Can you explain choice of of 1 for id here? Its the first fixed regulator being registered. Shouldn't it be 0? Thanks, Sekhar