[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMRc=MdLXP=DgHEh6hoNYhDgB4aESmC29VH6hsH=AONNgsjXQQ@mail.gmail.com>
Date: Fri, 11 Jul 2025 12:19:35 +0200
From: Bartosz Golaszewski <brgl@...ev.pl>
To: Marcos Del Sol Vives <marcos@...a.pet>, Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: linux-kernel@...r.kernel.org, Linus Walleij <linus.walleij@...aro.org>,
linux-gpio@...r.kernel.org
Subject: Re: [PATCH v2] gpio: vortex: add new GPIO device driver
On Wed, Jul 9, 2025 at 11:16 AM Marcos Del Sol Vives <marcos@...a.pet> wrote:
>
> Add a new simple GPIO device driver for Vortex86 lines of SoCs,
> implemented according to their programming reference manual [1].
>
> This is required for detecting the status of the poweroff button and
> performing the poweroff sequence on ICOP eBox computers.
>
> IRQs are not implemented as they are available for less than half the
> GPIO pins, and they are not the ones required for the poweroff stuff, so
> polling will be required anyway.
>
(...)
> +
> +static int __init vortex_gpio_init(void)
> +{
> + if (boot_cpu_data.x86_vendor != X86_VENDOR_VORTEX) {
> + pr_err("Not a Vortex86 CPU, refusing to load\n");
> + return -ENODEV;
> + }
> +
> + pdev = platform_create_bundle(&vortex_gpio_driver, vortex_gpio_probe,
> + vortex_gpio_resources, ARRAY_SIZE(vortex_gpio_resources),
> + NULL, 0);
> + return PTR_ERR_OR_ZERO(pdev);
> +}
> +
This looks better but I admit I'm not an expert in x86 platforms so
I'll allow myself to Cc Andy. Is this how it's typically done in x86?
Is this module visible in ACPI in any way that would allow us to
leverage the platform device core? Or do we need to try to register
the device unconditionally on all Vortex platforms?
Bart
Powered by blists - more mailing lists