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 A03B9C61DA4 for ; Thu, 16 Feb 2023 12:07:57 +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=ag37fZFQFfwg7e6TyvSP/WrE8ZTpqsNKZUYP6+h6lOU=; b=0cNn24dXteNR2wGKn4l2xbRr/m 8rUpx8IOWPHCl3alrYBjWt3V4xmctlSKasYKYh/Kmh7elZvxyrMrb9hMN2dMp12pSwaEuz1cEHlQP yRC+x+GYdoHTX5CRFgcYMqYvAuqUNkuPS1STVVmmpcWeKhckElS7xl5K6ZUZgXO3VSKFNy5PVX2s0 /0yEQuz24WLO0cyl+oCqqLmRNJ8+5hh/VxG7HVRqRgnFpleNh11m1z1Z80LCVMLYLaOqlW0P2zYNB CxGcCslkbGX/QTeytqTtrFY9JfNaD6H7/o+YGFdJ/6YwJ4lLydzmm3/drTgj+ji8/cQrINi2ZcX8D ZzBOOsUg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pSd2G-00A5we-E4; Thu, 16 Feb 2023 12:06:49 +0000 Received: from mail-oa1-x2a.google.com ([2001:4860:4864:20::2a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pSd2B-00A5um-Jm for linux-arm-kernel@lists.infradead.org; Thu, 16 Feb 2023 12:06:45 +0000 Received: by mail-oa1-x2a.google.com with SMTP id 586e51a60fabf-15f97c478a8so2209471fac.13 for ; Thu, 16 Feb 2023 04:06:42 -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=mRWEN0keF6NiEd7O9ayzoP6wwuhhhF8V1d3xPTIxNoI=; b=CoYVjdLzmYKvj7Vd87G8M0+tYb1Ba3tu1VwpLjaeGT/voYVghBoZRmM3+NienWGtJU MeuZV+1IDBoQO59Jj+fWFaIIHgUFxpG6EyTJ+CSnW819UHaOAv9ugYbCRh7m94dzjC2k 5P0Otds2OcdruKvClfV1YcUlCxNC7O7iC4pesdlSbV8v1Xw+ibyXN2ukLOxwQ/WzGiSl qkfAUjvubdR7Lf9Dudmsni/8S6hkq9i3mIm9cQ3CNfSodZaLJZKuj7vf/OLtjIC3OL/W LUihx7TpXmnrgxDgiV6QlthzG9184i9sa4dGeoaLus31NR4hFhW00FPj8MW+q2sIFUWU dalQ== 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=mRWEN0keF6NiEd7O9ayzoP6wwuhhhF8V1d3xPTIxNoI=; b=gT1ImwvMG21lhv36a6W9XT9rarnAG4Q+w0f/vW+NAOAf9nyIygQ90b1o5mrpemZKEo a4lKtg60JCLYhd1dxMuNkJNDri9fT3Kyk4NCsmhGrBNESROAYO04GZqd1P4Iq+89gDL/ A6HfmDKVPHSyNpgxqSTLqBC5uaVWDaL+HVK3teREUxp+v8R6aETbZcYEzZWiEIeTNksr MAI4rFT3+mdzf8qk805G8oB0hwK9wMe/dKEKnMRsjU3IgaoXkZvaXzFfwjd1AN9Qskv3 h2QyIkuQrGJI+MmeyccsyRKjyVihbO3b7ufkkWhczjsP+nCPHiFotlawXMDkdEurLv+b 2Y/Q== X-Gm-Message-State: AO0yUKXcWBLwtMZSISMBt/RuM2eruWu0h5C4YpHppvHRxCCoqz4rYN9w umHnaX6Nru8taQ1yBKgjlHUaEA== X-Google-Smtp-Source: AK7set94J1nmitezcU13KRwKZUpuXlQCbbTw5DAP8kxFwGDFXsKNw5nnYXe6YgwYapp9po8R9SvLqQ== X-Received: by 2002:a05:6870:b51f:b0:16d:ea1d:6a6a with SMTP id v31-20020a056870b51f00b0016dea1d6a6amr2823105oap.40.1676549201345; Thu, 16 Feb 2023 04:06:41 -0800 (PST) Received: from fedora (69-109-179-158.lightspeed.dybhfl.sbcglobal.net. [69.109.179.158]) by smtp.gmail.com with ESMTPSA id m3-20020a056870a40300b00152c52608dbsm476595oal.34.2023.02.16.04.06.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Feb 2023 04:06:40 -0800 (PST) Date: Wed, 8 Feb 2023 06:17:14 -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 17/17] gpio: pcie-idio-24: Convert to immutable irq_chip Message-ID: References: <20230215-immutable-chips-v1-0-51a8f224a5d0@linaro.org> <20230215-immutable-chips-v1-17-51a8f224a5d0@linaro.org> MIME-Version: 1.0 In-Reply-To: <20230215-immutable-chips-v1-17-51a8f224a5d0@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230216_040643_685552_161AA678 X-CRM114-Status: GOOD ( 22.87 ) 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="===============0023055693977287028==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============0023055693977287028== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="cyeQsMhX/E0TO8qE" Content-Disposition: inline --cyeQsMhX/E0TO8qE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Feb 16, 2023 at 10:37:18AM +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 Acked-by: William Breathitt Gray > --- > drivers/gpio/gpio-pcie-idio-24.c | 12 +++++++++--- > 1 file changed, 9 insertions(+), 3 deletions(-) >=20 > diff --git a/drivers/gpio/gpio-pcie-idio-24.c b/drivers/gpio/gpio-pcie-id= io-24.c > index 8a9b98fa418f..ac42150f4009 100644 > --- a/drivers/gpio/gpio-pcie-idio-24.c > +++ b/drivers/gpio/gpio-pcie-idio-24.c > @@ -396,6 +396,8 @@ static void idio_24_irq_mask(struct irq_data *data) > } > =20 > raw_spin_unlock_irqrestore(&idio24gpio->lock, flags); > + > + gpiochip_disable_irq(chip, irqd_to_hwirq(data)); > } > =20 > static void idio_24_irq_unmask(struct irq_data *data) > @@ -408,6 +410,8 @@ static void idio_24_irq_unmask(struct irq_data *data) > const unsigned long bank_offset =3D bit_offset / 8; > unsigned char cos_enable_state; > =20 > + gpiochip_enable_irq(chip, irqd_to_hwirq(data)); > + > raw_spin_lock_irqsave(&idio24gpio->lock, flags); > =20 > prev_irq_mask =3D idio24gpio->irq_mask >> bank_offset * 8; > @@ -437,12 +441,14 @@ static int idio_24_irq_set_type(struct irq_data *da= ta, unsigned int flow_type) > return 0; > } > =20 > -static struct irq_chip idio_24_irqchip =3D { > +static const struct irq_chip idio_24_irqchip =3D { > .name =3D "pcie-idio-24", > .irq_ack =3D idio_24_irq_ack, > .irq_mask =3D idio_24_irq_mask, > .irq_unmask =3D idio_24_irq_unmask, > - .irq_set_type =3D idio_24_irq_set_type > + .irq_set_type =3D idio_24_irq_set_type, > + .flags =3D IRQCHIP_IMMUTABLE, > + GPIOCHIP_IRQ_RESOURCE_HELPERS, > }; > =20 > static irqreturn_t idio_24_irq_handler(int irq, void *dev_id) > @@ -535,7 +541,7 @@ static int idio_24_probe(struct pci_dev *pdev, const = struct pci_device_id *id) > idio24gpio->chip.set_multiple =3D idio_24_gpio_set_multiple; > =20 > girq =3D &idio24gpio->chip.irq; > - girq->chip =3D &idio_24_irqchip; > + gpio_irq_chip_set_chip(girq, &idio_24_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 --cyeQsMhX/E0TO8qE Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQSNN83d4NIlKPjon7a1SFbKvhIjKwUCY+OEugAKCRC1SFbKvhIj K02BAP91FSltXanO1Y/3GfoNBCJE7RStvsFHG9hsQlUmwpOJuwEA/eYRZLIo5k9G AtVeJJfhJC6J5AUcb0/9/dTNIIukVQ4= =HUho -----END PGP SIGNATURE----- --cyeQsMhX/E0TO8qE-- --===============0023055693977287028== 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 --===============0023055693977287028==--