]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
pinctrl: baytrail: Relax GPIO request rules
authorMika Westerberg <mika.westerberg@linux.intel.com>
Mon, 23 Feb 2015 12:53:10 +0000 (14:53 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Tue, 28 Apr 2020 18:02:40 +0000 (19:02 +0100)
commitd2a0a4a92eb80a23cc6a8188c7114c136c5e5994
tree22872f0f0222734e146b1623d5e2d462108dec1b
parent4a4c89329e41327cc6684d5408f06f5e39e50eb5
pinctrl: baytrail: Relax GPIO request rules

commit f8323b6bb2cc7d26941d4838dd4375952980a88a upstream.

Zotac ZBOX PI320, a Baytrail based mini-PC, has power button connected to a
GPIO pin and it is exposed to the operating system as Windows 8 button
array. This is implemented in Linux as a driver using gpio_keys.

However, BIOS on this particula machine forgot to mux the pin to be a GPIO
instead of native function, which results following message to be seen on
the console:

 byt_gpio INT33FC:02: pin 16 cannot be used as GPIO.

This causes power button to not work as the driver was not able to request
the GPIO it needs.

So instead of completely preventing this we allow turning the pin as GPIO
but issue warning that something might be wrong.

Reported-by: Benjamin Adler <benadler@gmx.net>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
[bwh: Backported to 3.16: adjust filename]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/pinctrl/pinctrl-baytrail.c