From: <Andrei.Stefanescu@microchip.com>
To: <broonie@kernel.org>
Cc: <robh+dt@kernel.org>, <lgirdwood@gmail.com>,
<mark.rutland@arm.com>, <gregkh@linuxfoundation.org>,
<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>
Subject: Re: [RESEND PATCH v3 3/3] regulator: mcp16502: add regulator driver for MCP16502
Date: Wed, 12 Dec 2018 08:01:07 +0000 [thread overview]
Message-ID: <6a35df06-1309-f069-9b22-8c2cc5cca56e@microchip.com> (raw)
In-Reply-To: <20181211164706.GL6686@sirena.org.uk>
Hi Mark,
Thank you for the review.
> SPDX headers need to be C++ comments - please make the entire comment
> block a C++ one so it looks more intentional.
I sent a new patch (v4) with the modified comment.
>> +#ifdef CONFIG_SUSPEND
>> +static int mcp16502_suspend(struct device *dev)
>> +{
>> + struct i2c_client *client = to_i2c_client(dev);
>> + struct mcp16502 *mcp = i2c_get_clientdata(client);
>> +
>> + mcp16502_gpio_set_mode(mcp, MCP16502_OPMODE_LPM);
>> +
>> + return 0;
>> +}
> This puts the device into low power mode when the suspend function gets
> called but this might not be safe - devices using the regulator may not
> be suspended yet so could still need full regulation. Normally a GPIO
> triggered transition like this would be being done by hardware as part
> of the process of suspending the SoC. Is there some reason to do this
> manually?
There is a line from the MPU (SHDN) which goes low only when the MPU
turns off. That line is already connected to the PMIC and it differentiates
between suspend-to-mem and standby. To switch to low-power, the PMIC must
be controlled by the GPIO pin LPM.
The suspend sequence is:
- LPM pin goes high (PMIC enters Low-Power <-> Linux standby)
- SHDN goes low (if target suspend state is mem) and then PMIC enters
HIBERNATE
Best regards,
Andrei
next prev parent reply other threads:[~2018-12-12 8:01 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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=6a35df06-1309-f069-9b22-8c2cc5cca56e@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
all inboxes | Powered by JetHome®