From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maxime Ripard Subject: Re: [RFC PATCH v2 05/14] irqchip/sun4i: add support for suniv interrupt controller Date: Tue, 20 Nov 2018 09:48:15 +0100 Message-ID: <20181120084815.rvh63cvvhxj6sbs2@flea> References: Reply-To: maxime.ripard-LDxbnhwyfcJBDgjK7y7TUQ@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="7nbopu3lgekzonta" Return-path: Sender: linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Content-Disposition: inline In-Reply-To: List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , To: Mesih Kilinc Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-clk-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org, Chen-Yu Tsai , Russell King , Daniel Lezcano , Marc Zyngier , Linus Walleij , Icenowy Zheng , Rob Herring , Julian Calaby List-Id: devicetree@vger.kernel.org --7nbopu3lgekzonta Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Hi, On Sun, Nov 18, 2018 at 05:17:04PM +0300, Mesih Kilinc wrote: > The new F-series SoCs (suniv) from Allwinner use an stripped version of > the interrupt controller in A10/A13. > > Add support for it in irq-sun4i driver. > > Signed-off-by: Icenowy Zheng > Signed-off-by: Mesih Kilinc > --- > drivers/irqchip/irq-sun4i.c | 47 ++++++++++++++++++++++++++++++++++++++++----- > 1 file changed, 42 insertions(+), 5 deletions(-) > > diff --git a/drivers/irqchip/irq-sun4i.c b/drivers/irqchip/irq-sun4i.c > index e3e5b91..2abf662 100644 > --- a/drivers/irqchip/irq-sun4i.c > +++ b/drivers/irqchip/irq-sun4i.c > @@ -23,13 +23,26 @@ > > #include > > +enum sun4i_irq_type { > + sun4i_ic, > + suniv_ic > +}; > + > +static enum sun4i_irq_type sun4i_irq_type; You don't really need that type. It's completely redundant with the compatible. > +static int sun4i_irq_enable_reg_offset; > +static int sun4i_irq_mask_reg_offset; Ideally, this should be a structure so that we can easily extend it without adding more and more global variables. And the type shouldn't be signed. Maxime -- Maxime Ripard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com --7nbopu3lgekzonta--