From: Neil Armstrong <neil.armstrong@linaro.org>
To: Xianwei Zhao <xianwei.zhao@amlogic.com>,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org
Cc: Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
Kevin Hilman <khilman@baylibre.com>
Subject: Re: [PATCH V2 3/6] soc: amlogic: init power domain state
Date: Thu, 24 Aug 2023 10:30:08 +0200 [thread overview]
Message-ID: <91e4a3f1-84ed-4433-90fc-bdfb9b08e57a@linaro.org> (raw)
In-Reply-To: <20230824055930.2576849-4-xianwei.zhao@amlogic.com>
Hi,
On 24/08/2023 07:59, Xianwei Zhao wrote:
> From: "xianwei.zhao" <xianwei.zhao@amlogic.com>
>
> If initial power domain with 'AWAY_ON' property state is off,
> turn on the power.
>
> Signed-off-by: xianwei.zhao <xianwei.zhao@amlogic.com>
> ---
> V1 -> V2: None
> ---
> drivers/genpd/amlogic/meson-secure-pwrc.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/genpd/amlogic/meson-secure-pwrc.c b/drivers/genpd/amlogic/meson-secure-pwrc.c
> index 76527f4946b4..3e7e3bd25d1f 100644
> --- a/drivers/genpd/amlogic/meson-secure-pwrc.c
> +++ b/drivers/genpd/amlogic/meson-secure-pwrc.c
> @@ -55,7 +55,7 @@ static bool pwrc_secure_is_off(struct meson_secure_pwrc_domain *pwrc_domain)
> pwrc_domain->index, 0, 0, 0, 0) < 0)
> pr_err("failed to get power domain status\n");
>
> - return is_off;
> + return !!is_off;
Can you explain this ? the function returns bool, so if if_off is > 0, it would return true,
so I don't see why you would need to transform is_off into 1 or 0 using !!.
> }
>
> static int meson_secure_pwrc_off(struct generic_pm_domain *domain)
> @@ -222,6 +222,9 @@ static int meson_secure_pwrc_probe(struct platform_device *pdev)
> dom->base.power_on = meson_secure_pwrc_on;
> dom->base.power_off = meson_secure_pwrc_off;
>
> + if (match->domains[i].is_off(dom) && (dom->base.flags & GENPD_FLAG_ALWAYS_ON))
> + meson_secure_pwrc_on(&dom->base);
> +
> pm_genpd_init(&dom->base, NULL, match->domains[i].is_off(dom));
>
> pwrc->xlate.domains[i] = &dom->base;
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
next prev parent reply other threads:[~2023-08-24 8:30 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-24 5:59 [PATCH V2 0/6] Power: T7: add power domain driver Xianwei Zhao
2023-08-24 5:59 ` [PATCH V2 1/6] soc: amlogic: modify some power domains property Xianwei Zhao
2023-08-24 8:24 ` Neil Armstrong
2023-08-24 8:32 ` Xianwei Zhao
2023-08-24 5:59 ` [PATCH V2 2/6] soc: amlogic: add driver to support power parent node Xianwei Zhao
2023-08-24 8:27 ` Neil Armstrong
2023-08-24 8:42 ` Xianwei Zhao
2023-08-24 5:59 ` [PATCH V2 3/6] soc: amlogic: init power domain state Xianwei Zhao
2023-08-24 8:30 ` Neil Armstrong [this message]
2023-08-24 8:46 ` Xianwei Zhao
2023-08-24 5:59 ` [PATCH V2 4/6] dt-bindings: power: add Amlogic T7 power domains Xianwei Zhao
2023-08-24 15:07 ` Conor Dooley
2023-08-26 18:00 ` Lucas Tanure
2023-08-24 5:59 ` [PATCH V2 5/6] soc: amlogic: Add support for T7 power domains controller Xianwei Zhao
2023-08-24 8:30 ` Neil Armstrong
2023-08-24 8:49 ` Xianwei Zhao
2023-08-24 5:59 ` [PATCH V2 6/6] arm64: dts: add support for T7 power domain controller Xianwei Zhao
2023-08-24 8:32 ` Neil Armstrong
2023-08-24 8:51 ` Xianwei Zhao
2023-08-26 17:59 ` Lucas Tanure
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=91e4a3f1-84ed-4433-90fc-bdfb9b08e57a@linaro.org \
--to=neil.armstrong@linaro.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=khilman@baylibre.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=xianwei.zhao@amlogic.com \
/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®