Re: [PATCH V3 2/2] mfd: Add ROHM BD9571MWV-M MFD PMIC driver

2017-07-17 Thread Marek Vasut
On 07/10/2017 05:33 PM, Geert Uytterhoeven wrote:
> Hi Marek,
> 
> On Tue, May 2, 2017 at 2:18 PM, Marek Vasut  wrote:
>> Add the MFD part of the ROHM BD9571MWV-M PMIC driver and MAINTAINERS
>> entry. The MFD part only specifies the regmap bits for the PMIC and
>> binds the subdevs together.
>>
>> Signed-off-by: Marek Vasut 
>> Cc: linux-ker...@vger.kernel.org
>> Cc: Geert Uytterhoeven 
>> Cc: Lee Jones 
> 
>> --- a/drivers/mfd/Kconfig
>> +++ b/drivers/mfd/Kconfig
>> @@ -133,6 +133,19 @@ config MFD_BCM590XX
>> help
>>   Support for the BCM590xx PMUs from Broadcom
>>
>> +config MFD_BD9571MWV
>> +   tristate "ROHM BD9571MWV PMIC"
>> +   select MFD_CORE
>> +   select REGMAP_I2C
> 
> Missing "select REGMAP_IRQ".
> 
> Else it fails with:

Added

-- 
Best regards,
Marek Vasut


Re: [PATCH V3 2/2] mfd: Add ROHM BD9571MWV-M MFD PMIC driver

2017-07-10 Thread Geert Uytterhoeven
Hi Marek,

On Tue, May 2, 2017 at 2:18 PM, Marek Vasut  wrote:
> Add the MFD part of the ROHM BD9571MWV-M PMIC driver and MAINTAINERS
> entry. The MFD part only specifies the regmap bits for the PMIC and
> binds the subdevs together.
>
> Signed-off-by: Marek Vasut 
> Cc: linux-ker...@vger.kernel.org
> Cc: Geert Uytterhoeven 
> Cc: Lee Jones 

> --- a/drivers/mfd/Kconfig
> +++ b/drivers/mfd/Kconfig
> @@ -133,6 +133,19 @@ config MFD_BCM590XX
> help
>   Support for the BCM590xx PMUs from Broadcom
>
> +config MFD_BD9571MWV
> +   tristate "ROHM BD9571MWV PMIC"
> +   select MFD_CORE
> +   select REGMAP_I2C

Missing "select REGMAP_IRQ".

Else it fails with:

drivers/built-in.o: In function `bd9571mwv_remove':
:(.text+0x103190): undefined reference to `regmap_del_irq_chip'
drivers/built-in.o: In function `bd9571mwv_probe':
:(.text+0x10332c): undefined reference to `regmap_add_irq_chip'
:(.text+0x103358): undefined reference to `regmap_irq_get_domain'
:(.text+0x103394): undefined reference to `regmap_del_irq_chip'

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds


Re: [PATCH V3 2/2] mfd: Add ROHM BD9571MWV-M MFD PMIC driver

2017-07-03 Thread Lee Jones
On Mon, 03 Jul 2017, Marek Vasut wrote:

> On 07/03/2017 03:48 PM, Lee Jones wrote:
> > On Mon, 03 Jul 2017, Marek Vasut wrote:
> > 
> >> On 07/03/2017 01:55 PM, Lee Jones wrote:
> >>> On Tue, 27 Jun 2017, Marek Vasut wrote:
> >>>
>  On 05/02/2017 02:18 PM, Marek Vasut wrote:
> > Add the MFD part of the ROHM BD9571MWV-M PMIC driver and MAINTAINERS
> > entry. The MFD part only specifies the regmap bits for the PMIC and
> > binds the subdevs together.
> >
> > Signed-off-by: Marek Vasut 
> > Cc: linux-ker...@vger.kernel.org
> > Cc: Geert Uytterhoeven 
> > Cc: Lee Jones 
> 
>  Lee, bump, do you plan to apply these patches anytime soon ?
> >>>
> >>> Looks like these were missed for some reason.
> >>
> >> Yes, they missed the previous merge window for some reason too, while
> >> the rest of the patches from the set made it in. It'd be real nice if
> >> they made it into the 4.13 ...
> > 
> > They won't.  The merge window is already open.
> > 
> > You're looking at v4.14 now.
> 
> So the rest of the patches made it into 4.12 and the MFD bit will make
> it into 4.14 ... why precisely ?

Mark applied the regulator patch before I was even aware the patch-set
existed.  The first patch you sent to me was on the 24th of April.  I
guess you forgot to Cc me on patches originating before that date?
The v4.12 merge-window opened on the 30th of April, so your patch
missed the deadline.

Linus applied the GPIO patch to the v4.12 -rcs.  He shouldn't have
done that really, but justified it well enough.  I could not apply the
MFD patch at this time because RobH still had review comments
outstanding.

You sent v3 on the 2nd May whilst we were at -rc5.  Since this is
late in the cycle, there is a chance for patches to be applied, but
that is not guaranteed.  Unfortunately for you this also coincided
with my vacation.  You sent a bump 5 days before the merge window was
about it open, which is way too late in the cycle to be applying
patches.

Unfortunately on this occasion, you were a victim of circumstance and
poor timing.

1.5 cycles to have your patches applied is still perfectly
acceptable.  Especially after 3 revisions.

