From patchwork Tue Nov 22 09:58:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Niedermaier X-Patchwork-Id: 13052193 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6E230C433FE for ; Tue, 22 Nov 2022 10:46:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=M3QxAFYW9ppzv96v5xKhYEh5Gf2ZjqUdt+V5eXCZ/Ks=; b=QHOkY0n4XO1Pw3 dWaSkUKER8cidpDsWv9Gaaw6opamJJUrNvxcpkyutyomh09TmfAs1M26/YWyo7iRjJWrdRWEQh/qr mzNAv6I42PnwoI/EqRcrWNvltzDOcKhd73D2Z2EXwcFibHew/DwySqodu+hM8/RRS5R/gsGr65N5+ 04jEx4BYE6GLuU4EE1JLJLTzf+7cHA7xukHAyVMrrnbe22xkuHbnSOHH1I8k9+14y3qy6p1vawgSH 4SLUigdC/L60+GHGU6KyjPCiAgv4hDPl4dkBhAJmCbuWuR2miWkFyYSlZf7h8+OwlBToC+uZlqLl5 0W+HZ3c6kvChTUjIsejg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oxQme-007ynq-6A; Tue, 22 Nov 2022 10:45:44 +0000 Received: from mx2.securetransport.de ([2a03:4000:13:6c7::1]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oxQma-007yjl-MQ for linux-arm-kernel@lists.infradead.org; Tue, 22 Nov 2022 10:45:42 +0000 Received: from mail.dh-electronics.com (unknown [77.24.89.57]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx2.securetransport.de (Postfix) with ESMTPSA id 94D265E8DA; Tue, 22 Nov 2022 11:45:15 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dh-electronics.com; s=dhelectronicscom; t=1669113916; bh=8/2f5/wC+/WGNHGQUshaA3bZxyQCSCGtdkYvUN/IFBU=; h=From:To:CC:Subject:Date:In-Reply-To:References:From; b=d0pAPsyx7FPGn/eNalj7eNSN59LveKCoxIMgBAcP39a/PeiZjs/FvjowB79czqDwe O/FvySr5W7qrzTZsdJ1B6nzL35t2W6He+qlLPyDdfJNlh0OhOhJHGs6kA7ZiHz6EPF fLuieF/pXlTKS0RymiJgYAjDWYbTCz6Pq3mIxHKIjWubTZCvdqSOjGXFS0jBByru/Q /DT5Htx1z3SzFd96MagBQpVPA/ljjzySYZ/PHNR9EUT3rFMNVGWVHdRUGvylGfWnBC yOIQH3GSDSuZUiQnB2DemqMRII+tBOVve78r8Yd60HO2vma94Bygb804+5O4sar+sX agJdTtLwaQe2A== Received: from DHPWEX01.DH-ELECTRONICS.ORG (10.64.2.30) by DHPWEX01.DH-ELECTRONICS.ORG (10.64.2.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.20; Tue, 22 Nov 2022 11:00:04 +0100 Received: from localhost.localdomain (172.16.51.2) by DHPWEX01.DH-ELECTRONICS.ORG (10.64.2.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.20 via Frontend Transport; Tue, 22 Nov 2022 11:00:03 +0100 From: Christoph Niedermaier To: CC: Christoph Niedermaier , "Support Opensource" , Adam Thomson , Liam Girdwood , Mark Brown , Marek Vasut , , Subject: [PATCH 3/3] regulator: da9062: Make the use of IRQ optional Date: Tue, 22 Nov 2022 10:58:33 +0100 Message-ID: <20221122095833.3957-4-cniedermaier@dh-electronics.com> X-Mailer: git-send-email 2.11.0 X-klartext: yes In-Reply-To: <20221122095833.3957-1-cniedermaier@dh-electronics.com> References: <20221122095833.3957-1-cniedermaier@dh-electronics.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221122_024540_901095_72039C3C X-CRM114-Status: GOOD ( 15.89 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 Acked-by: Mark Brown Reviewed-by: Adam Ward --- Cc: Support Opensource Cc: Adam Thomson Cc: Liam Girdwood Cc: Mark Brown Cc: Marek Vasut Cc: kernel@dh-electronics.com Cc: linux-kernel@vger.kernel.org To: linux-arm-kernel@lists.infradead.org --- 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,