devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: <Andrei.Stefanescu@microchip.com>
To: broonie@kernel.org, robh+dt@kernel.org, lgirdwood@gmail.com,
	mark.rutland@arm.com, gregkh@linuxfoundation.org
Cc: Cristian.Birsan@microchip.com, Nicolas.Ferre@microchip.com,
	Claudiu.Beznea@microchip.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	Andrei.Stefanescu@microchip.com
Subject: [RESEND PATCH v3 0/3] add support for MCP16502 PMIC
Date: Tue, 11 Dec 2018 10:08:57 +0000	[thread overview]
Message-ID: <1544522876-15967-1-git-send-email-andrei.stefanescu@microchip.com> (raw)

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

             reply	other threads:[~2018-12-11 10:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-11 10:08 Andrei.Stefanescu [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1544522876-15967-1-git-send-email-andrei.stefanescu@microchip.com \
    --to=andrei.stefanescu@microchip.com \
    --cc=Claudiu.Beznea@microchip.com \
    --cc=Cristian.Birsan@microchip.com \
    --cc=Nicolas.Ferre@microchip.com \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).