Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1226962yba; Tue, 2 Apr 2019 05:05:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqw88I6m3y6eNuP85YwVM22gfQcndSzkqSbdPfb5R6Fs0ojdFiRir/XneRW1dBeeAz2RhjXV X-Received: by 2002:a17:902:1003:: with SMTP id b3mr70726434pla.306.1554206733233; Tue, 02 Apr 2019 05:05:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554206733; cv=none; d=google.com; s=arc-20160816; b=P4RvkbvRk8dhoJ3YE5SGxlWJ0hCDvj6YWr2UAu/8htuej9mnfNtm6+P3TdElQDy60s XfuWwhBUmPGbXnTOKrvHF39c8j68ji5qK2OhmBhXEasqgA4qv2UOYe3WQV5jXgIPZJYx ftH4Me7GCial2VqBLTG2C6Cbi+N4ajX3B5MHqhKAcrrq++/wjMOBq4+f/CxsF9UyKMj0 LRUq+kaX4e63uq0zvnEfkd1YMwB4qdtYlAfnnv7nrCBndU0BZDSGSL6gknWyyYX40PHE AIiiIwlHLQSicWD4uqr6CgYN2A8jc7KzTc700HAyMR8eDVlTQjvd/5CR/srxTfelRb2d SEYw== 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:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=K7hu232ulM7ss/J+eLrdcUTl20KHimcuP8QU4sHhpUg=; b=vrWCZb/ar9aLo2Ji/b2Cpa4x+TonfT9VGhiWZ1ifNZKOclfoG09zEvKntJc/xSOCob klGJEam/OXl7QVHdqSSpj0+lmm60cYiitT9QWefMy6g5ZV7RCymx2ZjCHpNW8yQtJjbU wQk7na31KQFHdsVzGvqAbz4J7dacizPZeeF2enJFzGubF7r1PMOJ/bH7bBZPtT/8U+an kyZDJe8jW07Ph5X5L0dSfgwAmTzF2dDPytC/7YQhhMaLSMvLWm+BhX27c3lDKGZlv0SN kS0d4ge6hQBpoAxtFfmbyS/n48e33wrlq8aymXxQYFdAi8E533bvgCqGBmZKvJXjcPlc RXSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b="AL/2Px3Y"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 11si11435144plb.330.2019.04.02.05.05.17; Tue, 02 Apr 2019 05:05:33 -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=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b="AL/2Px3Y"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730650AbfDBMAb (ORCPT + 99 others); Tue, 2 Apr 2019 08:00:31 -0400 Received: from mail-oi1-f195.google.com ([209.85.167.195]:34737 "EHLO mail-oi1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729605AbfDBMAb (ORCPT ); Tue, 2 Apr 2019 08:00:31 -0400 Received: by mail-oi1-f195.google.com with SMTP id v10so10224736oib.1 for ; Tue, 02 Apr 2019 05:00:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=K7hu232ulM7ss/J+eLrdcUTl20KHimcuP8QU4sHhpUg=; b=AL/2Px3Y5QOlQV6pjlmn0F3v5EDxGvYsC4uywnP9nc1roC/aNW7lmJzm1aKGJUicHc z5vmLgJduhsqtfXbnWykAZWsCrjnszu84IrAMpDIjt8C0xH6w6tpZwDIc8TB/53lzIFg cDXvBSh7Dy3z2bhJauA13qimcuNxthRQC1pFC6UO+ewP1p2X5iwvD6VChuklD2IfMXKM AvV7LWLko/+sTYSP2iGFBykojmgK+uKkdwsreboXENaP9TDxII2MiZZdP7O6E1ViVd3A iquzqN9KSw1KZaFqJVu5Z+K98/up9y2QSOlxqgmWpRN6W+jaHUpBftmAmKCc9atp0zvy D8CA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=K7hu232ulM7ss/J+eLrdcUTl20KHimcuP8QU4sHhpUg=; b=R/zXnPkWo9ewmjCVorF83g9nciB0rz0fz/zGJJ1gi2N5U+/JSJFW7/4dddTX4RAZpS zJl39wG6ASwuqddteGoh1VABXCt6BX/MoTr/hGs8HDW8T2R5ALXfHsaFypbITTrEp2N4 Eqf5gQAoNrFNw22kchwzgYXA3FBhldKCYADm5HAZXyq4vENyvbEkHuSNUiWekpAOb8hI 92Rq7krX5MZFMCyTJkM/yc+GEundbayEl8H2ik6XcOHuGndMwrRCwlq80QrW26W9tGqd q7Xf0D1MI+TGTwI9D5R0b+BqgZvR3tJUZsbtzFQC2BvthwYS6QgD37KPwEKftxHLVfK0 1mHg== X-Gm-Message-State: APjAAAVG7RC5ykLGtsTg8bE4MEM1lV/BjmzL7SC6p/zQ6WaxQXCXZGBz HAzEKGPD7UlTRmFyZTaNFDRNn4KzkOMF1YS1olbRTw== X-Received: by 2002:aca:4c88:: with SMTP id z130mr16737743oia.170.1554206430753; Tue, 02 Apr 2019 05:00:30 -0700 (PDT) MIME-Version: 1.0 References: <20190329093334.3885-1-brgl@bgdev.pl> <20190329093334.3885-5-brgl@bgdev.pl> <8346cd90-3558-479b-2129-8ae7915b3bda@ti.com> In-Reply-To: <8346cd90-3558-479b-2129-8ae7915b3bda@ti.com> From: Bartosz Golaszewski Date: Tue, 2 Apr 2019 14:00:20 +0200 Message-ID: Subject: Re: [PATCH v2 4/6] ARM: davinci: omapl138-hawk: add a fixed regulator for ohci-da8xx To: Sekhar Nori Cc: Bartosz Golaszewski , Kevin Hilman , Alan Stern , Greg Kroah-Hartman , arm-soc , LKML , linux-usb@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org wt., 2 kwi 2019 o 13:01 Sekhar Nori napisa=C5=82(a): > > 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/mac= h-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[] =3D { > > -1 > > }; > > > > -static struct gpiod_lookup_table hawk_usb_gpio_lookup =3D { > > +static struct regulator_consumer_supply hawk_usb_supplies[] =3D { > > + REGULATOR_SUPPLY("vbus", NULL), > > +}; > > + > > +static struct regulator_init_data hawk_usb_vbus_data =3D { > > + .consumer_supplies =3D hawk_usb_supplies, > > + .num_consumer_supplies =3D ARRAY_SIZE(hawk_usb_supplies), > > +}; > > + > > +static struct fixed_voltage_config hawk_usb_vbus =3D { > > + .supply_name =3D "vbus", > > + .microvolts =3D 3300000, > > + .init_data =3D &hawk_usb_vbus_data, > > +}; > > + > > +static struct platform_device hawk_usb_vbus_device =3D { > > + .name =3D "reg-fixed-voltage", > > + .id =3D 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 Good point, I guess you're right. Something for v3 I guess. Bart