Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp5227116rwl; Wed, 28 Dec 2022 15:15:16 -0800 (PST) X-Google-Smtp-Source: AMrXdXspE66vDl01oSMsI501qKi23mJKQoHOby9EG0yQfJxE0tlCmfPd4+dAQV7XRujJxS6yE6or X-Received: by 2002:a17:90a:348d:b0:223:d8c3:c714 with SMTP id p13-20020a17090a348d00b00223d8c3c714mr27824055pjb.37.1672269316084; Wed, 28 Dec 2022 15:15:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672269316; cv=none; d=google.com; s=arc-20160816; b=t5BQ0wKo3ROcuAlXQcqJVBOB7qFWsW6XAllCgXAa/w841BGPUO3an6pM9g45m9Iohc W3zYdOoZxZNdQ+bC0GYRfnunAcczvbbAHE289vtp/wY6GsGSNJD4eYQcUaWErsdxdFug sU0pnhXWIgSAufHpmSSFPgcs95y//Qy0KhpGZl3uJBXgzbb/rzaKcBaT4BMgw8Mh4oqe W4TbvtUDzZwyvsjNorBfRUB8VkxorPOmVwUWrV2wP3TWviZUeXop134xud2NqJbhN4LI iUm599rYrxvto50aHt94sv/B9lexeIoayRO/BCDXap30QqnT7yc7zLp7i8OmwyEEro8f DPJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=1Pycl+bFLJ+2DmkDNNq9l50/98laZv6ZWPmDoBa0IXQ=; b=i4ibIsUmpgP61GBeCfPpwVGa/VaJMve6UeSNTs6pFXnVQGUecvoAL2t/AQRgLAcyQ7 FIcTMd7mF3NTLou2V4oeuP+wTJ4JzD4YzJ5wvVYbgCvwX9miVNT9zAxLqXwzZ8NpmqwN CuWfVQ8BYpSw2ms1VeyREkt74LQdbeSXvh4gNSwdYi110wQXWj+8YQrttthe0Eubps8u 9bXzuTJZSMeIfNEInYaieCdDRC6YFs+QEd1rO1CoYtyGLw/lafzH4xM++x+Kcxjum0Q8 lic444gDwcd96CSXUql86C9yLtGNeMmqvfUdxwbUSk61q6ZU07qMnhghXXvfoKJr4kHd ZUYg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p2-20020a17090a748200b00225c981fee5si14493583pjk.112.2022.12.28.15.15.07; Wed, 28 Dec 2022 15:15:16 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231183AbiL1Wy2 (ORCPT + 63 others); Wed, 28 Dec 2022 17:54:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59006 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229835AbiL1Wy0 (ORCPT ); Wed, 28 Dec 2022 17:54:26 -0500 Received: from relay04.th.seeweb.it (relay04.th.seeweb.it [5.144.164.165]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 03AAC14D36; Wed, 28 Dec 2022 14:54:24 -0800 (PST) Received: from SoMainline.org (94-211-6-86.cable.dynamic.v4.ziggo.nl [94.211.6.86]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by m-r1.th.seeweb.it (Postfix) with ESMTPSA id 1FB5F1F8BE; Wed, 28 Dec 2022 23:54:22 +0100 (CET) Date: Wed, 28 Dec 2022 23:54:10 +0100 From: Marijn Suijten To: Bryan O'Donoghue Cc: cw00.choi@samsung.com, myungjoo.ham@samsung.com, andersson@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, gregkh@linuxfoundation.org, agross@kernel.org, konrad.dybcio@linaro.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: Re: [PATCH v4 2/2 RESEND] extcon: qcom-spmi: Switch to platform_get_irq_byname_optional Message-ID: <20221228225410.dejid2ezu52xfzay@SoMainline.org> References: <20221228133058.213886-1-bryan.odonoghue@linaro.org> <20221228133058.213886-3-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221228133058.213886-3-bryan.odonoghue@linaro.org> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, 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 On 2022-12-28 13:30:58, Bryan O'Donoghue wrote: > Valid configurations for the extcon interrupt declarations are > > - usb_id > - usb_vbus > - (usb_id | usb_vbus) > > In the case of a standalone usb_id or usb_vbus failure to find one of the > interrupts shouldn't generate a warning message. A warning is already in > place if both IRQs are missing. > > Switch to using platform_get_irq_byname_optional() in order to facilitate > this behaviour. > > Suggested-by: Marijn Suijten > Signed-off-by: Bryan O'Donoghue Reviewed-by: Marijn Suijten > --- > drivers/extcon/extcon-qcom-spmi-misc.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/extcon/extcon-qcom-spmi-misc.c b/drivers/extcon/extcon-qcom-spmi-misc.c > index eb02cb962b5e1..f72e90ceca53d 100644 > --- a/drivers/extcon/extcon-qcom-spmi-misc.c > +++ b/drivers/extcon/extcon-qcom-spmi-misc.c > @@ -123,7 +123,7 @@ static int qcom_usb_extcon_probe(struct platform_device *pdev) > if (ret) > return ret; > > - info->id_irq = platform_get_irq_byname(pdev, "usb_id"); > + info->id_irq = platform_get_irq_byname_optional(pdev, "usb_id"); > if (info->id_irq > 0) { > ret = devm_request_threaded_irq(dev, info->id_irq, NULL, > qcom_usb_irq_handler, > @@ -136,7 +136,7 @@ static int qcom_usb_extcon_probe(struct platform_device *pdev) > } > } > > - info->vbus_irq = platform_get_irq_byname(pdev, "usb_vbus"); > + info->vbus_irq = platform_get_irq_byname_optional(pdev, "usb_vbus"); > if (info->vbus_irq > 0) { > ret = devm_request_threaded_irq(dev, info->vbus_irq, NULL, > qcom_usb_irq_handler, > -- > 2.34.1 >