lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 16 Jul 2021 10:31:38 +0200
From:   Bartosz Golaszewski <bgolaszewski@...libre.com>
To:     Akhil R <akhilrajeev@...dia.com>
Cc:     Jonathan Hunter <jonathanh@...dia.com>,
        Andy Shevchenko <andy.shevchenko@...il.com>,
        kyarlagadda@...dia.com, Laxman Dewangan <ldewangan@...dia.com>,
        Linus Walleij <linus.walleij@...aro.org>,
        linux-gpio <linux-gpio@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        linux-tegra <linux-tegra@...r.kernel.org>, mperttunen@...dia.com,
        smangipudi@...dia.com, Thierry Reding <thierry.reding@...il.com>
Subject: Re: [PATCH v5] gpio: tegra186: Add ACPI support

On Thu, Jul 1, 2021 at 11:01 AM Akhil R <akhilrajeev@...dia.com> wrote:
>
> Add ACPI module ID to probe the driver from the ACPI based bootloader
> firmware.
>
> Signed-off-by: Akhil R <akhilrajeev@...dia.com>
> Reviewed-by: Andy Shevchenko <andy.shevchenko@...il.com>
> ---
> v5 changes:
>         * Updated ioremap_resource check as per Jon's comments.
>
>  drivers/gpio/gpio-tegra186.c | 30 ++++++++++++++++++++++++------
>  1 file changed, 24 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpio/gpio-tegra186.c b/drivers/gpio/gpio-tegra186.c
> index 1bd9e44..8a64dcb 100644
> --- a/drivers/gpio/gpio-tegra186.c
> +++ b/drivers/gpio/gpio-tegra186.c
> @@ -620,15 +620,21 @@ static int tegra186_gpio_probe(struct platform_device *pdev)
>         if (!gpio)
>                 return -ENOMEM;
>
> -       gpio->soc = of_device_get_match_data(&pdev->dev);
> +       gpio->soc = device_get_match_data(&pdev->dev);
>
>         gpio->secure = devm_platform_ioremap_resource_byname(pdev, "security");
> -       if (IS_ERR(gpio->secure))
> -               return PTR_ERR(gpio->secure);
> +       if (IS_ERR(gpio->secure)) {
> +               gpio->secure = devm_platform_ioremap_resource(pdev, 0);
> +               if (IS_ERR(gpio->secure))
> +                       return PTR_ERR(gpio->secure);
> +       }
>
>         gpio->base = devm_platform_ioremap_resource_byname(pdev, "gpio");
> -       if (IS_ERR(gpio->base))
> -               return PTR_ERR(gpio->base);
> +       if (IS_ERR(gpio->base)) {
> +               gpio->base = devm_platform_ioremap_resource(pdev, 1);
> +               if (IS_ERR(gpio->base))
> +                       return PTR_ERR(gpio->base);
> +       }
>
>         err = platform_irq_count(pdev);
>         if (err < 0)
> @@ -690,11 +696,13 @@ static int tegra186_gpio_probe(struct platform_device *pdev)
>
>         gpio->gpio.names = (const char * const *)names;
>
> +#if defined(CONFIG_OF_GPIO)
>         gpio->gpio.of_node = pdev->dev.of_node;
>         gpio->gpio.of_gpio_n_cells = 2;
>         gpio->gpio.of_xlate = tegra186_gpio_of_xlate;
> +#endif /* CONFIG_OF_GPIO */
>
> -       gpio->intc.name = pdev->dev.of_node->name;
> +       gpio->intc.name = dev_name(&pdev->dev);
>         gpio->intc.irq_ack = tegra186_irq_ack;
>         gpio->intc.irq_mask = tegra186_irq_mask;
>         gpio->intc.irq_unmask = tegra186_irq_unmask;
> @@ -918,10 +926,20 @@ static const struct of_device_id tegra186_gpio_of_match[] = {
>  };
>  MODULE_DEVICE_TABLE(of, tegra186_gpio_of_match);
>
> +static const struct acpi_device_id  tegra186_gpio_acpi_match[] = {
> +       { .id = "NVDA0108", .driver_data = (kernel_ulong_t)&tegra186_main_soc },
> +       { .id = "NVDA0208", .driver_data = (kernel_ulong_t)&tegra186_aon_soc },
> +       { .id = "NVDA0308", .driver_data = (kernel_ulong_t)&tegra194_main_soc },
> +       { .id = "NVDA0408", .driver_data = (kernel_ulong_t)&tegra194_aon_soc },
> +       {}
> +};
> +MODULE_DEVICE_TABLE(acpi, tegra186_gpio_acpi_match);
> +
>  static struct platform_driver tegra186_gpio_driver = {
>         .driver = {
>                 .name = "tegra186-gpio",
>                 .of_match_table = tegra186_gpio_of_match,
> +               .acpi_match_table = tegra186_gpio_acpi_match,
>         },
>         .probe = tegra186_gpio_probe,
>         .remove = tegra186_gpio_remove,
> --
> 2.7.4
>

Can you rebase it on top of v5.14-rc1 and resend?

Bart

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