From patchwork Thu Feb 9 10:51:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Niedermaier X-Patchwork-Id: 13134419 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 8DB4BC61DA4 for ; Thu, 9 Feb 2023 11:09:17 +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=B+eL/6diu8q1M5mZYCfbUBs0H2wWaAxDcwrdDkhhLqk=; b=0yfwL7NUGSnfDh MxOqvzqSyv53f16XY6j8vVEpIHJfe+H1qQBIOR+P01FLNRQIa33VFSl4xLMAVZgsky6DC3lZriMb6 prA4AuIBqO/GnwNr2Aj7Fzp5sSrSqvxD4OQgtTgImlchUsG2vvRlFO4KsyjZspOxIs+OEw1KZ165+ bV6NxHHN6fbBjWH6D7uggRu30EuFRXetjOJKu++U/g005Cqo139/tqEQrXbHQwY2fy5+ZjWQ2WPTs bJefnI8ZmRS2ZPp8X0hxVRX8lTG402X1V3VAiB2oPE0iMNvGYPjhvlxFU6XWhT5FUam/7dDIJ/WBb dpJC15uheyqHZBCTTrwA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pQ4mp-001BHm-HO; Thu, 09 Feb 2023 11:08:19 +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 1pQ4ml-001BFm-Ik for linux-arm-kernel@lists.infradead.org; Thu, 09 Feb 2023 11:08:17 +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 535EB5E972; Thu, 9 Feb 2023 12:07:49 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dh-electronics.com; s=dhelectronicscom; t=1675940869; bh=coWQwRg2rue2zvnmiMjsKb1UY8225zzHmoCBOjlpM6c=; h=From:To:CC:Subject:Date:In-Reply-To:References:From; b=On8IodrYmL27ETqQGCMBYPmwVcLNqksMDQRl8vr8eTwtVCWjNwK4qJKons/XzvSkN N9mTgYmerP0hdvKZUiLwn083OeWHQwOl+WI4iLI1xmrJIx2qZH9ISUP4RucbcC4Kqt Ybcq3376v6ZWrzbAGU1mNruGEY/cRP93DRu33yMQ1FJTCqNRrzg3Z9Vbbufn6zlGw4 wckKQOo8RhUgeEVbJni/Lnw+G/FTlmU0dFuo/pH4/MeU7fjZtaFbybZQ8X0dBQCjqz nDargxLpnNUwdXAzWj+L+bhvOeal5Y2LuW1e0IBcOmOb58/rXccfWkYV9EZ0Cre6M/ Ye6r+YvdzifhA== 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.21; Thu, 9 Feb 2023 11:52:34 +0100 Received: from Stretch-CN.dh-electronics.org (10.64.6.116) 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.21 via Frontend Transport; Thu, 9 Feb 2023 11:52:34 +0100 From: Christoph Niedermaier To: CC: Christoph Niedermaier , Support Opensource , Adam Thomson , Liam Girdwood , Mark Brown , Marek Vasut , , Subject: [PATCH V2 2/2] regulator: da9062: Make the use of IRQ optional Date: Thu, 9 Feb 2023 11:51:44 +0100 Message-ID: <20230209105144.9351-2-cniedermaier@dh-electronics.com> X-Mailer: git-send-email 2.11.0 X-klartext: yes In-Reply-To: <20230209105144.9351-1-cniedermaier@dh-electronics.com> References: <20230209105144.9351-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-20230209_030815_868378_FAA5566F X-CRM114-Status: GOOD ( 16.64 ) 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 --- 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,