Skip to content

Commit

Permalink
regulator: da9062: Make the use of IRQ optional
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
cniedermaier authored and intel-lab-lkp committed Mar 7, 2023
1 parent 183f19e commit 98b59e5
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions drivers/regulator/da9062-regulator.c
Expand Up @@ -1012,10 +1012,9 @@ 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,
NULL, da9062_ldo_lim_event,
Expand Down

0 comments on commit 98b59e5

Please sign in to comment.