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

The resend is because I forgot to add Mark.

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.

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                       | 555 +++++++++++++++++++++
 5 files changed, 715 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] 9+ messages in thread

end of thread, other threads:[~2018-12-13 16:21 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-11 10:08 [RESEND PATCH v3 0/3] add support for MCP16502 PMIC Andrei.Stefanescu
2018-12-11 10:09 ` [RESEND PATCH v3 1/3] regulator: dt-bindings: add MCP16502 regulator bindings Andrei.Stefanescu
2018-12-11 10:09 ` [RESEND PATCH v3 2/3] MAINTAINERS: add maintainer for MCP16502 PMIC driver Andrei.Stefanescu
2018-12-11 10:09 ` [RESEND PATCH v3 3/3] regulator: mcp16502: add regulator driver for MCP16502 Andrei.Stefanescu
2018-12-11 16:47   ` Mark Brown
2018-12-12  8:01     ` Andrei.Stefanescu
2018-12-12 15:55       ` Mark Brown
2018-12-13 12:19         ` Andrei.Stefanescu
2018-12-13 16:21           ` Mark Brown

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).