Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2655087pxb; Tue, 12 Oct 2021 10:43:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxpxz43sm1hMT9p8mjHFcuBk5p3U2X7m6OezLdsLYAyRTYEvEkimt/TqIyuNXBmhE774lor X-Received: by 2002:a63:1c10:: with SMTP id c16mr23708881pgc.170.1634060591888; Tue, 12 Oct 2021 10:43:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634060591; cv=none; d=google.com; s=arc-20160816; b=F1Inu7Qk4qiawyEfTwSrdaTeirMwt0NW9I+8Gb93GW5YIGHTMGAMt6L2h1pYvuNFnZ Kiqs7ULPkjXpy6q4HY0Ewkie2ibkRrRyUMssX9m1adNX05CigKQviXLrwycCMUIcbwsv IonNPto2KZA1mN9F1L7q+TxRkKn4iv0KoYAo6EEaf6rukNMfjwQXHAhpuqofwOnFzJDE hAayWS9GqPpOf40BqSL/LCLsZTsZcjpqkX82O6Huc+tkNWJxSzDvNtV59Lm+iHGIHoso V92EZZu1FjIuhdOL9y6zR3NsSsh7sjSN9k4QMnHYHEtTRgqI2F5m5OebalVqEJxxrcwa WMFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:message-id:date:to:cc:from:subject :references:in-reply-to:content-transfer-encoding:mime-version :dkim-signature; bh=qL5HHMF6Mwemq6cmNX6rgnyCyb+TxFUh7lZ2guY2Kio=; b=is/gHUjt/5IBBYAzxzPJos7C2PXvqKY0xiQ8jZn3nBoEzAP6Gr4RqKcLg7BfPHHZPn 0mOvfUEcQz64ogBqUgAEtiZDw4sgwMpx1qLG+1V6dNfIxwpoQiMcg8GuXAN14tYctOQR /6BMbTl4WDwx9Bn4xf8/cfx/61qWKJ3yDN46rUeGEH9Gns7eKex6DmziS6q+bK1922Xo gXKftCDLf+8wNJ6a7z+WJ70zTXlX6PdZF6SSm80Bg0NdHF+9kt+QQFdKYKdZztqxol35 W8pRy9lLVSKV1nL+J/mj7y7iTOR5hK9l74La6iCVyRUfOmO75fUZB8Zfk5uMrhoSIyZm ZuuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hTK3deVc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d22si7007093pfv.30.2021.10.12.10.42.58; Tue, 12 Oct 2021 10:43:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hTK3deVc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230394AbhJLRn5 (ORCPT + 99 others); Tue, 12 Oct 2021 13:43:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:56520 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229495AbhJLRn4 (ORCPT ); Tue, 12 Oct 2021 13:43:56 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id CA4DD610C9; Tue, 12 Oct 2021 17:41:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1634060514; bh=ZwD/HIm+5qJHTS5AGFULHjjui4GevfWYy8Os8F415SI=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=hTK3deVcSxYMEoQ7t4J3jVPGe9C1u9MqDclSvwUhCRDlvGdDJ5FmPP9QZwOF2xcjG wUEVrk9wRd/gl06+L+CkI1ZTXjRcJvLt7IwqI0IqRKMY7WeqlDAEbxkzsbIjaYuc6R J7LneXS1WjDyZurnlBy0KxVBFQTrfu6meaPgx889DwH5fROk1Rf/ne+0zNJpRMexgw esLWOSwZpUeayxC0PD4Lh+zYQEHUeIi9n2M91oQWtI7fn7fHvI8M1nrKxQlL/+1B4e K3wuoahEobxZEfmAGCxgz0YXJ87hhy+dPoMTEhztQzf6A5qZ01uyTC/Op7KfhUmf4q viWx/J48hgITQ== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <1631860384-26608-9-git-send-email-quic_fenglinw@quicinc.com> References: <1631860384-26608-1-git-send-email-quic_fenglinw@quicinc.com> <1631860384-26608-9-git-send-email-quic_fenglinw@quicinc.com> Subject: Re: [RESEND PATCH v1 8/9] spmi: pmic-arb: make interrupt support optional From: Stephen Boyd Cc: collinsd@codeaurora.org, subbaram@codeaurora.org, quic_fenglinw@quicinc.com To: Fenglin Wu , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Date: Tue, 12 Oct 2021 10:41:53 -0700 Message-ID: <163406051353.936959.12718174954614897750@swboyd.mtv.corp.google.com> User-Agent: alot/0.9.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Fenglin Wu (2021-09-16 23:33:03) > From: David Collins >=20 > Make the support of PMIC peripheral interrupts optional for > spmi-pmic-arb devices. This is useful in situations where > SPMI address mapping is required without the need for IRQ > support. >=20 > Signed-off-by: David Collins > Signed-off-by: Fenglin Wu > --- > drivers/spmi/spmi-pmic-arb.c | 45 +++++++++++++++++++++++++++-----------= ------ Is there a binding update? Can the binding be converted to YAML as well? > 1 file changed, 28 insertions(+), 17 deletions(-) >=20 > diff --git a/drivers/spmi/spmi-pmic-arb.c b/drivers/spmi/spmi-pmic-arb.c > index 988204c..55fa981 100644 > --- a/drivers/spmi/spmi-pmic-arb.c > +++ b/drivers/spmi/spmi-pmic-arb.c > @@ -1280,10 +1280,12 @@ static int spmi_pmic_arb_probe(struct platform_de= vice *pdev) > goto err_put_ctrl; > } > =20 > - pmic_arb->irq =3D platform_get_irq_byname(pdev, "periph_irq"); > - if (pmic_arb->irq < 0) { > - err =3D pmic_arb->irq; > - goto err_put_ctrl; > + if (of_find_property(pdev->dev.of_node, "interrupt-names", NULL))= { I don't think we should be keying off of interrupt-names. Instead we should be checking for something else. Maybe interrupt-controller property? > + pmic_arb->irq =3D platform_get_irq_byname(pdev, "periph_i= rq"); > + if (pmic_arb->irq < 0) { > + err =3D pmic_arb->irq; > + goto err_put_ctrl;