> >>> I'll put them back on the pile for review.
> >>>
> >>> Please note that the merge window is currently open, so you are likely
> >>> to experience a period of inactivity until -rc1 is released.
> >>
> >> I'd really appreciate it if these patches made it into the 4.13 release,
> >> see above.
> >>
> > ---
> > V2: - Change BD9571MWV_AVS_VD09_VID0,1,2,3 to BD9571MWV_AVS_VD09_VID(n)
> > - Change BD9571MWV_AVS_DVFS_VID0,1,2,3 to BD9571MWV_AVS_DVFS_VID(n)
> > - Make the AVS_VD09 range RW, so it can be used by the regulator
> >   driver for the VD09 regulator
> > - Report the regmap read return values when attempting to read ID
> >   registers fails
> > V3: No change
> > ---
> >  MAINTAINERS   |  11 ++
> >  drivers/mfd/Kconfig   |  13 +++
> >  drivers/mfd/Makefile  |   1 +
> >  drivers/mfd/bd9571mwv.c   | 230 
> > ++
> >  include/linux/mfd/bd9571mwv.h | 115 +
> >  5 files changed, 370 insertions(+)
> >  create mode 100644 drivers/mfd/bd9571mwv.c
> >  create mode 100644 include/linux/mfd/bd9571mwv.h
> >
> > diff --git a/MAINTAINERS b/MAINTAINERS
> > index 2a9aa4be5846..9c30e6b00358 100644
> > --- a/MAINTAINERS
> > +++ b/MAINTAINERS
> > @@ -10942,6 +10942,17 @@ L: linux-ser...@vger.kernel.org
> >  S: Odd Fixes
> >  F: drivers/tty/serial/rp2.*
> >  
> > +ROHM MULTIFUNCTION BD9571MWV-M PMIC DEVICE DRIVERS
> > +M: Marek Vasut 
> > +L: linux-ker...@vger.kernel.org
> > +L: linux-renesas-soc@vger.kernel.org
> > +S: Supported
> > +F: drivers/mfd/bd9571mwv.c
> > +F: drivers/regulator/bd9571mwv-regulator.c
> > +F: drivers/gpio/gpio-bd9571mwv.c
> > +F: include/linux/mfd/bd9571mwv.h
> > +F: Documentation/devicetree/bindings/mfd/bd9571mwv.txt
> > +
> >  ROSE NETWORK LAYER
> >  M: Ralf Baechle 
> >  L: linux-h...@vger.kernel.org
> > diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
> > index 3eb5c93595f6..6f4668ae28cc 100644
> > --- a/drivers/mfd/Kconfig
> > +++ b/drivers/mfd/Kconfig
> > @@ -133,6 +133,19 @@ config MFD_BCM590XX
> > help
> >   Support for the BCM590xx PMUs from Broadcom
> >  
> > +config MFD_BD9571MWV
> > +   tristate "ROHM BD9571MWV PMIC"
> > +   select MFD_CORE
> > +   select REGMAP_I2C
> > +   depends on I2C
> > +   help
> > + Support for the ROHM BD9571MWV PMIC, which contains single
> > +  

Re: [PATCH V3 2/2] mfd: Add ROHM BD9571MWV-M MFD PMIC driver

2017-07-03 Thread Marek Vasut
On 07/03/2017 03:48 PM, Lee Jones wrote:
> On Mon, 03 Jul 2017, Marek Vasut wrote:
> 
>> On 07/03/2017 01:55 PM, Lee Jones wrote:
>>> On Tue, 27 Jun 2017, Marek Vasut wrote:
>>>
 On 05/02/2017 02:18 PM, Marek Vasut wrote:
> Add the MFD part of the ROHM BD9571MWV-M PMIC driver and MAINTAINERS
> entry. The MFD part only specifies the regmap bits for the PMIC and
> binds the subdevs together.
>
> Signed-off-by: Marek Vasut 
> Cc: linux-ker...@vger.kernel.org
> Cc: Geert Uytterhoeven 
> Cc: Lee Jones 

 Lee, bump, do you plan to apply these patches anytime soon ?
>>>
>>> Looks like these were missed for some reason.
>>
>> Yes, they missed the previous merge window for some reason too, while
>> the rest of the patches from the set made it in. It'd be real nice if
>> they made it into the 4.13 ...
> 
> They won't.  The merge window is already open.
> 
> You're looking at v4.14 now.

So the rest of the patches made it into 4.12 and the MFD bit will make
it into 4.14 ... why precisely ?

