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 X-Spam-Level: X-Spam-Status: No, score=-15.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D4FFDC63777 for ; Mon, 30 Nov 2020 08:22:12 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4BAE120719 for ; Mon, 30 Nov 2020 08:22:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Tnfrh6Ic"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="Pj01KIS0" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4BAE120719 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-ID:References:In-Reply-To:Subject:To:From: Date:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=QMcAWW9UAFIppSCPw1Vocih9y2X+/TkQShlvu30JVTk=; b=Tnfrh6IcxaKT1LKcbP7omAC8S zZKemzVGLlbqKi9n/rllqk4GUipM2TNXeBYCbOVvSbIGW/9kvkAs5PN6VO2m57lPo0PHYaEtAaWA8 a2Z83zjgT6lHWDJuQUsDXqxwbmEVq/DzUB1gnixXRhr3GoXH4P251/ShCQ5hsH59duoMOTYd8Q5Y9 TudTyPdz0M/4pYGlhY3xgFr/c7oY+DztISBE3GLz3eJj8UG2lCPN1r7fdjg/BDJHxdZsOct4muxFj kzQmgCwpFgEXt5gwKdHVVP9OWsax9D2YhwxGvZqXfOsXt6bKCWs3WPesA2zWKWg92Xi7vYH+GBopo qjOJWW1Lw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kjeQ7-00083g-Ft; Mon, 30 Nov 2020 08:20:27 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kjeQ4-00083J-Cl for linux-arm-kernel@lists.infradead.org; Mon, 30 Nov 2020 08:20:25 +0000 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 38EEE20719; Mon, 30 Nov 2020 08:20:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1606724421; bh=zcO96qtwubsSF8tB+hhDMt+At4k19t+kqouww3vPuE8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Pj01KIS0LUbgJwVKCBh81A6equxHcvYnAKUflGYw2ytrPzzJvRcDX0VagP6AXHGyy hApIBQhIefQWNTcOkS9BP8j5/pP2+UFy6jfCCaW0ft3Nya2CIQMDqjz/0vd+AFyzx8 laDHmu6R6+BMECqR7zki2TCfsep4eiKSiSfNx8pM= Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94) (envelope-from ) id 1kjePz-00EcjO-0n; Mon, 30 Nov 2020 08:20:19 +0000 MIME-Version: 1.0 Date: Mon, 30 Nov 2020 08:20:18 +0000 From: Marc Zyngier To: Biwen Li Subject: Re: [v3 01/11] irqchip: ls-extirq: Add LS1043A, LS1088A external interrupt In-Reply-To: <20201130033055.38462-1-biwen.li@oss.nxp.com> References: <20201130033055.38462-1-biwen.li@oss.nxp.com> User-Agent: Roundcube Webmail/1.4.9 Message-ID: <1271261ba2ad021041e0ba331c96a2d7@kernel.org> X-Sender: maz@kernel.org X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: biwen.li@oss.nxp.com, linux@rasmusvillemoes.dk, shawnguo@kernel.org, robh+dt@kernel.org, mark.rutland@arm.com, leoyang.li@nxp.com, zhiqiang.hou@nxp.com, tglx@linutronix.de, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, jiafei.pan@nxp.com, xiaobo.xie@nxp.com, linux-arm-kernel@lists.infradead.org, biwen.li@nxp.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201130_032024_592164_C65FB8B4 X-CRM114-Status: GOOD ( 19.70 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, devicetree@vger.kernel.org, Biwen Li , zhiqiang.hou@nxp.com, linux@rasmusvillemoes.dk, linux-kernel@vger.kernel.org, leoyang.li@nxp.com, robh+dt@kernel.org, linux-arm-kernel@lists.infradead.org, tglx@linutronix.de, shawnguo@kernel.org, jiafei.pan@nxp.com, xiaobo.xie@nxp.com Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org [- jason] On 2020-11-30 03:30, Biwen Li wrote: > From: Hou Zhiqiang > > Add an new IRQ chip declaration for LS1043A and LS1088A > - compatible "fsl,ls1043a-extirq" for LS1043A, LS1046A. > - compatible "fsl,ls1088a-extirq" for LS1088A, LS208xA, LX216xA > > Signed-off-by: Hou Zhiqiang > Signed-off-by: Biwen Li > --- > Change in v3: > - cleanup code > - remove robust copyright > > Change in v2: > - add despcription of bit reverse > - update copyright > > drivers/irqchip/irq-ls-extirq.c | 17 +++++++---------- > 1 file changed, 7 insertions(+), 10 deletions(-) > > diff --git a/drivers/irqchip/irq-ls-extirq.c > b/drivers/irqchip/irq-ls-extirq.c > index 4d1179fed77c..47804ce78b21 100644 > --- a/drivers/irqchip/irq-ls-extirq.c > +++ b/drivers/irqchip/irq-ls-extirq.c > @@ -18,7 +18,7 @@ > struct ls_extirq_data { > struct regmap *syscon; > u32 intpcr; > - bool bit_reverse; > + bool is_ls1021a_or_ls1043a; > u32 nirq; > struct irq_fwspec map[MAXIRQ]; > }; > @@ -30,7 +30,7 @@ ls_extirq_set_type(struct irq_data *data, unsigned > int type) > irq_hw_number_t hwirq = data->hwirq; > u32 value, mask; > > - if (priv->bit_reverse) > + if (priv->is_ls1021a_or_ls1043a) > mask = 1U << (31 - hwirq); > else > mask = 1U << hwirq; > @@ -174,14 +174,9 @@ ls_extirq_of_init(struct device_node *node, > struct device_node *parent) > if (ret) > goto out; > > - if (of_device_is_compatible(node, "fsl,ls1021a-extirq")) { > - u32 revcr; > - > - ret = regmap_read(priv->syscon, LS1021A_SCFGREVCR, &revcr); > - if (ret) > - goto out; > - priv->bit_reverse = (revcr != 0); > - } This isn't explained in the commit message. You are changing the way you infer some properties, and that's not innocent. Please describe all important changes in the commit message. > + if (of_device_is_compatible(node, "fsl,ls1021a-extirq") || \ Spurious trailing \? > + of_device_is_compatible(node, "fsl,ls1043a-extirq")) > + priv->is_ls1021a_or_ls1043a = true; Which is better written as: priv->is_ls1021a_or_ls1043a = (of_device_is_compatible(node, "fsl,ls1021a-extirq") || of_device_is_compatible(node, "fsl,ls1043a-extirq")); > > domain = irq_domain_add_hierarchy(parent_domain, 0, priv->nirq, node, > &extirq_domain_ops, priv); > @@ -195,3 +190,5 @@ ls_extirq_of_init(struct device_node *node, struct > device_node *parent) > } > > IRQCHIP_DECLARE(ls1021a_extirq, "fsl,ls1021a-extirq", > ls_extirq_of_init); > +IRQCHIP_DECLARE(ls1043a_extirq, "fsl,ls1043a-extirq", > ls_extirq_of_init); > +IRQCHIP_DECLARE(ls1088a_extirq, "fsl,ls1088a-extirq", > ls_extirq_of_init); Thanks, M. -- Jazz is not dead. It just smells funny... _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel