From: Lucas Stach <l.stach@pengutronix.de>
To: Martin Kepplinger <martin.kepplinger@puri.sm>,
rafael@kernel.org, khilman@kernel.org, ulf.hansson@linaro.org,
robh@kernel.org, krzysztof.kozlowski@linaro.org,
shawnguo@kernel.org, s.hauer@pengutronix.de, festevam@gmail.com,
pavel@ucw.cz
Cc: kernel@puri.sm, linux-imx@nxp.com, broonie@kernel.org,
aford173@gmail.com, linux-pm@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v5 3/3] soc: imx: gpcv2: fix suspend/resume by setting GENPD_FLAG_IRQ_ON
Date: Thu, 21 Jul 2022 13:49:03 +0200 [thread overview]
Message-ID: <6cf47684e92d21a343dbb7861f5d4e5ad1949cdc.camel@pengutronix.de> (raw)
In-Reply-To: <20220721043608.1527686-4-martin.kepplinger@puri.sm>
Am Donnerstag, dem 21.07.2022 um 06:36 +0200 schrieb Martin Kepplinger:
> For boards that use power-domains' power-supplies that need interrupts
> to work (like regulator over i2c), set GENPD_FLAG_IRQ_ON.
> This will tell genpd to adjust accordingly. Currently it "only" sets the
> correct suspend/resume callbacks.
>
> This fixes suspend/resume on imx8mq-librem5 boards (tested) and
> imx8mq-evk (by looking at dts) and possibly more.
>
> Signed-off-by: Martin Kepplinger <martin.kepplinger@puri.sm>
> ---
> drivers/soc/imx/gpcv2.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/soc/imx/gpcv2.c b/drivers/soc/imx/gpcv2.c
> index 6383a4edc360..e058aed76602 100644
> --- a/drivers/soc/imx/gpcv2.c
> +++ b/drivers/soc/imx/gpcv2.c
> @@ -1337,6 +1337,9 @@ static int imx_pgc_domain_probe(struct platform_device *pdev)
> regmap_update_bits(domain->regmap, domain->regs->map,
> domain->bits.map, domain->bits.map);
>
> + if (of_parse_phandle(domain->dev->of_node, "power-supply", 0))
We don't actually need to parse the phandle. For a simple presence
check of_property_read_bool() is enough.
Regards,
Lucas
> + domain->genpd.flags |= GENPD_FLAG_IRQ_ON;
> +
> ret = pm_genpd_init(&domain->genpd, NULL, true);
> if (ret) {
> dev_err(domain->dev, "Failed to init power domain\n");
prev parent reply other threads:[~2022-07-21 11:49 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-21 4:36 [PATCH v5 0/3] power: domain: handle power supplies that need interrupts Martin Kepplinger
2022-07-21 4:36 ` [PATCH v5 1/3] PM: domain: fix indentation and use BIT macro for flags Martin Kepplinger
2022-07-21 11:04 ` Ulf Hansson
2022-07-21 4:36 ` [PATCH v5 2/3] power: domain: handle genpd correctly when needing interrupts Martin Kepplinger
2022-07-21 11:16 ` Ulf Hansson
2022-07-21 17:14 ` Martin Kepplinger
2022-07-21 4:36 ` [PATCH v5 3/3] soc: imx: gpcv2: fix suspend/resume by setting GENPD_FLAG_IRQ_ON Martin Kepplinger
2022-07-21 11:49 ` Lucas Stach [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=6cf47684e92d21a343dbb7861f5d4e5ad1949cdc.camel@pengutronix.de \
--to=l.stach@pengutronix.de \
--cc=aford173@gmail.com \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=festevam@gmail.com \
--cc=kernel@puri.sm \
--cc=khilman@kernel.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=martin.kepplinger@puri.sm \
--cc=pavel@ucw.cz \
--cc=rafael@kernel.org \
--cc=robh@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=ulf.hansson@linaro.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).