--- v4
+++ v10
@@ -1,22 +1,14 @@
Patch series introducing support for ROHM BD70528 PMIC
-
-Please note that patch 1 breaks compilation without patches 2 and 3
ROHM BD70528 is a programmable Power Management IC for battery
powered 'ultra low power' systems like the pre-announced NXP
-i.MX7 ULP. This patch series introduces support for the PMIC.
-
-I send this a RFC now as I would like to receive comments from
-Lee, Mark and Stephen regarding splitting the existing
-include/linux/mfd/bd718x7.h into ROHM generic and chip specific
-portions. Benefit is that for example the clk sub-driver does
-not need to be aware of chip specific structure(s) (struct
-bd718x7 and struct bd70528) as it only needs to derefernce the
-generic struct rohm_regmap_dev. Thus same clk subdriver can
-support both the bd718x7 and bd70528 as long as MFD driver
-data has this generic structure in the beginning of allocated
-data. But knowing the bd718x7 driver is already in upstream,
-it might be good if this change went through single tree, right?
+i.MX7 ULP. This patch series introduces support for the PMIC. Please
+note that this driver only supports HW setup where PMIC is connected
+to I2C on A7 core. The other scenario is to use M4 as a power manager
+and connect pmic to M4. On such setups the A7 can only access pmic
+via M4 core using RPMSG virtio. Such setup depends on RPMSG
+implementation on M4 core and is currently not supported by this
+patch series.
RTC block of the bd70528 can support 'wake' irq which wakes PMIC
from standby state. Wake irq's can be armed to wake up system up
@@ -33,13 +25,48 @@
are used for I/O or interrupts and it is up-to driver user to
ensure there is no misconfiguration or "double use".
-Currently only MFD core, clk, RTC, regulator and GPIO portions are
-somehow tested. The RFC series also include initial power-supply
-and watchdog patches in order to provide better overview on chip
-and to collect initial feedback. Reset and ADC are not supported by
-this series.
-
-Changelog v4:
+The power-supply patch included in series is only poorly tested as I
+lack of hardware with real battery connected. Reset and ADC are not
+supported by this series.
+
+Changelog v10:
+- Exported locking functions for RTC lock and as a result dropped hid
+ the struct bd70528 from sub-devices who no longer needed it.
+- removed linux/gpio.h header from GPIO driver.
+
+Changelog v9: Changes suggested by Lee Jones
+- MFD, DT-binding, RTC and WDT changed
+- DT-bindings: Spelling fixes
+- RTC and WDT: Use exported function instead of function pointer for WDT
+ arming/disarming
+- MFD: Export WDT arming/disarming function instead of providing a
+ pointer to it.
+- Various styling fixes.
+
+Changelog v8:
+- regulators(*), wdt, gpio, rtc, mfd(*) and dt-bindings unchanged.
+ (*)Patches 1-3 squashed to not break bisecting.
+
+- removed unnecessary newline from clk
+- fixed possible use of uninitialized 'reg' from power-supply.
+ Found by 0-day tests and reported by Dan Carpenter.
+
+Changelog v7:
+Only patch 2 changed.
+- Avoid out-of-array-bounds access at regulator probe if unsupported
+ chip type is passed to bd718x7 regulator driver.
+
+Changelog v6:
+Only patch 10 changed.
+- styling fixes pointed by Gunter Roeck
+- dropped RFC tag
+
+Changelog v5 (RFC):
+Only patch 7 changed.
+- Explained why lock is not needed at GPIO value getting
+- removed ampersands from function pointer assignments.
+
+Changelog v4 (RFC):
patches 1,2,3,4,5,10 are unchanged from v3
DT-binding fixes suggested by Rob Herring:
- drop interrupt-parent
@@ -52,7 +79,7 @@
POWER:
- Add ASCII art intended to clarify the charger HW state machine
-Changelog v3:
+Changelog v3 (RFC):
patches 1,2,3,4,5,6,7,8 and 10 are unchanged from v2
RTC fixups suggested by Guenter Roeck:
- create bd70528_set_time_locked function in order to simplify
@@ -77,7 +104,7 @@
- do not copy the whole MFD data (especially the mutex to avoid
all possibilities of accidentally using the copy of a mutex)
-Changelog v2: Mainly feedback from Guenter Roeck:
+Changelog v2 (RFC): Mainly feedback from Guenter Roeck:
- patches 1, 2, 3, 4, 5, 9 are unchanged.
- mfd: own mutex for each bd70528 instance - embed in struct bd70528
- watchdog: do not copy parent device data
@@ -97,33 +124,31 @@
Patch 1:
split the bd718x7.h to generic and chip specific portions.
(breaks compilation without patch 2 and 3)
+ - adapt bd718x7.h changes to bd718x7 regulator driver
+ - adapt bd718x7.h changes to bd718x7 clk driver
Patch 2:
- adapt bd718x7.h changes to bd718x7 regulator driver
+ add MFD core support for bd70528
Patch 3:
- adapt bd718x7.h changes to bd718x7 clk driver
+ support bd70528 clk using bd718x7 clk driver
Patch 4:
- add MFD core support for bd70528
+ document DT bindings for BD70528
Patch 5:
- support bd70528 clk using bd718x7 clk driver
+ support BD70528 GPIO block
Patch 6:
- document DT bindings for BD70528
+ support BD70528 RTC
Patch 7:
- support BD70528 GPIO block
+ support BD70528 battery charger
Patch 8:
- support BD70528 RTC
+ support BD70528 watchdog
Patch 9:
- support BD70528 battery charger
-Patch 10:
- support BD70528 watchdog
+ drop struct bd70528 from regulator
This patch series is based on Mark's regulator/for-next branch
---
-Matti Vaittinen (10):
- mfd: bd718x7.h split to ROHM common and bd718x7 specific parts
- regulator: bd718x7 use chip specific and generic data structs
- clk: bd718x7: use chip specific and generic data structs
+Matti Vaittinen (9):
+ mfd: regulator: clk: split rohm-bd718x7.h
mfd: bd70528: Support ROHM bd70528 PMIC - core
clk: bd718x7: Support ROHM BD70528 clk block
devicetree: bindings: Document first ROHM BD70528 bindings
@@ -131,31 +156,33 @@
rtc: bd70528: Initial support for ROHM bd70528 RTC
power: supply: Initial support for ROHM BD70528 PMIC charger block
watchdog: bd70528: Initial support for ROHM BD70528 watchdog block
+ regulator: bd70528: drop struct bd70528
.../devicetree/bindings/mfd/rohm,bd70528-pmic.txt | 102 +++
drivers/clk/Kconfig | 6 +-
- drivers/clk/clk-bd718x7.c | 25 +-
+ drivers/clk/clk-bd718x7.c | 24 +-
drivers/gpio/Kconfig | 11 +
drivers/gpio/Makefile | 1 +
- drivers/gpio/gpio-bd70528.c | 228 +++++++
+ drivers/gpio/gpio-bd70528.c | 231 +++++++
drivers/mfd/Kconfig | 17 +
drivers/mfd/Makefile | 1 +
- drivers/mfd/rohm-bd70528.c | 410 ++++++++++++
+ drivers/mfd/rohm-bd70528.c | 438 ++++++++++++
drivers/mfd/rohm-bd718x7.c | 23 +-
drivers/power/supply/Kconfig | 9 +
drivers/power/supply/Makefile | 1 +
- drivers/power/supply/bd70528-charger.c | 738 +++++++++++++++++++++
- drivers/regulator/bd718x7-regulator.c | 22 +-
+ drivers/power/supply/bd70528-charger.c | 745 +++++++++++++++++++++
+ drivers/regulator/bd70528-regulator.c | 4 +-
+ drivers/regulator/bd718x7-regulator.c | 24 +-
drivers/rtc/Kconfig | 8 +
drivers/rtc/Makefile | 1 +
drivers/rtc/rtc-bd70528.c | 500 ++++++++++++++
drivers/watchdog/Kconfig | 12 +
drivers/watchdog/Makefile | 1 +
drivers/watchdog/bd70528_wdt.c | 187 ++++++
- include/linux/mfd/rohm-bd70528.h | 392 +++++++++++
+ include/linux/mfd/rohm-bd70528.h | 383 +++++++++++
include/linux/mfd/rohm-bd718x7.h | 22 +-
include/linux/mfd/rohm-generic.h | 20 +
- 23 files changed, 2692 insertions(+), 45 deletions(-)
+ 24 files changed, 2723 insertions(+), 48 deletions(-)
create mode 100644 Documentation/devicetree/bindings/mfd/rohm,bd70528-pmic.txt
create mode 100644 drivers/gpio/gpio-bd70528.c
create mode 100644 drivers/mfd/rohm-bd70528.c