All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Shawn Guo <shawn.guo@linaro.org>
Cc: Sebastian Reichel <sre@kernel.org>,
	Stephan Gerhold <stephan@gerhold.net>,
	Rob Herring <robh+dt@kernel.org>, Vinod Koul <vkoul@kernel.org>,
	devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	linux-pm@vger.kernel.org
Subject: Re: [PATCH 3/3] power: reset: qcom-pon: Add support for 'qcom,pon-reboot-not-used'
Date: Mon, 12 Jul 2021 12:12:26 -0500	[thread overview]
Message-ID: <YOx3+qy2JhmLP87r@yoga> (raw)
In-Reply-To: <20210705025032.12804-4-shawn.guo@linaro.org>

On Sun 04 Jul 21:50 CDT 2021, Shawn Guo wrote:

> Check property 'qcom,pon-reboot-not-used' and skip reboot-mode setup
> if the property is present.  This is useful for devices that use IMEM
> instead of PON register to pass reboot mode, but still want to populate
> pwrkey and resin devices.
> 

If IMEM is used instead, I think it should be sufficient for the DT
author to omit mode-* properties to achieve this. If the PON hardware
doesn't support mode-*, then that should be reflected in the DT binding
and compatible.

Regards,
Bjorn

> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> ---
>  drivers/power/reset/qcom-pon.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/drivers/power/reset/qcom-pon.c b/drivers/power/reset/qcom-pon.c
> index 4a688741a88a..85fae9e85878 100644
> --- a/drivers/power/reset/qcom-pon.c
> +++ b/drivers/power/reset/qcom-pon.c
> @@ -47,6 +47,14 @@ static int pm8916_pon_probe(struct platform_device *pdev)
>  	struct pm8916_pon *pon;
>  	int error;
>  
> +	if (device_property_present(&pdev->dev, "qcom,pon-reboot-not-used")) {
> +		/*
> +		 * Skip reboot-mode setup and registration if PON is not used
> +		 * for passing reboot mode at all.
> +		 */
> +		goto done;
> +	}
> +
>  	pon = devm_kzalloc(&pdev->dev, sizeof(*pon), GFP_KERNEL);
>  	if (!pon)
>  		return -ENOMEM;
> @@ -75,6 +83,7 @@ static int pm8916_pon_probe(struct platform_device *pdev)
>  
>  	platform_set_drvdata(pdev, pon);
>  
> +done:
>  	return devm_of_platform_populate(&pdev->dev);
>  }
>  
> -- 
> 2.17.1
> 

  reply	other threads:[~2021-07-12 17:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-05  2:50 [PATCH 0/3] Add 'qcom,pon-reboot-not-used' support in PON driver Shawn Guo
2021-07-05  2:50 ` [PATCH 1/3] dt-bindings: power: reset: Convert qcom,pon to DT schema Shawn Guo
2021-07-12 15:45   ` Rob Herring
2021-07-14 11:47     ` Shawn Guo
2021-07-05  2:50 ` [PATCH 2/3] dt-bindings: qcom,pon: Add 'qcom,pon-reboot-not-used' property Shawn Guo
2021-07-12 17:08   ` Bjorn Andersson
2021-07-05  2:50 ` [PATCH 3/3] power: reset: qcom-pon: Add support for 'qcom,pon-reboot-not-used' Shawn Guo
2021-07-12 17:12   ` Bjorn Andersson [this message]
2021-07-14 11:49     ` Shawn Guo

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=YOx3+qy2JhmLP87r@yoga \
    --to=bjorn.andersson@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=shawn.guo@linaro.org \
    --cc=sre@kernel.org \
    --cc=stephan@gerhold.net \
    --cc=vkoul@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.