Re: [PATCH 2/4] gpio: rockchip: get irq support for both dt and acpi

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 9, 2022 at 1:06 AM Jianqun Xu <jay.xu@xxxxxxxxxxxxxx> wrote:
>
> Get the irq of gpio controller with fwnode apis, support for both dt
> node and acpi.

DT
ACPI

...

> -

Stray change.

> +#include <linux/acpi.h>

Probably you wanted property.h.

>  #include <linux/bitops.h>
>  #include <linux/clk.h>
>  #include <linux/device.h>
> @@ -639,10 +639,6 @@ static int rockchip_get_bank_data(struct rockchip_pin_bank *bank)
>  {
>         int id = 0;
>
> -       bank->irq = irq_of_parse_and_map(bank->of_node, 0);
> -       if (!bank->irq)
> -               return -EINVAL;
> -
>         bank->clk = of_clk_get(bank->of_node, 0);
>         if (IS_ERR(bank->clk))
>                 return PTR_ERR(bank->clk);
> @@ -668,6 +664,24 @@ static int rockchip_get_bank_data(struct rockchip_pin_bank *bank)
>         return 0;
>  }

...

> +       if (np)
> +               irq = irq_of_parse_and_map(np, 0);
> +       else if (has_acpi_companion(dev))
> +               irq = platform_get_irq_optional(to_platform_device(dev), 0);

Why can't this work for the DT case?

-- 
With Best Regards,
Andy Shevchenko



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux