[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d82620dd33bdd6bb4d34e49600a506d1@www.loen.fr>
Date: Tue, 12 Nov 2019 14:07:21 +0109
From: Marc Zyngier <maz@...nel.org>
To: Yash Shah <yash.shah@...ive.com>
Cc: <linus.walleij@...aro.org>, <bgolaszewski@...libre.com>,
<robh+dt@...nel.org>, <mark.rutland@....com>, <palmer@...belt.com>,
"Paul Walmsley ( Sifive)" <paul.walmsley@...ive.com>,
<aou@...s.berkeley.edu>, <tglx@...utronix.de>,
<jason@...edaemon.net>, <bmeng.cn@...il.com>,
<atish.patra@....com>, Sagar Kadam <sagar.kadam@...ive.com>,
<linux-gpio@...r.kernel.org>, <devicetree@...r.kernel.org>,
<linux-riscv@...ts.infradead.org>, <linux-kernel@...r.kernel.org>,
Sachin Ghadi <sachin.ghadi@...ive.com>
Subject: Re: [PATCH 3/4] gpio: sifive: Add GPIO driver for SiFive SoCs
On 2019-11-12 13:21, Yash Shah wrote:
> Adds the GPIO driver for SiFive RISC-V SoCs.
>
> Signed-off-by: Wesley W. Terpstra <wesley@...ive.com>
> [Atish: Various fixes and code cleanup]
> Signed-off-by: Atish Patra <atish.patra@....com>
> Signed-off-by: Yash Shah <yash.shah@...ive.com>
[...]
> +static int sifive_gpio_child_to_parent_hwirq(struct gpio_chip *gc,
> + unsigned int child,
> + unsigned int child_type,
> + unsigned int *parent,
> + unsigned int *parent_type)
> +{
> + /* All these interrupts are level high in the CPU */
> + *parent_type = IRQ_TYPE_LEVEL_HIGH;
It is bizare that you enforce LEVEL_HIGH here, while setting it to NONE
in the PLIC driver. These things should be consistent.
> + *parent = child + 7;
Irk, magic numbers...
M.
--
Jazz is not dead. It just smells funny...
Powered by blists - more mailing lists