[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMpxmJUaLKUwc1DBvTfDM7h=dYU6CACwRrMz4H6PE+9G5duQ-g@mail.gmail.com>
Date: Tue, 2 Apr 2019 14:00:20 +0200
From: Bartosz Golaszewski <bgolaszewski@...libre.com>
To: Sekhar Nori <nsekhar@...com>
Cc: Bartosz Golaszewski <brgl@...ev.pl>,
Kevin Hilman <khilman@...nel.org>,
Alan Stern <stern@...land.harvard.edu>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
arm-soc <linux-arm-kernel@...ts.infradead.org>,
LKML <linux-kernel@...r.kernel.org>, linux-usb@...r.kernel.org
Subject: Re: [PATCH v2 4/6] ARM: davinci: omapl138-hawk: add a fixed regulator
for ohci-da8xx
wt., 2 kwi 2019 o 13:01 Sekhar Nori <nsekhar@...com> napisaĆ(a):
>
> Hi Bart,
>
> On 29/03/19 3:03 PM, Bartosz Golaszewski wrote:
> > From: Bartosz Golaszewski <bgolaszewski@...libre.com>
> >
> > 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 <bgolaszewski@...libre.com>
> > ---
> > 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 <linux/platform_data/mtd-davinci.h>
> > #include <linux/platform_data/mtd-davinci-aemif.h>
> > #include <linux/platform_data/ti-aemif.h>
> > +#include <linux/regulator/fixed.h>
> > #include <linux/regulator/machine.h>
> >
> > #include <asm/mach-types.h>
> > @@ -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
Good point, I guess you're right. Something for v3 I guess.
Bart
Powered by blists - more mailing lists