linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] add support for MCP16502 PMIC
@ 2018-11-27 16:25 Andrei.Stefanescu
  2018-11-27 16:25 ` [PATCH v2 1/3] regulator: dt-bindings: add MCP16502 regulator bindings Andrei.Stefanescu
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Andrei.Stefanescu @ 2018-11-27 16:25 UTC (permalink / raw)
  To: lgirdwood, robh+dt, mark.rutland, gregkh, Nicolas.Ferre,
	Cristian.Birsan, Claudiu.Beznea
  Cc: linux-arm-kernel, linux-kernel, devicetree, Andrei.Stefanescu

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-11-28  4:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-27 16:25 [PATCH v2 0/3] add support for MCP16502 PMIC Andrei.Stefanescu
2018-11-27 16:25 ` [PATCH v2 1/3] regulator: dt-bindings: add MCP16502 regulator bindings Andrei.Stefanescu
2018-11-27 16:25 ` [PATCH v2 2/3] MAINTAINERS: add maintainer for MCP16502 PMIC driver Andrei.Stefanescu
2018-11-27 16:25 ` [PATCH v2 3/3] regulator: mcp16502: add regulator driver for MCP16502 Andrei.Stefanescu
2018-11-28  3:28   ` kbuild test robot
2018-11-28  4:02   ` kbuild test robot
2018-11-28  4:02   ` [PATCH] regulator: mcp16502: fix platform_no_drv_owner.cocci warnings kbuild test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).