linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Niedermaier <cniedermaier@dh-electronics.com>
To: "linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Cc: Support Opensource <support.opensource@diasemi.com>,
	Adam Thomson <Adam.Thomson.Opensource@diasemi.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>, Marek Vasut <marex@denx.de>,
	kernel <kernel@dh-electronics.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Christoph Niedermaier <cniedermaier@dh-electronics.com>
Subject: RE: [PATCH V4 3/3] regulator: da9062: Make the use of IRQ optional
Date: Tue, 18 Apr 2023 20:00:03 +0000	[thread overview]
Message-ID: <bb6f5cf8afd54836959ebfb0455b81dc@dh-electronics.com> (raw)
In-Reply-To: <20230309092254.56279-3-cniedermaier@dh-electronics.com>

From: Christoph Niedermaier [mailto:cniedermaier@dh-electronics.com]
Sent: Thursday, March 9, 2023 10:23 AM
> This patch makes the use of IRQ optional to make the DA9061/62 usable
> for designs that don't have the IRQ pin connected, because the regulator
> is usable without IRQ.
> 
> Signed-off-by: Christoph Niedermaier <cniedermaier@dh-electronics.com>
> Acked-by: Mark Brown <broonie@kernel.org>
> Reviewed-by: Adam Ward <DLG-Adam.Ward.opensource@dm.renesas.com>
> Reported-by: kernel test robot <lkp@intel.com>
> Link: https://lore.kernel.org/oe-kbuild-all/202303082246.GuLdPL0t-lkp@intel.com/
> ---
> Cc: Support Opensource <support.opensource@diasemi.com>
> Cc: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
> Cc: Liam Girdwood <lgirdwood@gmail.com>
> Cc: Mark Brown <broonie@kernel.org>
> Cc: Marek Vasut <marex@denx.de>
> Cc: kernel@dh-electronics.com
> Cc: linux-kernel@vger.kernel.org
> To: linux-arm-kernel@lists.infradead.org
> ---
> V2: - Rebase on current next 20230209
>     - Add Reviewed-by and Acked-by tags
> V3: - Rebase on current next 20230307
> v4: - Rebase on current next 20230309
>     - Fix a missing variable change reported by kernel test robot
> ---
>  drivers/regulator/da9062-regulator.c | 11 +++++------
>  1 file changed, 5 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/regulator/da9062-regulator.c b/drivers/regulator/da9062-regulator.c
> index 1a6324001027..ae7955afce86 100644
> --- a/drivers/regulator/da9062-regulator.c
> +++ b/drivers/regulator/da9062-regulator.c
> @@ -924,7 +924,7 @@ static int da9062_regulator_probe(struct platform_device *pdev)
>  	struct da9062_regulator *regl;
>  	struct regulator_config config = { };
>  	const struct da9062_regulator_info *rinfo;
> -	int irq, n, ret;
> +	int n, ret;
>  	int max_regulators;
> 
>  	switch (chip->chip_type) {
> @@ -1012,12 +1012,11 @@ static int da9062_regulator_probe(struct platform_device *pdev)
>  	}
> 
>  	/* LDOs overcurrent event support */
> -	irq = platform_get_irq_byname(pdev, "LDO_LIM");
> -	if (irq < 0)
> -		return irq;
> -	regulators->irq_ldo_lim = irq;
> +	regulators->irq_ldo_lim = platform_get_irq_byname_optional(pdev, "LDO_LIM");
> +	if (regulators->irq_ldo_lim < 0)
> +		return 0;
> 
> -	ret = devm_request_threaded_irq(&pdev->dev, irq,
> +	ret = devm_request_threaded_irq(&pdev->dev, regulators->irq_ldo_lim,
>  					NULL, da9062_ldo_lim_event,
>  					IRQF_TRIGGER_LOW | IRQF_ONESHOT,
>  					"LDO_LIM", regulators);

Hi,

In V3 of this patch the kernel test robot found an issue. A fix is
important, because otherwise the normal path with IRQ could have
problems. So I fixed it in V4. Any comments or is it OK how I fixed it?


Regards
Christoph


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2023-04-18 20:01 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-09  9:22 [PATCH V4 1/3] mfd: da9062: Use MFD_CELL_OF macro Christoph Niedermaier
2023-03-09  9:22 ` [PATCH V4 2/3] mfd: da9062: Remove IRQ requirement Christoph Niedermaier
2023-03-16 14:00   ` Lee Jones
2023-03-09  9:22 ` [PATCH V4 3/3] regulator: da9062: Make the use of IRQ optional Christoph Niedermaier
2023-04-18 20:00   ` Christoph Niedermaier [this message]
2023-04-27 10:50     ` DLG Adam Ward
2023-05-07 23:40       ` Marek Vasut
     [not found]         ` <OS3PR01MB8460C4A6047EE4590D4F791FC2769@OS3PR01MB8460.jpnprd01.prod.outlook.com>
     [not found]           ` <e7e4f933-5098-5fea-7a1d-254609c93cbd@denx.de>
2023-07-12 13:19             ` Christoph Niedermaier
2023-07-13  9:18               ` Christoph Niedermaier
2023-03-16 13:59 ` [PATCH V4 1/3] mfd: da9062: Use MFD_CELL_OF macro Lee Jones

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=bb6f5cf8afd54836959ebfb0455b81dc@dh-electronics.com \
    --to=cniedermaier@dh-electronics.com \
    --cc=Adam.Thomson.Opensource@diasemi.com \
    --cc=broonie@kernel.org \
    --cc=kernel@dh-electronics.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marex@denx.de \
    --cc=support.opensource@diasemi.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;
as well as URLs for NNTP newsgroup(s).