lkml.org 
[lkml]   [2017]   [Aug]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] gpio: uniphier: add UniPhier GPIO controller driver
On Thu, Aug 3, 2017 at 1:06 PM, Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:

> This GPIO controller device is used on UniPhier SoCs.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
(...)
> +static const u32 uniphier_gpio_irq_parent_hwirqs[] = {
> + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
> + 186, 187, 188, 189, 190, 249, 250, 251,
> +};
(..)
> + /* parent is UniPhier AIDET */
> + parent_fwspec.fwnode = domain->parent->fwnode;
> + parent_fwspec.param_count = 2;
> + parent_fwspec.param[0] = uniphier_gpio_irq_parent_hwirqs[hwirq];
> + parent_fwspec.param[1] = type;
> +
> + ret = irq_domain_alloc_irqs_parent(domain, virq, 1,
> + &parent_fwspec);

This is not right.

That parent IRQ needs to come from the device tree, not from a static array
like this, and it is definately to use hierarchical irqdomain.

Please look at similar drivers merged recently for inspiration:
gpio/gpio-xgene-sb.c
pinctrl/stm32/pinctrl-stm32.c

Yours,
Linus Walleij

\
 
 \ /
  Last update: 2017-08-07 14:43    [W:0.096 / U:2.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site