Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5684979rwb; Tue, 22 Nov 2022 03:38:10 -0800 (PST) X-Google-Smtp-Source: AA0mqf7ej71p0uuy+2OXGVEww6wk7IbudoL2iB1upHtipI3Eo0ByYfEYeQIfxh1s3nZNf1iKvtRl X-Received: by 2002:a63:5910:0:b0:477:2793:f821 with SMTP id n16-20020a635910000000b004772793f821mr19430754pgb.150.1669117089825; Tue, 22 Nov 2022 03:38:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669117089; cv=none; d=google.com; s=arc-20160816; b=reT/4Iy6sJDbW3sH7IacFsb9lJe+VZ5omBrmblvE3yCCwxk53/EGUe5V7loYn1u7P6 7pX0Kb2vixQzkml9+un4ki3qSdZvt/WN2SpzBI7HUHhBgbRHIVrtR4AJfIm8POpRp4s8 UPAbOK9ehV/OlfqH7MWfDFDu3eKkakqCgevH+iwqwRI769flsBg0NuXnu1zgLyiALiZz 9f2t2rkm+WZpi0qThEEXRAcbILdxsScVP6OtoomcqCqBk3PcpRABxcjXnXyYVGpeDpR9 mBH7HZEUlAdoTI6mT2m+W4dtvaiJaFigrq7fxnbDoTxc1jGfYFENxFodJoK36tYiFw24 GArQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=8/2f5/wC+/WGNHGQUshaA3bZxyQCSCGtdkYvUN/IFBU=; b=pX05L1mZ/ssykYTfKZ9ptpEkBcJkzQFTMb81UU7b3oL78SX+HrAXAs6XtF6cX8T532 T+N+EdiidcCl3ZocgEX5t3JVdT2eTNrl+UmXM7GbP6GHmdW6VqtCj2alZ/zes9Zas6yW ghiDwwbMMczaY9LG0urg6tfwJwki/h2yo/+Rbzi35FzJ2AWmdq+3SH5Oc0HHr8RERL/1 KN2HsfztEo/fm7Ww/tOzOEVGRoOxfUsWs/y8tFQbwi49gQ4bcTss89fFayx2bd/naoLP VAbsGUIkBTrAUFdy3ELi5gEGMOtLREGDLNbC2Oyx2Q8uCvlh7pFn5nz5RrevquHUQuy3 4y0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dh-electronics.com header.s=dhelectronicscom header.b=d0pAPsyx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=dh-electronics.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q12-20020a17090311cc00b0018862f74f4dsi15466230plh.491.2022.11.22.03.37.56; Tue, 22 Nov 2022 03:38:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@dh-electronics.com header.s=dhelectronicscom header.b=d0pAPsyx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=dh-electronics.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232498AbiKVKsH (ORCPT + 90 others); Tue, 22 Nov 2022 05:48:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40752 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232277AbiKVKrp (ORCPT ); Tue, 22 Nov 2022 05:47:45 -0500 X-Greylist: delayed 2685 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Tue, 22 Nov 2022 02:45:46 PST Received: from mx2.securetransport.de (mx2.securetransport.de [IPv6:2a03:4000:13:6c7::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id CC455260B for ; Tue, 22 Nov 2022 02:45:46 -0800 (PST) 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 Content-Type: text/plain X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 --- 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, -- 2.11.0