Skip to contentSkip to conversation

input: misc: Add driver for Intel Bay Trail GPIO buttons

PATCH Superseded Zhu, Lejun 3 participants 4 messages Mar 26, 2014 – Mar 27, 2014 1 message not in the archive

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Zhu, Lejun

author
#1 lore raw

PATCH 1/1 input: misc: Add driver for Intel Bay Trail GPIO buttons

This patch adds support for the GPIO buttons on some Intel Bay Trail tablets originally running Windows 8. The ACPI description of these buttons follows "Windows ACPI Design Guide for SoC Platforms".

---
 drivers/input/misc/Kconfig           |  10 ++
 drivers/input/misc/Makefile          |   1 +
 drivers/input/misc/baytrail_button.c | 198
+++++++++++++++++++++++++++++++++++
 3 files changed, 209 insertions(+)
 create mode 100644 drivers/input/misc/baytrail_button.c
drivers/input/misc/Kconfig +10 -0
index 7904ab0..bb6fe2e 100644
@@ -666,4 +666,14 @@ config INPUT_IDEAPAD_SLIDEBAR
 	  To compile this driver as a module, choose M here: the
 	  module will be called ideapad_slidebar.
 
+config INPUT_BAYTRAIL_BUTTON
+	tristate "Intel Baytrail Buttons"
+	depends on KEYBOARD_GPIO
+	help
+	  Say Y here if you have a Baytrail tablet that is compatible
+	  with Windows ACPI Design Guide.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called baytrail_button.
+
 endif
drivers/input/misc/Makefile +1 -0
index cda71fc..c3d6a68 100644
@@ -63,3 +63,4 @@ obj-$(CONFIG_INPUT_WM831X_ON)		+= wm831x-on.o
 obj-$(CONFIG_INPUT_XEN_KBDDEV_FRONTEND)	+= xen-kbdfront.o
 obj-$(CONFIG_INPUT_YEALINK)		+= yealink.o
 obj-$(CONFIG_INPUT_IDEAPAD_SLIDEBAR)	+= ideapad_slidebar.o
+obj-$(CONFIG_INPUT_BAYTRAIL_BUTTON)	+= baytrail_button.o
(quoted diff) +0 -0

b/drivers/input/misc/baytrail_button.c
new file mode 100644
index 0000000..e4829e1

drivers/input/misc/baytrail_button.c new file +198 -0

198 lines not on this page · raw message

Signature · 1 line
1.8.3.2
#2 lore raw
Quoted 3 lines · Lejun

This patch adds support for the GPIO buttons on some Intel Bay Trail tablets originally running Windows 8. The ACPI description of these buttons follows "Windows ACPI Design Guide for SoC Platforms".

I'm not sure calling it "Baytrail" is right here - it's in theory a generic interface so probably should be named accordingly

Otherwise looks good to me.

Alan

maintainer
#3 lore raw
Quoted 11 lines · One Thousand Gnomes
Quoted 3 lines · Lejun

This patch adds support for the GPIO buttons on some Intel Bay Trail tablets originally running Windows 8. The ACPI description of these buttons follows "Windows ACPI Design Guide for SoC Platforms".

I'm not sure calling it "Baytrail" is right here - it's in theory a generic interface so probably should be named accordingly

Otherwise looks good to me.

It uses static devices in non-board code - if I unbind and rebind PNP device that produces gpio-keys platform devices driver core will not be happy.

Thanks.

Signature · 1 line
Dmitry
author
#4 lore raw
Quoted 11 lines · Dmitry Torokhov
Quoted 10 lines · One Thousand Gnomes
Quoted 3 lines · Lejun

This patch adds support for the GPIO buttons on some Intel Bay Trail tablets originally running Windows 8. The ACPI description of these buttons follows "Windows ACPI Design Guide for SoC Platforms".

I'm not sure calling it "Baytrail" is right here - it's in theory a generic interface so probably should be named accordingly

Quoted 8 lines
Quoted 1 line

Otherwise looks good to me.

It uses static devices in non-board code - if I unbind and rebind PNP device that produces gpio-keys platform devices driver core will not be happy.

Thanks.

Alan, I will think of a better name for it. This is supposed to work for other "win8 ready" tablets as well, just all I have today are Baytrail tablets.

Dmitry, thank you for pointing out the bug. I'll fix it and submit again.

Thanks.
Lejun