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  PHC 
Open Source and information security mailing list archives
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 3 Nov 2014 14:22:10 +0100
From:	Linus Walleij <>
To:	"Rafael J. Wysocki" <>
Cc:	Mika Westerberg <>,
	Arnd Bergmann <>,
	Alexandre Courbot <>,
	Linux Kernel Mailing List <>,
	Greg Kroah-Hartman <>,
	Grant Likely <>,
	ACPI Devel Maling List <>,
	Aaron Lu <>,
	"" <>,
	Dmitry Torokhov <>,
	Bryan Wu <>,
	Darren Hart <>,
	Mark Rutland <>
Subject: Re: [PATCH] ACPI / GPIO: Driver GPIO mappings for ACPI GPIOs

On Sat, Oct 25, 2014 at 12:05 AM, Rafael J. Wysocki <> wrote:

> From: Rafael J. Wysocki <>
> Provide a way for device drivers using GPIOs described by ACPI
> GpioIo resources in _CRS to tell the GPIO subsystem what names
> (connection IDs) to associate with specific GPIO pins defined
> in there.
> To do that, a driver needs to define a mapping table as a
> NULL-terminated array of struct acpi_gpio_mapping objects
> that each contain a name, a pointer to an array of pin data
> (struct acpi_gpio_params) objects and the size of that array.
> Each struct acpi_gpio_params object consists of three fields,
> crs_entry_index, pin_index, active_low, representing the index of

I prefer that you call the second thing "line_index" rather than
"pin_index". Not all GPIOs in the world are tied to physical pins.
Also it is easy to confuse stuff with the pin control terminology
if it's called "pin".

> the target GpioIo()/GpioInt() resource in _CRS starting from zero,
> the index of the target pin in that resource starting from zero,
> and the active-low flag for that pin, respectively.
> Next, the mapping table needs to be passed as the second argument to
> acpi_dev_add_driver_gpios() that will register it with the ACPI device
> object pointed to by its first argument.  That object must represent
> the ACPI namespace node containing the _CRS object referred to by the
> GPIO mapping.  That should be done in the driver's .probe() routine.
> On removal, the driver should unregister its GPIO mapping table
> by calling acpi_dev_remove_driver_gpios() on the ACPI device
> object where that table was previously registered.
> Included are fixes from Mika Westerberg.
> Signed-off-by: Rafael J. Wysocki <>

And "pin" is mentioned several times in the commit message.
I prefer that we talk about "lines".


> +struct acpi_gpio_params {
> +       unsigned int crs_entry_index;
> +       unsigned int pin_index;

So line_index;

> +       bool active_low;
> +};

With that change:
Reviewed-by: Linus Walleij <>

Linus Walleij
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

Powered by blists - more mailing lists