>>> I'll put them back on the pile for review.
>>>
>>> Please note that the merge window is currently open, so you are likely
>>> to experience a period of inactivity until -rc1 is released.
>>
>> I'd really appreciate it if these patches made it into the 4.13 release,
>> see above.
>>
> ---
> V2: - Change BD9571MWV_AVS_VD09_VID0,1,2,3 to BD9571MWV_AVS_VD09_VID(n)
> - Change BD9571MWV_AVS_DVFS_VID0,1,2,3 to BD9571MWV_AVS_DVFS_VID(n)
> - Make the AVS_VD09 range RW, so it can be used by the regulator
>   driver for the VD09 regulator
> - Report the regmap read return values when attempting to read ID
>   registers fails
> V3: No change
> ---
>  MAINTAINERS   |  11 ++
>  drivers/mfd/Kconfig   |  13 +++
>  drivers/mfd/Makefile  |   1 +
>  drivers/mfd/bd9571mwv.c   | 230 
> ++
>  include/linux/mfd/bd9571mwv.h | 115 +
>  5 files changed, 370 insertions(+)
>  create mode 100644 drivers/mfd/bd9571mwv.c
>  create mode 100644 include/linux/mfd/bd9571mwv.h
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 2a9aa4be5846..9c30e6b00358 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -10942,6 +10942,17 @@ L:   linux-ser...@vger.kernel.org
>  S:   Odd Fixes
>  F:   drivers/tty/serial/rp2.*
>  
> +ROHM MULTIFUNCTION BD9571MWV-M PMIC DEVICE DRIVERS
> +M:   Marek Vasut 
> +L:   linux-ker...@vger.kernel.org
> +L:   linux-renesas-soc@vger.kernel.org
> +S:   Supported
> +F:   drivers/mfd/bd9571mwv.c
> +F:   drivers/regulator/bd9571mwv-regulator.c
> +F:   drivers/gpio/gpio-bd9571mwv.c
> +F:   include/linux/mfd/bd9571mwv.h
> +F:   Documentation/devicetree/bindings/mfd/bd9571mwv.txt
> +
>  ROSE NETWORK LAYER
>  M:   Ralf Baechle 
>  L:   linux-h...@vger.kernel.org
> diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
> index 3eb5c93595f6..6f4668ae28cc 100644
> --- a/drivers/mfd/Kconfig
> +++ b/drivers/mfd/Kconfig
> @@ -133,6 +133,19 @@ config MFD_BCM590XX
>   help
> Support for the BCM590xx PMUs from Broadcom
>  
> +config MFD_BD9571MWV
> + tristate "ROHM BD9571MWV PMIC"
> + select MFD_CORE
> + select REGMAP_I2C
> + depends on I2C
> + help
> +   Support for the ROHM BD9571MWV PMIC, which contains single
> +   voltage regulator, voltage sampling units, GPIO block and
> +   watchdog block.
> +
> +   This driver can also be built as a module. If so, the module
> +   will be called bd9571mwv.
> +
>  config MFD_AC100
>   tristate "X-Powers AC100"
>   select MFD_CORE
> diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile
> index c16bf1ea0ea9..3cacc9748e13 100644
> --- a/drivers/mfd/Makefile
> +++ b/drivers/mfd/Makefile
> @@ -10,6 +10,7 @@ obj-$(CONFIG_MFD_ACT8945A)  += act8945a.o
>  obj-$(CONFIG_MFD_SM501)  += sm501.o
>  obj-$(CONFIG_MFD_ASIC3)  += asic3.o tmio_core.o
>  obj-$(CONFIG_MFD_BCM590XX)   += bcm590xx.o
> +obj-$(CONFIG_MFD_BD9571MWV)  += bd9571mwv.o
>  cros_ec_core-objs:= cros_ec.o
>  cros_ec_core-$(CONFIG_ACPI)  += cros_ec_acpi_gpe.o
>  obj-$(CONFIG_MFD_CROS_EC)+= cros_ec_core.o
> diff --git a/drivers/mfd/bd9571mwv.c b/drivers/mfd/bd9571mwv.c
> new file mode 100644
> index ..64e088dfe7b0
> --- /dev/null
> +++ b/drivers/mfd/bd9571mwv.c
> @@ -0,0 +1,230 @@
> +/*
> + * ROHM BD9571MWV-M MFD driver
> + *
> + * Copyright (C) 2017 Marek Vasut 
> + *
> + * 

Re: [PATCH V3 2/2] mfd: Add ROHM BD9571MWV-M MFD PMIC driver

2017-07-03 Thread Lee Jones
On Mon, 03 Jul 2017, Marek Vasut wrote:

> On 07/03/2017 01:55 PM, Lee Jones wrote:
> > On Tue, 27 Jun 2017, Marek Vasut wrote:
> > 
> >> On 05/02/2017 02:18 PM, Marek Vasut wrote:
> >>> Add the MFD part of the ROHM BD9571MWV-M PMIC driver and MAINTAINERS
> >>> entry. The MFD part only specifies the regmap bits for the PMIC and
> >>> binds the subdevs together.
> >>>
> >>> Signed-off-by: Marek Vasut 
> >>> Cc: linux-ker...@vger.kernel.org
> >>> Cc: Geert Uytterhoeven 
> >>> Cc: Lee Jones 
> >>
> >> Lee, bump, do you plan to apply these patches anytime soon ?
> > 
> > Looks like these were missed for some reason.
> 
> Yes, they missed the previous merge window for some reason too, while
> the rest of the patches from the set made it in. It'd be real nice if
> they made it into the 4.13 ...

They won't.  The merge window is already open.

You're looking at v4.14 now.

> > I'll put them back on the pile for review.
> > 
> > Please note that the merge window is currently open, so you are likely
> > to experience a period of inactivity until -rc1 is released.
> 
> I'd really appreciate it if these patches made it into the 4.13 release,
> see above.
> 
> >>> ---
> >>> V2: - Change BD9571MWV_AVS_VD09_VID0,1,2,3 to BD9571MWV_AVS_VD09_VID(n)
> >>> - Change BD9571MWV_AVS_DVFS_VID0,1,2,3 to BD9571MWV_AVS_DVFS_VID(n)
> >>> - Make the AVS_VD09 range RW, so it can be used by the regulator
> >>>   driver for the VD09 regulator
> >>> - Report the regmap read return values when attempting to read ID
> >>>   registers fails
> >>> V3: No change
> >>> ---
> >>>  MAINTAINERS   |  11 ++
> >>>  drivers/mfd/Kconfig   |  13 +++
> >>>  drivers/mfd/Makefile  |   1 +
> >>>  drivers/mfd/bd9571mwv.c   | 230 
> >>> ++
> >>>  include/linux/mfd/bd9571mwv.h | 115 +
> >>>  5 files changed, 370 insertions(+)
> >>>  create mode 100644 drivers/mfd/bd9571mwv.c
> >>>  create mode 100644 include/linux/mfd/bd9571mwv.h
> >>>
> >>> diff --git a/MAINTAINERS b/MAINTAINERS
> >>> index 2a9aa4be5846..9c30e6b00358 100644
> >>> --- a/MAINTAINERS
> >>> +++ b/MAINTAINERS
> >>> @@ -10942,6 +10942,17 @@ L:   linux-ser...@vger.kernel.org
> >>>  S:   Odd Fixes
> >>>  F:   drivers/tty/serial/rp2.*
> >>>  
> >>> +ROHM MULTIFUNCTION BD9571MWV-M PMIC DEVICE DRIVERS
> >>> +M:   Marek Vasut 
> >>> +L:   linux-ker...@vger.kernel.org
> >>> +L:   linux-renesas-soc@vger.kernel.org
> >>> +S:   Supported
> >>> +F:   drivers/mfd/bd9571mwv.c
> >>> +F:   drivers/regulator/bd9571mwv-regulator.c
> >>> +F:   drivers/gpio/gpio-bd9571mwv.c
> >>> +F:   include/linux/mfd/bd9571mwv.h
> >>> +F:   Documentation/devicetree/bindings/mfd/bd9571mwv.txt
> >>> +
> >>>  ROSE NETWORK LAYER
> >>>  M:   Ralf Baechle 
> >>>  L:   linux-h...@vger.kernel.org
> >>> diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
> >>> index 3eb5c93595f6..6f4668ae28cc 100644
> >>> --- a/drivers/mfd/Kconfig
> >>> +++ b/drivers/mfd/Kconfig
> >>> @@ -133,6 +133,19 @@ config MFD_BCM590XX
> >>>   help
> >>> Support for the BCM590xx PMUs from Broadcom
> >>>  
> >>> +config MFD_BD9571MWV
> >>> + tristate "ROHM BD9571MWV PMIC"
> >>> + select MFD_CORE
> >>> + select REGMAP_I2C
> >>> + depends on I2C
> >>> + help
> >>> +   Support for the ROHM BD9571MWV PMIC, which contains single
> >>> +   voltage regulator, voltage sampling units, GPIO block and
> >>> +   watchdog block.
> >>> +
> >>> +   This driver can also be built as a module. If so, the module
> >>> +   will be called bd9571mwv.
> >>> +
> >>>  config MFD_AC100
> >>>   tristate "X-Powers AC100"
> >>>   select MFD_CORE
> >>> diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile
> >>> index c16bf1ea0ea9..3cacc9748e13 100644
> >>> --- a/drivers/mfd/Makefile
> >>> +++ b/drivers/mfd/Makefile
> >>> @@ -10,6 +10,7 @@ obj-$(CONFIG_MFD_ACT8945A)  += act8945a.o
> >>>  obj-$(CONFIG_MFD_SM501)  += sm501.o
> >>>  obj-$(CONFIG_MFD_ASIC3)  += asic3.o tmio_core.o
> >>>  obj-$(CONFIG_MFD_BCM590XX)   += bcm590xx.o
> >>> +obj-$(CONFIG_MFD_BD9571MWV)  += bd9571mwv.o
> >>>  cros_ec_core-objs:= cros_ec.o
> >>>  cros_ec_core-$(CONFIG_ACPI)  += cros_ec_acpi_gpe.o
> >>>  obj-$(CONFIG_MFD_CROS_EC)+= cros_ec_core.o
> >>> diff --git a/drivers/mfd/bd9571mwv.c b/drivers/mfd/bd9571mwv.c
> >>> new file mode 100644
> >>> index ..64e088dfe7b0
> >>> --- /dev/null
> >>> +++ b/drivers/mfd/bd9571mwv.c
> >>> @@ -0,0 +1,230 @@
> >>> +/*
> >>> + * ROHM BD9571MWV-M MFD driver
> >>> + *
> >>> + * Copyright (C) 2017 Marek Vasut 
> >>> + *
> >>> + * This program is free software; you can redistribute it and/or
> >>> + * modify it under the terms of the GNU General Public License version 2 
> >>> as
> >>> + * 

Re: [PATCH V3 2/2] mfd: Add ROHM BD9571MWV-M MFD PMIC driver

2017-07-03 Thread Marek Vasut
On 07/03/2017 01:55 PM, Lee Jones wrote:
> On Tue, 27 Jun 2017, Marek Vasut wrote:
> 
>> On 05/02/2017 02:18 PM, Marek Vasut wrote:
>>> Add the MFD part of the ROHM BD9571MWV-M PMIC driver and MAINTAINERS
>>> entry. The MFD part only specifies the regmap bits for the PMIC and
>>> binds the subdevs together.
>>>
>>> Signed-off-by: Marek Vasut 
>>> Cc: linux-ker...@vger.kernel.org
>>> Cc: Geert Uytterhoeven 
>>> Cc: Lee Jones 
>>
>> Lee, bump, do you plan to apply these patches anytime soon ?
> 
> Looks like these were missed for some reason.

Yes, they missed the previous merge window for some reason too, while
the rest of the patches from the set made it in. It'd be real nice if
they made it into the 4.13 ...

> I'll put them back on the pile for review.
> 
> Please note that the merge window is currently open, so you are likely
> to experience a period of inactivity until -rc1 is released.

I'd really appreciate it if these patches made it into the 4.13 release,
see above.

>>> ---
>>> V2: - Change BD9571MWV_AVS_VD09_VID0,1,2,3 to BD9571MWV_AVS_VD09_VID(n)
>>> - Change BD9571MWV_AVS_DVFS_VID0,1,2,3 to BD9571MWV_AVS_DVFS_VID(n)
>>> - Make the AVS_VD09 range RW, so it can be used by the regulator
>>>   driver for the VD09 regulator
>>> - Report the regmap read return values when attempting to read ID
>>>   registers fails
>>> V3: No change
>>> ---
>>>  MAINTAINERS   |  11 ++
>>>  drivers/mfd/Kconfig   |  13 +++
>>>  drivers/mfd/Makefile  |   1 +
>>>  drivers/mfd/bd9571mwv.c   | 230 
>>> ++
>>>  include/linux/mfd/bd9571mwv.h | 115 +
>>>  5 files changed, 370 insertions(+)
>>>  create mode 100644 drivers/mfd/bd9571mwv.c
>>>  create mode 100644 include/linux/mfd/bd9571mwv.h
>>>
>>> diff --git a/MAINTAINERS b/MAINTAINERS
>>> index 2a9aa4be5846..9c30e6b00358 100644
>>> --- a/MAINTAINERS
>>> +++ b/MAINTAINERS
>>> @@ -10942,6 +10942,17 @@ L: linux-ser...@vger.kernel.org
>>>  S: Odd Fixes
>>>  F: drivers/tty/serial/rp2.*
>>>  
>>> +ROHM MULTIFUNCTION BD9571MWV-M PMIC DEVICE DRIVERS
>>> +M: Marek Vasut 
>>> +L: linux-ker...@vger.kernel.org
>>> +L: linux-renesas-soc@vger.kernel.org
>>> +S: Supported
>>> +F: drivers/mfd/bd9571mwv.c
>>> +F: drivers/regulator/bd9571mwv-regulator.c
>>> +F: drivers/gpio/gpio-bd9571mwv.c
>>> +F: include/linux/mfd/bd9571mwv.h
>>> +F: Documentation/devicetree/bindings/mfd/bd9571mwv.txt
>>> +
>>>  ROSE NETWORK LAYER
>>>  M: Ralf Baechle 
>>>  L: linux-h...@vger.kernel.org
>>> diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
>>> index 3eb5c93595f6..6f4668ae28cc 100644
>>> --- a/drivers/mfd/Kconfig
>>> +++ b/drivers/mfd/Kconfig
>>> @@ -133,6 +133,19 @@ config MFD_BCM590XX
>>> help
>>>   Support for the BCM590xx PMUs from Broadcom
>>>  
>>> +config MFD_BD9571MWV
>>> +   tristate "ROHM BD9571MWV PMIC"
>>> +   select MFD_CORE
>>> +   select REGMAP_I2C
>>> +   depends on I2C
>>> +   help
>>> + Support for the ROHM BD9571MWV PMIC, which contains single
>>> + voltage regulator, voltage sampling units, GPIO block and
>>> + watchdog block.
>>> +
>>> + This driver can also be built as a module. If so, the module
>>> + will be called bd9571mwv.
>>> +
>>>  config MFD_AC100
>>> tristate "X-Powers AC100"
>>> select MFD_CORE
>>> diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile
>>> index c16bf1ea0ea9..3cacc9748e13 100644
>>> --- a/drivers/mfd/Makefile
>>> +++ b/drivers/mfd/Makefile
>>> @@ -10,6 +10,7 @@ obj-$(CONFIG_MFD_ACT8945A)+= act8945a.o
>>>  obj-$(CONFIG_MFD_SM501)+= sm501.o
>>>  obj-$(CONFIG_MFD_ASIC3)+= asic3.o tmio_core.o
>>>  obj-$(CONFIG_MFD_BCM590XX) += bcm590xx.o
>>> +obj-$(CONFIG_MFD_BD9571MWV)+= bd9571mwv.o
>>>  cros_ec_core-objs  := cros_ec.o
>>>  cros_ec_core-$(CONFIG_ACPI)+= cros_ec_acpi_gpe.o
>>>  obj-$(CONFIG_MFD_CROS_EC)  += cros_ec_core.o
>>> diff --git a/drivers/mfd/bd9571mwv.c b/drivers/mfd/bd9571mwv.c
>>> new file mode 100644
>>> index ..64e088dfe7b0
>>> --- /dev/null
>>> +++ b/drivers/mfd/bd9571mwv.c
>>> @@ -0,0 +1,230 @@
>>> +/*
>>> + * ROHM BD9571MWV-M MFD driver
>>> + *
>>> + * Copyright (C) 2017 Marek Vasut 
>>> + *
>>> + * This program is free software; you can redistribute it and/or
>>> + * modify it under the terms of the GNU General Public License version 2 as
>>> + * published by the Free Software Foundation.
>>> + *
>>> + * This program is distributed "as is" WITHOUT ANY WARRANTY of any
>>> + * kind, whether expressed or implied; without even the implied warranty
>>> + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
>>> + * GNU General Public License version 2 for more details.
>>> + *
>>> + * Based on the TPS65086 driver
>>> + */
>>> +
>>> +#include 
>>> +#include 

