Skip to content

Commit 86af1d0

Browse files
Santosh Kumar Yadavjwrdegoede
authored andcommitted
platform/x86: Support for EC-connected GPIOs for identify LED/button on Barco P50 board
Add a driver providing access to the GPIOs for the identify button and led present on Barco P50 board, based on the pcengines-apuv2.c driver. There is unfortunately no suitable ACPI entry for the EC communication interface, so instead bind to boards with "P50" as their DMI product family and hard code the I/O port number (0x299). The driver also hooks up the leds-gpio and gpio-keys-polled drivers to the GPIOs, so they are finally exposed as: LED: /sys/class/leds/identify Button: (/proc/bus/input/devices) I: Bus=0019 Vendor=0001 Product=0001 Version=0100 N: Name="identify" P: Phys=gpio-keys-polled/input0 S: Sysfs=/devices/platform/barco-p50-gpio/gpio-keys-polled/input/input10 U: Uniq= H: Handlers=event10 B: PROP=0 B: EV=3 B: KEY=1000000 0 0 0 0 0 0 Signed-off-by: Santosh Kumar Yadav <[email protected]> Signed-off-by: Peter Korsgaard <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Hans de Goede <[email protected]> Signed-off-by: Hans de Goede <[email protected]>
1 parent 5ecc1e9 commit 86af1d0

File tree

4 files changed

+455
-0
lines changed

4 files changed

+455
-0
lines changed

MAINTAINERS

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3215,6 +3215,12 @@ F: drivers/video/backlight/
32153215
F: include/linux/backlight.h
32163216
F: include/linux/pwm_backlight.h
32173217

3218+
BARCO P50 GPIO DRIVER
3219+
M: Santosh Kumar Yadav <[email protected]>
3220+
M: Peter Korsgaard <[email protected]>
3221+
S: Maintained
3222+
F: drivers/platform/x86/barco-p50-gpio.c
3223+
32183224
BATMAN ADVANCED
32193225
M: Marek Lindner <[email protected]>
32203226
M: Simon Wunderlich <[email protected]>

drivers/platform/x86/Kconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -729,6 +729,16 @@ config PCENGINES_APU2
729729
To compile this driver as a module, choose M here: the module
730730
will be called pcengines-apuv2.
731731

732+
config BARCO_P50_GPIO
733+
tristate "Barco P50 GPIO driver for identify LED/button"
734+
depends on GPIOLIB
735+
help
736+
This driver provides access to the GPIOs for the identify button
737+
and led present on Barco P50 board.
738+
739+
To compile this driver as a module, choose M here: the module
740+
will be called barco-p50-gpio.
741+
732742
config SAMSUNG_LAPTOP
733743
tristate "Samsung Laptop driver"
734744
depends on RFKILL || RFKILL = n

drivers/platform/x86/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ obj-$(CONFIG_XO1_RFKILL) += xo1-rfkill.o
8181
# PC Engines
8282
obj-$(CONFIG_PCENGINES_APU2) += pcengines-apuv2.o
8383

84+
# Barco
85+
obj-$(CONFIG_BARCO_P50_GPIO) += barco-p50-gpio.o
86+
8487
# Samsung
8588
obj-$(CONFIG_SAMSUNG_LAPTOP) += samsung-laptop.o
8689
obj-$(CONFIG_SAMSUNG_Q10) += samsung-q10.o

0 commit comments

Comments
 (0)