lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230209105144.9351-2-cniedermaier@dh-electronics.com>
Date:   Thu, 9 Feb 2023 11:51:44 +0100
From:   Christoph Niedermaier <cniedermaier@...electronics.com>
To:     <linux-arm-kernel@...ts.infradead.org>
CC:     Christoph Niedermaier <cniedermaier@...electronics.com>,
        Support Opensource <support.opensource@...semi.com>,
        Adam Thomson <Adam.Thomson.Opensource@...semi.com>,
        Liam Girdwood <lgirdwood@...il.com>,
        Mark Brown <broonie@...nel.org>, Marek Vasut <marex@...x.de>,
        <kernel@...electronics.com>, <linux-kernel@...r.kernel.org>
Subject: [PATCH V2 2/2] regulator: da9062: Make the use of IRQ optional

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@...electronics.com>
Acked-by: Mark Brown <broonie@...nel.org>
Reviewed-by: Adam Ward <DLG-Adam.Ward.opensource@...renesas.com>
---
Cc: Support Opensource <support.opensource@...semi.com>
Cc: Adam Thomson <Adam.Thomson.Opensource@...semi.com>
Cc: Liam Girdwood <lgirdwood@...il.com>
Cc: Mark Brown <broonie@...nel.org>
Cc: Marek Vasut <marex@...x.de>
Cc: kernel@...electronics.com
Cc: linux-kernel@...r.kernel.org
To: linux-arm-kernel@...ts.infradead.org
---
V2: - Rebase on current next 20230209
    - Add Reviewed-by and Acked-by tags
---
 drivers/regulator/da9062-regulator.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/regulator/da9062-regulator.c b/drivers/regulator/da9062-regulator.c
index 1a6324001027..653e1844dd61 100644
--- a/drivers/regulator/da9062-regulator.c
+++ b/drivers/regulator/da9062-regulator.c
@@ -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,
-- 
2.11.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