Re: [PATCH 0/3] Input: soc_button_array fixes and question

From: Benjamin Tissoires
Date: Fri May 13 2016 - 11:57:52 EST


On Tue, May 10, 2016 at 5:37 PM, Benjamin Tissoires
<benjamin.tissoires@xxxxxxxxxx> wrote:
> Hi,
>
> This series has been triggered by the Surface 3 I have been given.
> The way Microsoft follows its own specs is always intriguing. As
> written in drivers/platform/x86/surfacepro3_button.c, the PNP0C40
> ACPI device which should follow the specification doesn't have any
> GPIO listed (thus the first 2 patches).
>
> Also, the actual ACPI device that has the GPIO described is declared
> as an I2C one, even if there is no such device attached to the bus.
> This particular device could use the soc_button_array driver after a
> little bit of ACPI magic (patches to follow, later), but each GPIO in
> this device is declared twice (as Int and Io), so the 3rd patch.
>
> Here is my question mentioned in $subject:
>
> Why are we using gpiod_get_index(dev, KBUILD_MODNAME, acpi_index, GPIOD_ASIS);
> in soc_button_lookup_gpio()?
>

I'll leave the question open and send a v2 with an actual support of
the Surface 3 buttons soon.
I'll remove most of the CC-ed people as it might be considered as spam
for most of you.

Cheers,
Benjamin