Re: [PATCH V3 2/2] mfd: Add ROHM BD9571MWV-M MFD PMIC driver

2017-07-03 Thread Lee Jones
On Tue, 27 Jun 2017, Marek Vasut wrote:

> On 05/02/2017 02:18 PM, Marek Vasut wrote:
> > Add the MFD part of the ROHM BD9571MWV-M PMIC driver and MAINTAINERS
> > entry. The MFD part only specifies the regmap bits for the PMIC and
> > binds the subdevs together.
> > 
> > Signed-off-by: Marek Vasut 
> > Cc: linux-ker...@vger.kernel.org
> > Cc: Geert Uytterhoeven 
> > Cc: Lee Jones 
> 
> Lee, bump, do you plan to apply these patches anytime soon ?

Looks like these were missed for some reason.

I'll put them back on the pile for review.

Please note that the merge window is currently open, so you are likely
to experience a period of inactivity until -rc1 is released.

> > ---
> > V2: - Change BD9571MWV_AVS_VD09_VID0,1,2,3 to BD9571MWV_AVS_VD09_VID(n)
> > - Change BD9571MWV_AVS_DVFS_VID0,1,2,3 to BD9571MWV_AVS_DVFS_VID(n)
> > - Make the AVS_VD09 range RW, so it can be used by the regulator
> >   driver for the VD09 regulator
> > - Report the regmap read return values when attempting to read ID
> >   registers fails
> > V3: No change
> > ---
> >  MAINTAINERS   |  11 ++
> >  drivers/mfd/Kconfig   |  13 +++
> >  drivers/mfd/Makefile  |   1 +
> >  drivers/mfd/bd9571mwv.c   | 230 
> > ++
> >  include/linux/mfd/bd9571mwv.h | 115 +
> >  5 files changed, 370 insertions(+)
> >  create mode 100644 drivers/mfd/bd9571mwv.c
> >  create mode 100644 include/linux/mfd/bd9571mwv.h
> > 
> > diff --git a/MAINTAINERS b/MAINTAINERS
> > index 2a9aa4be5846..9c30e6b00358 100644
> > --- a/MAINTAINERS
> > +++ b/MAINTAINERS
> > @@ -10942,6 +10942,17 @@ L: linux-ser...@vger.kernel.org
> >  S: Odd Fixes
> >  F: drivers/tty/serial/rp2.*
> >  
> > +ROHM MULTIFUNCTION BD9571MWV-M PMIC DEVICE DRIVERS
> > +M: Marek Vasut 
> > +L: linux-ker...@vger.kernel.org
> > +L: linux-renesas-soc@vger.kernel.org
> > +S: Supported
> > +F: drivers/mfd/bd9571mwv.c
> > +F: drivers/regulator/bd9571mwv-regulator.c
> > +F: drivers/gpio/gpio-bd9571mwv.c
> > +F: include/linux/mfd/bd9571mwv.h
> > +F: Documentation/devicetree/bindings/mfd/bd9571mwv.txt
> > +
> >  ROSE NETWORK LAYER
> >  M: Ralf Baechle 
> >  L: linux-h...@vger.kernel.org
> > diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
> > index 3eb5c93595f6..6f4668ae28cc 100644
> > --- a/drivers/mfd/Kconfig
> > +++ b/drivers/mfd/Kconfig
> > @@ -133,6 +133,19 @@ config MFD_BCM590XX
> > help
> >   Support for the BCM590xx PMUs from Broadcom
> >  
> > +config MFD_BD9571MWV
> > +   tristate "ROHM BD9571MWV PMIC"
> > +   select MFD_CORE
> > +   select REGMAP_I2C
> > +   depends on I2C
> > +   help
> > + Support for the ROHM BD9571MWV PMIC, which contains single
> > + voltage regulator, voltage sampling units, GPIO block and
> > + watchdog block.
> > +
> > + This driver can also be built as a module. If so, the module
> > + will be called bd9571mwv.
> > +
> >  config MFD_AC100
> > tristate "X-Powers AC100"
> > select MFD_CORE
> > diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile
> > index c16bf1ea0ea9..3cacc9748e13 100644
> > --- a/drivers/mfd/Makefile
> > +++ b/drivers/mfd/Makefile
> > @@ -10,6 +10,7 @@ obj-$(CONFIG_MFD_ACT8945A)+= act8945a.o
> >  obj-$(CONFIG_MFD_SM501)+= sm501.o
> >  obj-$(CONFIG_MFD_ASIC3)+= asic3.o tmio_core.o
> >  obj-$(CONFIG_MFD_BCM590XX) += bcm590xx.o
> > +obj-$(CONFIG_MFD_BD9571MWV)+= bd9571mwv.o
> >  cros_ec_core-objs  := cros_ec.o
> >  cros_ec_core-$(CONFIG_ACPI)+= cros_ec_acpi_gpe.o
> >  obj-$(CONFIG_MFD_CROS_EC)  += cros_ec_core.o
> > diff --git a/drivers/mfd/bd9571mwv.c b/drivers/mfd/bd9571mwv.c
> > new file mode 100644
> > index ..64e088dfe7b0
> > --- /dev/null
> > +++ b/drivers/mfd/bd9571mwv.c
> > @@ -0,0 +1,230 @@
> > +/*
> > + * ROHM BD9571MWV-M MFD driver
> > + *
> > + * Copyright (C) 2017 Marek Vasut 
> > + *
> > + * This program is free software; you can redistribute it and/or
> > + * modify it under the terms of the GNU General Public License version 2 as
> > + * published by the Free Software Foundation.
> > + *
> > + * This program is distributed "as is" WITHOUT ANY WARRANTY of any
> > + * kind, whether expressed or implied; without even the implied warranty
> > + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> > + * GNU General Public License version 2 for more details.
> > + *
> > + * Based on the TPS65086 driver
> > + */
> > +
> > +#include 
> > +#include 
> > +#include 
> > +#include 
> > +
> > +#include 
> > +
> > +static const struct mfd_cell bd9571mwv_cells[] = {
> > +   { .name = "bd9571mwv-regulator", },
> > +   { .name = "bd9571mwv-gpio", },
> > +};
> > +
> > +static const struct regmap_range bd9571mwv_readable_yes_ranges[] = {
> > +   

Re: [PATCH V3 2/2] mfd: Add ROHM BD9571MWV-M MFD PMIC driver

2017-06-27 Thread Marek Vasut
On 05/02/2017 02:18 PM, Marek Vasut wrote:
> Add the MFD part of the ROHM BD9571MWV-M PMIC driver and MAINTAINERS
> entry. The MFD part only specifies the regmap bits for the PMIC and
> binds the subdevs together.
> 
> Signed-off-by: Marek Vasut 
> Cc: linux-ker...@vger.kernel.org
> Cc: Geert Uytterhoeven 
> Cc: Lee Jones 

Lee, bump, do you plan to apply these patches anytime soon ?

> ---
> V2: - Change BD9571MWV_AVS_VD09_VID0,1,2,3 to BD9571MWV_AVS_VD09_VID(n)
> - Change BD9571MWV_AVS_DVFS_VID0,1,2,3 to BD9571MWV_AVS_DVFS_VID(n)
> - Make the AVS_VD09 range RW, so it can be used by the regulator
>   driver for the VD09 regulator
> - Report the regmap read return values when attempting to read ID
>   registers fails
> V3: No change
> ---
>  MAINTAINERS   |  11 ++
>  drivers/mfd/Kconfig   |  13 +++
>  drivers/mfd/Makefile  |   1 +
>  drivers/mfd/bd9571mwv.c   | 230 
> ++
>  include/linux/mfd/bd9571mwv.h | 115 +
>  5 files changed, 370 insertions(+)
>  create mode 100644 drivers/mfd/bd9571mwv.c
>  create mode 100644 include/linux/mfd/bd9571mwv.h
> 
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 2a9aa4be5846..9c30e6b00358 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -10942,6 +10942,17 @@ L:   linux-ser...@vger.kernel.org
>  S:   Odd Fixes
>  F:   drivers/tty/serial/rp2.*
>  
> +ROHM MULTIFUNCTION BD9571MWV-M PMIC DEVICE DRIVERS
> +M:   Marek Vasut 
> +L:   linux-ker...@vger.kernel.org
> +L:   linux-renesas-soc@vger.kernel.org
> +S:   Supported
> +F:   drivers/mfd/bd9571mwv.c
> +F:   drivers/regulator/bd9571mwv-regulator.c
> +F:   drivers/gpio/gpio-bd9571mwv.c
> +F:   include/linux/mfd/bd9571mwv.h
> +F:   Documentation/devicetree/bindings/mfd/bd9571mwv.txt
> +
>  ROSE NETWORK LAYER
>  M:   Ralf Baechle 
>  L:   linux-h...@vger.kernel.org
> diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
> index 3eb5c93595f6..6f4668ae28cc 100644
> --- a/drivers/mfd/Kconfig
> +++ b/drivers/mfd/Kconfig
> @@ -133,6 +133,19 @@ config MFD_BCM590XX
>   help
> Support for the BCM590xx PMUs from Broadcom
>  
> +config MFD_BD9571MWV
> + tristate "ROHM BD9571MWV PMIC"
> + select MFD_CORE
> + select REGMAP_I2C
> + depends on I2C
> + help
> +   Support for the ROHM BD9571MWV PMIC, which contains single
> +   voltage regulator, voltage sampling units, GPIO block and
> +   watchdog block.
> +
> +   This driver can also be built as a module. If so, the module
> +   will be called bd9571mwv.
> +
>  config MFD_AC100
>   tristate "X-Powers AC100"
>   select MFD_CORE
> diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile
> index c16bf1ea0ea9..3cacc9748e13 100644
> --- a/drivers/mfd/Makefile
> +++ b/drivers/mfd/Makefile
> @@ -10,6 +10,7 @@ obj-$(CONFIG_MFD_ACT8945A)  += act8945a.o
>  obj-$(CONFIG_MFD_SM501)  += sm501.o
>  obj-$(CONFIG_MFD_ASIC3)  += asic3.o tmio_core.o
>  obj-$(CONFIG_MFD_BCM590XX)   += bcm590xx.o
> +obj-$(CONFIG_MFD_BD9571MWV)  += bd9571mwv.o
>  cros_ec_core-objs:= cros_ec.o
>  cros_ec_core-$(CONFIG_ACPI)  += cros_ec_acpi_gpe.o
>  obj-$(CONFIG_MFD_CROS_EC)+= cros_ec_core.o
> diff --git a/drivers/mfd/bd9571mwv.c b/drivers/mfd/bd9571mwv.c
> new file mode 100644
> index ..64e088dfe7b0
> --- /dev/null
> +++ b/drivers/mfd/bd9571mwv.c
> @@ -0,0 +1,230 @@
> +/*
> + * ROHM BD9571MWV-M MFD driver
> + *
> + * Copyright (C) 2017 Marek Vasut 
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> + *
> + * This program is distributed "as is" WITHOUT ANY WARRANTY of any
> + * kind, whether expressed or implied; without even the implied warranty
> + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + * GNU General Public License version 2 for more details.
> + *
> + * Based on the TPS65086 driver
> + */
> +
> +#include 
> +#include 
> +#include 
> +#include 
> +
> +#include 
> +
> +static const struct mfd_cell bd9571mwv_cells[] = {
> + { .name = "bd9571mwv-regulator", },
> + { .name = "bd9571mwv-gpio", },
> +};
> +
> +static const struct regmap_range bd9571mwv_readable_yes_ranges[] = {
> + regmap_reg_range(BD9571MWV_VENDOR_CODE, BD9571MWV_PRODUCT_REVISION),
> + regmap_reg_range(BD9571MWV_AVS_SET_MONI, BD9571MWV_AVS_DVFS_VID(3)),
> + regmap_reg_range(BD9571MWV_VD18_VID, BD9571MWV_VD33_VID),
> + regmap_reg_range(BD9571MWV_DVFS_VINIT, BD9571MWV_DVFS_VINIT),
> + regmap_reg_range(BD9571MWV_DVFS_SETVMAX, BD9571MWV_DVFS_MONIVDAC),
> + regmap_reg_range(BD9571MWV_GPIO_IN, BD9571MWV_GPIO_IN),
> + regmap_reg_range(BD9571MWV_GPIO_INT, 

[PATCH V3 2/2] mfd: Add ROHM BD9571MWV-M MFD PMIC driver

2017-05-02 Thread Marek Vasut
Add the MFD part of the ROHM BD9571MWV-M PMIC driver and MAINTAINERS
entry. The MFD part only specifies the regmap bits for the PMIC and
binds the subdevs together.

Signed-off-by: Marek Vasut 
Cc: linux-ker...@vger.kernel.org
Cc: Geert Uytterhoeven 
Cc: Lee Jones 
---
V2: - Change BD9571MWV_AVS_VD09_VID0,1,2,3 to BD9571MWV_AVS_VD09_VID(n)
- Change BD9571MWV_AVS_DVFS_VID0,1,2,3 to BD9571MWV_AVS_DVFS_VID(n)
- Make the AVS_VD09 range RW, so it can be used by the regulator
  driver for the VD09 regulator
- Report the regmap read return values when attempting to read ID
  registers fails
V3: No change
---
 MAINTAINERS   |  11 ++
 drivers/mfd/Kconfig   |  13 +++
 drivers/mfd/Makefile  |   1 +
 drivers/mfd/bd9571mwv.c   | 230 ++
 include/linux/mfd/bd9571mwv.h | 115 +
 5 files changed, 370 insertions(+)
 create mode 100644 drivers/mfd/bd9571mwv.c
 create mode 100644 include/linux/mfd/bd9571mwv.h

diff --git a/MAINTAINERS b/MAINTAINERS
index 2a9aa4be5846..9c30e6b00358 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -10942,6 +10942,17 @@ L: linux-ser...@vger.kernel.org
 S: Odd Fixes
 F: drivers/tty/serial/rp2.*
 
+ROHM MULTIFUNCTION BD9571MWV-M PMIC DEVICE DRIVERS
+M: Marek Vasut 
+L: linux-ker...@vger.kernel.org
+L: linux-renesas-soc@vger.kernel.org
+S: Supported
+F: drivers/mfd/bd9571mwv.c
+F: drivers/regulator/bd9571mwv-regulator.c
+F: drivers/gpio/gpio-bd9571mwv.c
+F: include/linux/mfd/bd9571mwv.h
+F: Documentation/devicetree/bindings/mfd/bd9571mwv.txt
+
 ROSE NETWORK LAYER
 M: Ralf Baechle 
 L: linux-h...@vger.kernel.org
diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
index 3eb5c93595f6..6f4668ae28cc 100644
--- a/drivers/mfd/Kconfig
+++ b/drivers/mfd/Kconfig
@@ -133,6 +133,19 @@ config MFD_BCM590XX
help
  Support for the BCM590xx PMUs from Broadcom
 
+config MFD_BD9571MWV
+   tristate "ROHM BD9571MWV PMIC"
+   select MFD_CORE
+   select REGMAP_I2C
+   depends on I2C
+   help
+ Support for the ROHM BD9571MWV PMIC, which contains single
+ voltage regulator, voltage sampling units, GPIO block and
+ watchdog block.
+
+ This driver can also be built as a module. If so, the module
+ will be called bd9571mwv.
+
 config MFD_AC100
tristate "X-Powers AC100"
select MFD_CORE
diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile
index c16bf1ea0ea9..3cacc9748e13 100644
--- a/drivers/mfd/Makefile
+++ b/drivers/mfd/Makefile
@@ -10,6 +10,7 @@ obj-$(CONFIG_MFD_ACT8945A)+= act8945a.o
 obj-$(CONFIG_MFD_SM501)+= sm501.o
 obj-$(CONFIG_MFD_ASIC3)+= asic3.o tmio_core.o
 obj-$(CONFIG_MFD_BCM590XX) += bcm590xx.o
+obj-$(CONFIG_MFD_BD9571MWV)+= bd9571mwv.o
 cros_ec_core-objs  := cros_ec.o
 cros_ec_core-$(CONFIG_ACPI)+= cros_ec_acpi_gpe.o
 obj-$(CONFIG_MFD_CROS_EC)  += cros_ec_core.o
diff --git a/drivers/mfd/bd9571mwv.c b/drivers/mfd/bd9571mwv.c
new file mode 100644
index ..64e088dfe7b0
--- /dev/null
+++ b/drivers/mfd/bd9571mwv.c
@@ -0,0 +1,230 @@
+/*
+ * ROHM BD9571MWV-M MFD driver
+ *
+ * Copyright (C) 2017 Marek Vasut 
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any
+ * kind, whether expressed or implied; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License version 2 for more details.
+ *
+ * Based on the TPS65086 driver
+ */
+
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+static const struct mfd_cell bd9571mwv_cells[] = {
+   { .name = "bd9571mwv-regulator", },
+   { .name = "bd9571mwv-gpio", },
+};
+
+static const struct regmap_range bd9571mwv_readable_yes_ranges[] = {
+   regmap_reg_range(BD9571MWV_VENDOR_CODE, BD9571MWV_PRODUCT_REVISION),
+   regmap_reg_range(BD9571MWV_AVS_SET_MONI, BD9571MWV_AVS_DVFS_VID(3)),
+   regmap_reg_range(BD9571MWV_VD18_VID, BD9571MWV_VD33_VID),
+   regmap_reg_range(BD9571MWV_DVFS_VINIT, BD9571MWV_DVFS_VINIT),
+   regmap_reg_range(BD9571MWV_DVFS_SETVMAX, BD9571MWV_DVFS_MONIVDAC),
+   regmap_reg_range(BD9571MWV_GPIO_IN, BD9571MWV_GPIO_IN),
+   regmap_reg_range(BD9571MWV_GPIO_INT, BD9571MWV_GPIO_INTMASK),
+   regmap_reg_range(BD9571MWV_INT_INTREQ, BD9571MWV_INT_INTMASK),
+};
+
+static const struct regmap_access_table bd9571mwv_readable_table = {
+   .yes_ranges = bd9571mwv_readable_yes_ranges,
+   .n_yes_ranges   =