Skip to content

add support for MCP16502 PMIC

[email protected] linux-arm-kernel linux-devicetree lkml 6 versions – New

Get series with b4
b4 am 1544639447-17392-1-git-send-email-andrei.stefanescu@microchip.com

Versions newest first · linked by author and title

  1. v5 Latest3 patches 0 repliesNew
  2. v43 patches 0 repliesSuperseded
  3. v3 posting 2/23 patches 5 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v3 posting 1/23 patches1 replySuperseded
v23 patches0 repliesSuperseded
v13 patches4 repliesSuperseded

Changes in v5 from the cover letter

- split the driver patch in two patches, this one is the initial implementation without the support for suspend/resume

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3regulator: dt-bindings: add MCP16502 regulator bindingsDocumentation/devicetree/bindings/regulator/mcp16502-regulator.txt+143 -00 replies
2/3MAINTAINERS: add maintainer for MCP16502 PMIC driverMAINTAINERS+7 -00 replies
3/3regulator: mcp16502: add regulator driver for MCP16502drivers/regulator/Kconfig drivers/regulator/Makefile drivers/regulator/mcp16502.c+530 -00 replies

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by.

PatchRob Herring
1/3R-b
2/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v5 thread

Cover letter [PATCH v5 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.

v5:
- split the driver patch in two patches, this one is the initial implementation without the support for suspend/resume

v4:
- make entire intial comment a C++ comment

v3:
- use CONFIG_SUSPEND and CONFIG_PM to fix compile errors for some configs

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                       | 520 +++++++++++++++++++++
 5 files changed, 680 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/regulator/mcp16502-regulator.txt
 create mode 100644 drivers/regulator/mcp16502.c
Signature · 1 line
2.7.4