]> git.baikalelectronics.ru Git - kernel.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)
commit6fe293f6e713479306f5621c73bce1c42ebb7eb3
tree5ac6835a15faa7db452bb011ef841bafd4dc1454
parent6358bfed1b74413c9d96a17e1c1b5f0df9778eb8
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