mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
pinctrl: sunxi: Fix irq_of_xlate for the r_pio pinctrl block
The r_pio gpio / pin controller has a pin_base of non 0, we need to adjust for this before calling sunxi_pinctrl_desc_find_function_by_pin. Signed-off-by: Hans de Goede <[email protected]> Acked-by: Chen-Yu Tsai <[email protected]> Acked-by: Maxime Ripard <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
This commit is contained in:
parent
ec879f1272
commit
8297992cad
1 changed files with 3 additions and 3 deletions
|
|
@ -716,6 +716,7 @@ static int sunxi_pinctrl_irq_of_xlate(struct irq_domain *d,
|
|||
unsigned long *out_hwirq,
|
||||
unsigned int *out_type)
|
||||
{
|
||||
struct sunxi_pinctrl *pctl = d->host_data;
|
||||
struct sunxi_desc_function *desc;
|
||||
int pin, base;
|
||||
|
||||
|
|
@ -723,10 +724,9 @@ static int sunxi_pinctrl_irq_of_xlate(struct irq_domain *d,
|
|||
return -EINVAL;
|
||||
|
||||
base = PINS_PER_BANK * intspec[0];
|
||||
pin = base + intspec[1];
|
||||
pin = pctl->desc->pin_base + base + intspec[1];
|
||||
|
||||
desc = sunxi_pinctrl_desc_find_function_by_pin(d->host_data,
|
||||
pin, "irq");
|
||||
desc = sunxi_pinctrl_desc_find_function_by_pin(pctl, pin, "irq");
|
||||
if (!desc)
|
||||
return -EINVAL;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue