]> asedeno.scripts.mit.edu Git - linux.git/commit
pinctrl: cannonlake: Align GPIO number space with Windows
authorMika Westerberg <mika.westerberg@linux.intel.com>
Mon, 27 Nov 2017 13:54:44 +0000 (16:54 +0300)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 29 Nov 2017 12:46:28 +0000 (13:46 +0100)
commitcb5fda413e1d4a857bf4fd0bc92e9de0f1ff9e9d
tree5ac6835a15faa7db452bb011ef841bafd4dc1454
parenta60eac3239f01838bdd34eaac8c486c4c6e84551
pinctrl: cannonlake: Align GPIO number space with Windows

The Cannon Lake Windows GPIO driver always exposes 32 pins per "bank"
regardless of whether the hardware actually has that many pins in a pad
group. This means that there are gaps in the GPIO number space even if
such gaps do not exist in the real hardware. To make things worse the
BIOS is also using the same scheme, so for example on Cannon Lake-LP
vGPIO 39 (vSD3_CD_B) the ACPI GpioInt resource has number 231 instead of
the expected 180 (which would be the hardware number).

To make SD card detection and other GPIOs working properly in Linux we
align the pinctrl-cannonlake GPIO numbering to follow the Windows GPIO
driver numbering taking advantage of the gpio_base field introduced in
the previous patch.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/intel/pinctrl-cannonlake.c