From: Mark Brown <broonie@kernel.org>
To: Andrei.Stefanescu@microchip.com
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: Tue, 11 Dec 2018 16:47:06 +0000 [thread overview]
Message-ID: <20181211164706.GL6686@sirena.org.uk> (raw)
In-Reply-To: <1544522876-15967-4-git-send-email-andrei.stefanescu@microchip.com>
[-- Attachment #1: Type: text/plain, Size: 1170 bytes --]
On Tue, Dec 11, 2018 at 10:09:15AM +0000, Andrei.Stefanescu@microchip.com wrote:
> This patch adds a regulator driver for the MCP16502 PMIC.
> This drivers supports basic operations through the
> regulator interface such as:
Overall this looks really good, just a couple of comments:
> +++ b/drivers/regulator/mcp16502.c
> @@ -0,0 +1,555 @@
> +/* SPDX-License-Identifier: GPL-2.0
> + *
> + * MCP16502 PMIC driver
SPDX headers need to be C++ comments - please make the entire comment
block a C++ one so it looks more intentional.
> +#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?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2018-12-11 16:47 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 [this message]
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=20181211164706.GL6686@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).