[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1543335937-12689-1-git-send-email-andrei.stefanescu@microchip.com>
Date: Tue, 27 Nov 2018 16:25:37 +0000
From: <Andrei.Stefanescu@...rochip.com>
To: <lgirdwood@...il.com>, <robh+dt@...nel.org>,
<mark.rutland@....com>, <gregkh@...uxfoundation.org>,
<Nicolas.Ferre@...rochip.com>, <Cristian.Birsan@...rochip.com>,
<Claudiu.Beznea@...rochip.com>
CC: <linux-arm-kernel@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>, <devicetree@...r.kernel.org>,
<Andrei.Stefanescu@...rochip.com>
Subject: [PATCH v2 0/3] add support for MCP16502 PMIC
MCP16502 is a Power Management IC from Microchip.
It has 4 Buck outputs and 2 LDOs. The buck regulators
can be used in two modes: normal(FPWM) and low-power(Auto PFM).
This patch series adds support for the MCP16502 PMIC.
v2:
- use lpm-gpios instead of lpm-gpio in devicetree bindings documentation
- describe the regulators present on the PMIC in the devicetree bindings
documentation
- add SPDX license inside a C++ comment
- prefix macro
- remove mcp16502_update_regulator and mcp16502_read
- replace ?: with if-else
- change some if-else with switch statements for legibility
- use regmap helpers for regultor settings during runtime
- make mcp16502_get_status read the status from the PMIC STS registers
- use module_i2c_driver
- use the PMIC's Hibernate registers for suspend-to-mem, the PMIC's
Low-power registers for standby and the PMIC's Active registers for
normal runtime
Note about mcp16502_suspend:
- mcp16502_gpio_set_mode(mcp, MCP16502_OPMODE_HIB) has now been changed to
mcp16502_gpio_set_mode(mcp, MCP16502_OPMODE_LPM) for legibility.
Note that the function call only sets the LPM pin of the PMIC to high.
This puts the PMIC in Low-power operating mode. Hibernate operating mode
is reached when the MPU sets the PWRHLD line to zero (typically when
entering suspend-to-ram).
Andrei Stefanescu (3):
regulator: dt-bindings: add MCP16502 regulator bindings
MAINTAINERS: add maintainer for MCP16502 PMIC driver
regulator: mcp16502: add regulator driver for MCP16502
.../bindings/regulator/mcp16502-regulator.txt | 143 ++++++
MAINTAINERS | 7 +
drivers/regulator/Kconfig | 9 +
drivers/regulator/Makefile | 1 +
drivers/regulator/mcp16502.c | 542 +++++++++++++++++++++
5 files changed, 702 insertions(+)
create mode 100644 Documentation/devicetree/bindings/regulator/mcp16502-regulator.txt
create mode 100644 drivers/regulator/mcp16502.c
--
2.7.4
Powered by blists - more mailing lists