linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Andrei.Stefanescu@microchip.com
Cc: lgirdwood@gmail.com, robh+dt@kernel.org, mark.rutland@arm.com,
	gregkh@linuxfoundation.org, Nicolas.Ferre@microchip.com,
	Cristian.Birsan@microchip.com, Claudiu.Beznea@microchip.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH 3/3] regulator: mcp16502: add regulator driver for MCP16502
Date: Fri, 23 Nov 2018 13:44:11 +0000	[thread overview]
Message-ID: <20181123134411.GG2089@sirena.org.uk> (raw)
In-Reply-To: <03b902d9-49a8-9acd-6f98-048f117b1e93@microchip.com>

[-- Attachment #1: Type: text/plain, Size: 1421 bytes --]

On Wed, Nov 21, 2018 at 03:44:31PM +0000, Andrei.Stefanescu@microchip.com wrote:

> Thank you for your review. While working on the next version I realized that
> the implementation should change a bit. The mcp16502 PMIC has separate 
> registers
> for each of its operating modes (Performance, Active, Low-power, Hibernate).
> So, it is possible to setup the values for Low-power (Linux standby) and
> Hibernate (Linux suspend-to-ram) and these values would not be affected by
> changes made during runtime (which are made to the ACTIVE registers).

This is totally normal for regulators, it's the only way that suspend
modes can function sensibly since suspend mode configuration is
typically not capable off supplying the processor.  If your driver is
currently trying to use the normal operating registers then it's buggy.

> This means that the calls to suspend_set_* are not necessary to be made each
> time the board suspends. My idea is to add three functions to the 
> regulator_ops
> (setup_suspend_standby/mem/max) which would be called after the regulator is
> registered and which would set the values found inside the devicetree
> in the regulator-state-standby/mem/disk subnodes.

There is no need to add new operations, we already have a number of
suspend specific operations covering enable state, modes and voltage.
You should just use those, there's already code to call them.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

      reply	other threads:[~2018-11-23 13:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-13 11:29 [PATCH 0/3] add support for MCP16502 PMIC Andrei.Stefanescu
2018-11-13 11:29 ` [PATCH 1/3] regulator: dt-bindings: add MCP16502 regulator bindings Andrei.Stefanescu
2018-11-13 17:30   ` Mark Brown
2018-11-13 11:29 ` [PATCH 2/3] MAINTAINERS: add maintainer for MCP16502 PMIC driver Andrei.Stefanescu
2018-11-13 11:29 ` [PATCH 3/3] regulator: mcp16502: add regulator driver for MCP16502 Andrei.Stefanescu
2018-11-13 17:45   ` Mark Brown
2018-11-21 15:44     ` Andrei.Stefanescu
2018-11-23 13:44       ` Mark Brown [this message]

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=20181123134411.GG2089@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=Andrei.Stefanescu@microchip.com \
    --cc=Claudiu.Beznea@microchip.com \
    --cc=Cristian.Birsan@microchip.com \
    --cc=Nicolas.Ferre@microchip.com \
    --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).