devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alistair <alistair@alistair23.me>
To: "Andreas Kemnade" <akemnade@kernel.org>,
	"Lee Jones" <lee@kernel.org>, "Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Liam Girdwood" <lgirdwood@gmail.com>,
	"Mark Brown" <broonie@kernel.org>,
	"Shawn Guo" <shawnguo@kernel.org>,
	"Sascha Hauer" <s.hauer@pengutronix.de>,
	"Pengutronix Kernel Team" <kernel@pengutronix.de>,
	"Fabio Estevam" <festevam@gmail.com>
Cc: devicetree@vger.kernel.org,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 2/4] regulator: sy7636a: fix lifecycle of power good gpio
Date: Mon, 08 Sep 2025 18:00:19 +1000	[thread overview]
Message-ID: <199908b2-b003-4ba7-8a1e-5ff0472b4adf@app.fastmail.com> (raw)
In-Reply-To: <20250906-sy7636-rsrc-v1-2-e2886a9763a7@kernel.org>

On Sat, 6 Sep 2025, at 7:09 PM, Andreas Kemnade wrote:
> Attach the power good gpio to the regulator device devres instead of the
> parent device to fix problems if probe is run multiple times
> (rmmod/insmod or some deferral).
> 
> Fixes: 8c485bedfb785 ("regulator: sy7636a: Initial commit")
> Signed-off-by: Andreas Kemnade <akemnade@kernel.org>

Reviewed-by: Alistair Francis <alistair@alistair23.me>

Alistair

> ---
> drivers/regulator/sy7636a-regulator.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/regulator/sy7636a-regulator.c b/drivers/regulator/sy7636a-regulator.c
> index d1e7ba1fb3e1a..27e3d939b7bb9 100644
> --- a/drivers/regulator/sy7636a-regulator.c
> +++ b/drivers/regulator/sy7636a-regulator.c
> @@ -83,9 +83,11 @@ static int sy7636a_regulator_probe(struct platform_device *pdev)
> if (!regmap)
> return -EPROBE_DEFER;
>  
> - gdp = devm_gpiod_get(pdev->dev.parent, "epd-pwr-good", GPIOD_IN);
> + device_set_of_node_from_dev(&pdev->dev, pdev->dev.parent);
> +
> + gdp = devm_gpiod_get(&pdev->dev, "epd-pwr-good", GPIOD_IN);
> if (IS_ERR(gdp)) {
> - dev_err(pdev->dev.parent, "Power good GPIO fault %ld\n", PTR_ERR(gdp));
> + dev_err(&pdev->dev, "Power good GPIO fault %ld\n", PTR_ERR(gdp));
> return PTR_ERR(gdp);
> }
>  
> @@ -105,7 +107,6 @@ static int sy7636a_regulator_probe(struct platform_device *pdev)
> }
>  
> config.dev = &pdev->dev;
> - config.dev->of_node = pdev->dev.parent->of_node;
> config.regmap = regmap;
>  
> rdev = devm_regulator_register(&pdev->dev, &desc, &config);
> 
> -- 
> 2.39.5
> 
> 

  parent reply	other threads:[~2025-09-08  8:00 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-06  9:09 [PATCH 0/4] regulator: sy7636a: define and init all resources needed Andreas Kemnade
2025-09-06  9:09 ` [PATCH 1/4] dt-bindings: mfd: sy7636a: Add missing gpio pins and supply Andreas Kemnade
2025-09-06 12:01   ` Krzysztof Kozlowski
2025-09-08 10:54     ` Andreas Kemnade
2025-09-08 14:34     ` Mark Brown
2025-09-09  0:44       ` Rob Herring
2025-09-09  7:13         ` Andreas Kemnade
2025-09-06  9:09 ` [PATCH 2/4] regulator: sy7636a: fix lifecycle of power good gpio Andreas Kemnade
2025-09-06 14:35   ` Peng Fan
2025-09-08  8:00   ` Alistair [this message]
2025-09-06  9:09 ` [PATCH 3/4] regulator: sy7636a: add gpios and input regulator Andreas Kemnade
2025-09-06 14:32   ` Peng Fan
2025-09-07 11:26   ` Dan Carpenter
2025-09-06  9:09 ` [PATCH 4/4] ARM: dts: imx: e70k02: add sy7636 Andreas Kemnade
2025-09-08  8:07   ` Alistair
2025-09-09 13:34 ` (subset) [PATCH 0/4] regulator: sy7636a: define and init all resources needed 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=199908b2-b003-4ba7-8a1e-5ff0472b4adf@app.fastmail.com \
    --to=alistair@alistair23.me \
    --cc=akemnade@kernel.org \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=imx@lists.linux.dev \
    --cc=kernel@pengutronix.de \
    --cc=krzk+dt@kernel.org \
    --cc=lee@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@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).