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

2017-07-31 Thread Marek Vasut
On 07/18/2017 11:23 AM, Lee Jones wrote:
> On Mon, 17 Jul 2017, 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 
>> ---
>> 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
>> V4: select REGMAP_IRQ
>> ---
>>  MAINTAINERS   |  11 ++
>>  drivers/mfd/Kconfig   |  14 +++
>>  drivers/mfd/Makefile  |   1 +
>>  drivers/mfd/bd9571mwv.c   | 230 
>> ++
>>  include/linux/mfd/bd9571mwv.h | 115 +
>>  5 files changed, 371 insertions(+)
>>  create mode 100644 drivers/mfd/bd9571mwv.c
>>  create mode 100644 include/linux/mfd/bd9571mwv.h
> 
> Applied, thanks.

I still don't see these patches in next, why ?

-- 
Best regards,
Marek Vasut


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

2017-07-18 Thread Lee Jones
On Mon, 17 Jul 2017, 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 
> ---
> 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
> V4: select REGMAP_IRQ
> ---
>  MAINTAINERS   |  11 ++
>  drivers/mfd/Kconfig   |  14 +++
>  drivers/mfd/Makefile  |   1 +
>  drivers/mfd/bd9571mwv.c   | 230 
> ++
>  include/linux/mfd/bd9571mwv.h | 115 +
>  5 files changed, 371 insertions(+)
>  create mode 100644 drivers/mfd/bd9571mwv.c
>  create mode 100644 include/linux/mfd/bd9571mwv.h

Applied, thanks.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog


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

2017-07-17 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
V4: select REGMAP_IRQ
---
 MAINTAINERS   |  11 ++
 drivers/mfd/Kconfig   |  14 +++
 drivers/mfd/Makefile  |   1 +
 drivers/mfd/bd9571mwv.c   | 230 ++
 include/linux/mfd/bd9571mwv.h | 115 +
 5 files changed, 371 insertions(+)
 create mode 100644 drivers/mfd/bd9571mwv.c
 create mode 100644 include/linux/mfd/bd9571mwv.h

diff --git a/MAINTAINERS b/MAINTAINERS
index 0b6ed8eb58b0..f369c1cb287e 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -11291,6 +11291,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 94ad2c1c3d90..667665926fb3 100644
--- a/drivers/mfd/Kconfig
+++ b/drivers/mfd/Kconfig
@@ -133,6 +133,20 @@ config MFD_BCM590XX
help
  Support for the BCM590xx PMUs from Broadcom
 
+config MFD_BD9571MWV
+   tristate "ROHM BD9571MWV PMIC"
+   select MFD_CORE
+   select REGMAP_I2C
+   select REGMAP_IRQ
+   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 080793b3fd0e..db15df3d9e8d 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,
+