From: Mark Brown <broonie@kernel.org>
To: Pascal PAILLET-LME <p.paillet@st.com>
Cc: "lgirdwood@gmail.com" <lgirdwood@gmail.com>,
"robh+dt@kernel.org" <robh+dt@kernel.org>,
"mark.rutland@arm.com" <mark.rutland@arm.com>,
"mcoquelin.stm32@gmail.com" <mcoquelin.stm32@gmail.com>,
Alexandre TORGUE <alexandre.torgue@st.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-stm32@st-md-mailman.stormreply.com"
<linux-stm32@st-md-mailman.stormreply.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 2/2] regulator: Add support for stm32 power regulators
Date: Wed, 10 Apr 2019 11:38:52 +0100 [thread overview]
Message-ID: <20190410103852.GG6106@sirena.org.uk> (raw)
In-Reply-To: <1554737044-9460-3-git-send-email-p.paillet@st.com>
[-- Attachment #1: Type: text/plain, Size: 1224 bytes --]
On Mon, Apr 08, 2019 at 03:24:08PM +0000, Pascal PAILLET-LME wrote:
> +config REGULATOR_STM32_PWR
> + bool "STMicroelectronics STM32 PWR"
> + depends on ARCH_STM32
There's no build time dependency here, please also add an || COMPILE_TEST to
help with build coverage.
> +int stm32_pwr_reg_is_enabled(struct regulator_dev *rdev)
> +{
> + struct stm32_pwr_reg *priv = rdev_get_drvdata(rdev);
> + u32 val;
> +
> + val = readl_relaxed(priv->base + REG_PWR_CR3);
> +
> + return (val & priv->ready_mask);
> +}
This looks like it's reading back a status bit from the hardware not the
state requested by software - I'd expect an _is_enabled() to reference
the same bit that's updated by the enable/disable functions. This looks
like a better fit for _get_status().
> + of_regulator_match(&pdev->dev, np, stm32_pwr_reg_matches,
> + STM32PWR_REG_NUM_REGS);
You don't need to open code the matching any more, just set of_match and
regulators_node in the regulator_desc and the core will do it for you.
> +MODULE_DESCRIPTION("STM32MP1 PWR voltage regulator driver");
> +MODULE_AUTHOR("Gabriel Fernandez <gabriel.fernandez@st.com>");
> +MODULE_LICENSE("GPL v2");
No signoff from Gabriel?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
prev parent reply other threads:[~2019-04-10 10:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-08 15:24 [PATCH 0/2] Add support for STM32MP1 " Pascal PAILLET-LME
2019-04-08 15:24 ` [PATCH 1/2] dt-bindings: regulator: Add stm32mp1 pwr regulators Pascal PAILLET-LME
2019-04-08 15:24 ` [PATCH 2/2] regulator: Add support for stm32 power regulators Pascal PAILLET-LME
2019-04-10 10:38 ` 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=20190410103852.GG6106@sirena.org.uk \
--to=broonie@kernel.org \
--cc=alexandre.torgue@st.com \
--cc=devicetree@vger.kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mark.rutland@arm.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=p.paillet@st.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®