mfd: max77686: Add Maxim 77802 PMIC support
Subsystems (3)
PATCH RESEND v8 1/1 mfd: max77686: Add Maxim 77802 PMIC support
Maxim MAX77802 is a power management chip that contains 10 high efficiency Buck regulators, 32 Low-dropout (LDO) regulators used to power up application processors and peripherals, a 2-channel 32kHz clock outputs, a Real-Time-Clock (RTC) and a I2C interface to program the individual regulators, clocks outputs and the RTC.
This patch adds support for MAX77802 to the MAX77686 driver and is based on a driver added to the Chrome OS kernel 3.8 by Simon Glass.
---
This patch was part of a series [0] that add complete support for the MAX77802 chip (regulator, clock, rtc and i2c interface). But there was cross subsystem dependencies since the drivers for the mfd cells needed the registers definitions in the max77686 header added by this patch. Also, since the max77686 driver is being extended, the drivers depend on a currently available config symbol so the dependency was not handled automatically by Kconfig.
So, to split the dependencies between kernel releases and make it easier to get everything merged, this patch is resend as a standalone to allow the individual drivers to go thourgh the relevant subsystems trees later on, once this patch lands into mainline.
[0]: http://lwn.net/Articles/605350/
Changes since v7:
- Rebased on top of the for-mfd-next branch to avoid merge conflicts.
- Don't add an entry in the i2c_device_id table. Suggested by Lee Jones.
- Use of_device_id match table instead of i2c_device_id to know the PMIC type.
Changes since v6:
- Fix comments grammar. Suggested by Krzysztof Kozlowski.
- Only unregister the RTC i2c device if the type is MAX77686. Suggested by Krzysztof Kozlowski.
Changes since v5:
- Extend the 77686 driver to support 77802 instead of adding a new driver. Suggested by Lee Jones.
Changes since v4:
- Use consistent expressions when checking for NULL values. Suggested by Krzysztof Kozlowski.
- Remove unused defines. Suggested by Krzysztof Kozlowski.
- Explain why IRQ is disabled on suspend. Suggested by Krzysztof Kozlowski.
Changes since v3:
- Remove unnecessary OOM error message since the mm subsystem already logs it.
Changes since v2:
- Split the DT binding docs in a separate patch and improve the documentation. Suggested by Mark Brown.
- Add all the devices in the MFD driver instead of doing in separate patches. Suggested by Mark Brown.
Changes since v1:
- Convert max77{686,802} to regmap irq API and get rid of max77{686,802}-irq.c Suggested by Krzysztof Kozlowski.
- Don't protect max77802 mfd_cells using Kconfig options since mfd core omits devices that don't match. Suggested by Lee Jones.
- Change mfd driver to be tristate instead of boolean. Suggested by Mark Brown.
- Change binding "voltage-regulators" property to "regulators" to be consistent with other PMIC drivers. Suggested by Mark Brown.
- Use regulators node names instead of the deprecated "regulator-compatible" property. Suggested by Mark Brown.
- Use the new descriptor-based GPIO interface instead of the deprecated
--- drivers/mfd/Kconfig | 6 +- drivers/mfd/max77686.c | 197 ++++++++++++++++++++++++++++----- include/linux/mfd/max77686-private.h | 208 ++++++++++++++++++++++++++++++++++- include/linux/mfd/max77686.h | 57 +++++++++- 4 files changed, 436 insertions(+), 32 deletions(-)
drivers/mfd/Kconfig +3 -3
@@ -380,15 +380,15 @@ config MFD_MAX14577 of the device. config MFD_MAX77686 - bool "Maxim Semiconductor MAX77686 PMIC Support" + bool "Maxim Semiconductor MAX77686/802 PMIC Support" depends on I2C=y select MFD_CORE select REGMAP_I2C select REGMAP_IRQ select IRQ_DOMAIN help - Say yes here to add support for Maxim Semiconductor MAX77686. - This is a Power Management IC with RTC on chip. + Say yes here to add support for Maxim Semiconductor MAX77686 and + MAX77802 which are Power Management IC with an RTC on chip. This driver provides common support for accessing the device; additional drivers must be enabled in order to use the functionality of the device.
drivers/mfd/max77686.c +170 -27
280 lines not on this page · raw message
include/linux/mfd/max77686-private.h +207 -1
230 lines not on this page · raw message
include/linux/mfd/max77686.h +56 -1
73 lines not on this page · raw message
Signature · 1 line
2.0.0.rc2
Lee Jones
AppliedQuoted 6 lines · Javier Martinez Canillas
Maxim MAX77802 is a power management chip that contains 10 high efficiency Buck regulators, 32 Low-dropout (LDO) regulators used to power up application processors and peripherals, a 2-channel 32kHz clock outputs, a Real-Time-Clock (RTC) and a I2C interface to program the individual regulators, clocks outputs and the RTC.
Quoted 6 lines
This patch adds support for MAX77802 to the MAX77686 driver and is based on a driver added to the Chrome OS kernel 3.8 by Simon Glass.
Signed-off-by Javier Martinez Canillas <[email protected]>Reviewed-by Krzysztof Kozlowski <[email protected]>Acked-by Lee Jones <[email protected]>
Assuming nothing has changed since I Acked this:
Applied, thanks.
Signature · 4 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog