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]
Message-ID: <20251003045431.GA2912318@black.igk.intel.com>
Date: Fri, 3 Oct 2025 06:54:31 +0200
From: Mika Westerberg <mika.westerberg@...ux.intel.com>
To: Markus Probst <markus.probst@...teo.de>
Cc: Linus Walleij <linus.walleij@...aro.org>,
	Bartosz Golaszewski <brgl@...ev.pl>,
	Mika Westerberg <westeri@...nel.org>,
	Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
	linux-gpio@...r.kernel.org, linux-acpi@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] gpio: of: make it possible to reference gpios probed in
 acpi in device tree

Hi,

On Thu, Oct 02, 2025 at 09:58:05PM +0000, Markus Probst wrote:
> sometimes it is necessary to use both acpi and device tree to declare
> devices. Not every gpio device driver which has an acpi_match_table has
> an of_match table (e.g. amd-pinctrl). Furthermore gpio is an device which
> can't be easily disabled in acpi and then redeclared in device tree, as
> it often gets used by other devices declared in acpi (e.g. via GpioInt or
> GpioIo). Thus a disable of acpi and migration to device tree is not always
> possible or very time consuming, while acpi by itself is very limited and
> not always sufficient. This won't affect most configurations, as most of
> the time either CONFIG_ACPI or CONFIG_OF gets enabled, not both.

Can you provide a real example where this kind of mixup can happen? The
ACPI ID PRP0001 specifically was added to allow using DT bindings in ACPI
based systems.

Regarding the patch, please spell gpio -> GPIO, acpi ACPI and so on.

> Signed-off-by: Markus Probst <markus.probst@...teo.de>
> ---
>  drivers/gpio/gpiolib-of.c | 241 +++++++++++++++++++++++---------------
>  1 file changed, 145 insertions(+), 96 deletions(-)
> 
> diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c
> index 37ab78243fab..c472b86148b3 100644
> --- a/drivers/gpio/gpiolib-of.c
> +++ b/drivers/gpio/gpiolib-of.c
> @@ -18,6 +18,7 @@
>  #include <linux/pinctrl/pinctrl.h>
>  #include <linux/slab.h>
>  #include <linux/string.h>
> +#include <linux/acpi.h>

I'm not really sure if this is good idea to be honest.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