From mboxrd@z Thu Jan 1 00:00:00 1970 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 674A9C61DA4 for ; Thu, 16 Feb 2023 12:07:27 +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-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=iQTFuZg+1IaYknFTeRrHqOEYSDrzNCGNBcpnSrG/vCM=; b=N/IpnkdadwPCHDHiSDXi2HqSX1 Cbm3I2gF0YSR8c+54UO6E0OpgXAiYmYSt8v0B+WEcsJ7drsZ/SYGj5DqQ37H8SLAAW/J3CgVBxva9 dXiHcxNZ1fKR6VO783KpPlOJsgYCO91dT56dizJBRvr8pxDVtKjeCzX0RcWaBgw5ZYG2sE9IxMkua 9m2+kht5E/p99urHwDFMPpBJDwLoWSEmsbUIGO0Yxie8P5wvoWA3uy8X8JQgv/rSxEN7uIQ3gleX/ K8p08RGMQ53nBCqiB1HKFAuxGr9kwYC7YDbbUbglWqbli1Mlpz/E0he3rPOJ+svt+x0oJi/homM0s jgjfbf/w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pSd1o-00A5nj-Ms; Thu, 16 Feb 2023 12:06:21 +0000 Received: from mail-ot1-x335.google.com ([2607:f8b0:4864:20::335]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pSd1k-00A5lJ-78 for linux-arm-kernel@lists.infradead.org; Thu, 16 Feb 2023 12:06:17 +0000 Received: by mail-ot1-x335.google.com with SMTP id 38-20020a9d04a9000000b0068f24f576c5so516141otm.11 for ; Thu, 16 Feb 2023 04:06:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=uglBygBs9ijyHk9bCgsz1JnjSH+tWIY8t2J8IkoGaKg=; b=OxdaKe43FG9pkV/bxMqLQm3QB4w5+H6Nr/d+Bjy8+kEDM3NJEhkGNiSMjs3fsLD7nX 3FQL3VJawYluNdpGWKhI0CjkAQEJJ0k3lKaioo9f336frqO1cuVZtKtUcEpMmj3Q8HnO VKlCxnjEruwsZ+y9RMnSfEXge6AGxzVKYQ7rMLP5iJEMNcZjr4oT5VDcToTZjzAtvSja 3xs6UQaKA5O5AAeox08IcxpMEml2d+IZwaPiKmacDw3lWpGyRi4/ovKLZPZ+2llCiSRY UOZt0X5DNWwDYjiNEGh4ij+s8vL2gbmYTOLAdfTolGGIPH7/Y12V0HHcEyXM3THm3ctI 1HFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=uglBygBs9ijyHk9bCgsz1JnjSH+tWIY8t2J8IkoGaKg=; b=5RjCj0tFTIKVmXsvqLooemyqkHrtkoIP4EKkIlkLIVFhJZFoKjI3EnK48uy+ooql/N Mb59/P03ZJfOdDVjha4acsyAVKIo206ZeJ56h4pC62ZfwaY7nZ8WAFVnBgBL41adnRoJ zyJtlp78Jtjg/U9pieF1C2xMyG2NtmPEv4rI6zkuqB6RTu62nD/5+uZHcrJ2sVhSJ5qx QtySdYz5J2SFyK0UszWHf4Sg6WT9t02p7mHo2ie5qutHWl1Mwe6TuuGkX56Ilhl/0+B5 oKy9ZKuobeYeTPOOGMYJvjPPIUggk6zAYxa/Hpq338JxsEciJlzONv3xrOMGRA4aItmR 7ENw== X-Gm-Message-State: AO0yUKUZ0VNau42CO6OdHVdxY7pkz0BDy+sKoOMGW8FeMQwGmyDuvFLU x6eN4oGrmXVJlDlUekxAukxNKg== X-Google-Smtp-Source: AK7set/QViwHWfznjRNuw1BE1wQ1msM8bPS/oX7O9gJb49xGfWna2ZIBMwHXu83+kYvTCy95yhddwg== X-Received: by 2002:a05:6830:2a04:b0:68d:6175:d5b9 with SMTP id y4-20020a0568302a0400b0068d6175d5b9mr778243otu.19.1676549173177; Thu, 16 Feb 2023 04:06:13 -0800 (PST) Received: from fedora (69-109-179-158.lightspeed.dybhfl.sbcglobal.net. [69.109.179.158]) by smtp.gmail.com with ESMTPSA id n12-20020a9d64cc000000b0068d4a8a8d40sm544774otl.81.2023.02.16.04.06.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Feb 2023 04:06:12 -0800 (PST) Date: Wed, 8 Feb 2023 06:16:44 -0500 From: William Breathitt Gray To: Linus Walleij Cc: Mun Yew Tham , Bartosz Golaszewski , Joel Stanley , Andrew Jeffery , Alban Bedel , Orson Zhai , Baolin Wang , Chunyan Zhang , Jay Fang , Daniel Palmer , Romain Perier , Grygorii Strashko , Santosh Shilimkar , Kevin Hilman , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org, linux-omap@vger.kernel.org, Marc Zyngier Subject: Re: [PATCH 16/17] gpio: pci-idio-16: Convert to immutable irq_chip Message-ID: References: <20230215-immutable-chips-v1-0-51a8f224a5d0@linaro.org> <20230215-immutable-chips-v1-16-51a8f224a5d0@linaro.org> MIME-Version: 1.0 In-Reply-To: <20230215-immutable-chips-v1-16-51a8f224a5d0@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230216_040616_284484_DEB3C842 X-CRM114-Status: GOOD ( 24.41 ) 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: , Content-Type: multipart/mixed; boundary="===============2617645250011534257==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============2617645250011534257== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="AySwEFEhj9sTbaXz" Content-Disposition: inline --AySwEFEhj9sTbaXz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Feb 16, 2023 at 10:37:17AM +0100, Linus Walleij wrote: > Convert the driver to immutable irq-chip with a bit of > intuition. >=20 > Cc: Marc Zyngier > Signed-off-by: Linus Walleij FYI, I'm migrating pci-idio-16 to the regmap-irq API soon, so this patch might not be necessary once the code is removed. Anyway, here's my ack in case this patch series is merged first. Acked-by: William Breathitt Gray > --- > drivers/gpio/gpio-pci-idio-16.c | 12 +++++++++--- > 1 file changed, 9 insertions(+), 3 deletions(-) >=20 > diff --git a/drivers/gpio/gpio-pci-idio-16.c b/drivers/gpio/gpio-pci-idio= -16.c > index a86ce748384b..6726c32e31e6 100644 > --- a/drivers/gpio/gpio-pci-idio-16.c > +++ b/drivers/gpio/gpio-pci-idio-16.c > @@ -107,6 +107,8 @@ static void idio_16_irq_mask(struct irq_data *data) > =20 > raw_spin_unlock_irqrestore(&idio16gpio->lock, flags); > } > + > + gpiochip_disable_irq(chip, irqd_to_hwirq(data)); > } > =20 > static void idio_16_irq_unmask(struct irq_data *data) > @@ -117,6 +119,8 @@ static void idio_16_irq_unmask(struct irq_data *data) > const unsigned long prev_irq_mask =3D idio16gpio->irq_mask; > unsigned long flags; > =20 > + gpiochip_enable_irq(chip, irqd_to_hwirq(data)); > + > idio16gpio->irq_mask |=3D mask; > =20 > if (!prev_irq_mask) { > @@ -138,12 +142,14 @@ static int idio_16_irq_set_type(struct irq_data *da= ta, unsigned int flow_type) > return 0; > } > =20 > -static struct irq_chip idio_16_irqchip =3D { > +static const struct irq_chip idio_16_irqchip =3D { > .name =3D "pci-idio-16", > .irq_ack =3D idio_16_irq_ack, > .irq_mask =3D idio_16_irq_mask, > .irq_unmask =3D idio_16_irq_unmask, > - .irq_set_type =3D idio_16_irq_set_type > + .irq_set_type =3D idio_16_irq_set_type, > + .flags =3D IRQCHIP_IMMUTABLE, > + GPIOCHIP_IRQ_RESOURCE_HELPERS, > }; > =20 > static irqreturn_t idio_16_irq_handler(int irq, void *dev_id) > @@ -242,7 +248,7 @@ static int idio_16_probe(struct pci_dev *pdev, const = struct pci_device_id *id) > idio_16_state_init(&idio16gpio->state); > =20 > girq =3D &idio16gpio->chip.irq; > - girq->chip =3D &idio_16_irqchip; > + gpio_irq_chip_set_chip(girq, &idio_16_irqchip); > /* This will let us handle the parent IRQ in the driver */ > girq->parent_handler =3D NULL; > girq->num_parents =3D 0; >=20 > --=20 > 2.34.1 >=20 --AySwEFEhj9sTbaXz Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQSNN83d4NIlKPjon7a1SFbKvhIjKwUCY+OEnAAKCRC1SFbKvhIj K5eCAPwLmxXCtGXXgP0akD13UFw7dXSdGyxVszeP+0DYBG+nUwD9GF6hkUXvQwOW 2bR53NrSasEyxAdN84aY3rFim+gKKQE= =Zw1V -----END PGP SIGNATURE----- --AySwEFEhj9sTbaXz-- --===============2617645250011534257== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============2617645250011534257==--