Skip to contentSkip to conversation

of: Add Semtech Corp. vendor prefix

PATCH In review Thierry Reding 2 participants 6 messages Apr 12, 2012 – Jun 14, 2012

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 of: Add Semtech Corp. vendor prefix

This commit adds a device tree vendor prefix for Semtech Corp.

---
 Documentation/devicetree/bindings/vendor-prefixes.txt |    1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/vendor-prefixes.txt +1 -0
index 6b6e465..19af408 100644
@@ -44,6 +44,7 @@ simtek
 sirf	SiRF Technology, Inc.
 st	STMicroelectronics
 stericsson	ST-Ericsson
+sx	Semtech Corp.
 ti	Texas Instruments
 wlf	Wolfson Microelectronics
 xlnx	Xilinx
Signature · 1 line
1.7.10
#1 lore raw

PATCH 2/2 input: Add support for the Semtech SX8634 controller

This commit adds support for the Semtech SX8634 Capacitive Button and Slider Touch controller.

Cc Dmitry Torokhov <[email protected]>
Cc Grant Likely <[email protected]>
Cc Rob Herring <[email protected]>
---
 Documentation/devicetree/bindings/input/sx8634.txt |   58 ++
 drivers/input/misc/Kconfig                         |   10 +
 drivers/input/misc/Makefile                        |    1 +
 drivers/input/misc/sx8634.c                        |  745 ++++++++++++++++++++
 include/linux/input/sx8634.h                       |   32 +
 5 files changed, 846 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/input/sx8634.txt
 create mode 100644 drivers/input/misc/sx8634.c
 create mode 100644 include/linux/input/sx8634.h
Documentation/devicetree/bindings/input/sx8634.txt new file +58 -0
new file mode 100644
index 0000000..149da9a
@@ -0,0 +1,58 @@
+Semtech SX8634 Capacitive Button and Slider Touch Controller
+
+The SX8634 controller is configured with the following properties:
+
+  Required properties:
+  - compatible: "sx,sx8634"
+  - reg: I2C bus address of the device
+  - interrupts: interrupt number of the device
+  - #address-cells: must be <1>
+  - #size-cells: must be <0>
+
+  Optional Properties:
+  - threshold: number of ticks required to detect a touch/release
+    - range: 0x00 to 0xff
+    - default: 0xa0
+  - sensitivity: sensitivity of the sensors
+    - range: 0x0 to 0x7
+    - default: 0x0
+
+Each capacitive sensor is configured via a separate sub-node:
+
+  Required Properties:
+  - reg: sensor index
+  - label: name of the sensor
+  - linux,code: Keycode to emit for buttons. If absent, the capacitive sensor
+    is part of the slider element.
+
+  Optional Properties:
+  - threshold: overrides the global threshold setting
+  - sensitivity: overrides the global sensitivity setting
+
+Example:
+
+	keypad: sx8634@2b {
+		compatible = "sx,sx8634";
+		reg = <0x2b>;
+
+		interrupt-parent = <&gpioext>;
+		interrupts = <3>;
+
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		threshold = <0xa0>;
+		sensitivity = <7>;
+
+		cap@1 {
+			reg = <1>;
+			label = "Up";
+			linux,code = <103>; /* KEY_UP */
+		};
+
+		cap@2 {
+			reg = <2>;
+			label = "Down";
+			linux,code = <108>; /* KEY_DOWN */
+		};
+	};
drivers/input/misc/Kconfig +10 -0
index 2d78779..00815f5 100644
@@ -578,6 +578,16 @@ config INPUT_CMA3000_I2C
 	  To compile this driver as a module, choose M here: the
 	  module will be called cma3000_d0x_i2c.
 
+config INPUT_SX8634
+	tristate "Semtech SX8634"
+	depends on I2C
+	default n
+	help
+	  Say Y here if you want to use the Semtech SX8634 controller.
+
+	  To compile this driver as a module, choose M here: the module will
+	  be called sx8634.
+
 config INPUT_XEN_KBDDEV_FRONTEND
 	tristate "Xen virtual keyboard and mouse support"
 	depends on XEN
drivers/input/misc/Makefile +1 -0
index f55cdf4..7a86fac 100644
@@ -53,5 +53,6 @@ obj-$(CONFIG_INPUT_TWL6040_VIBRA)	+= twl6040-vibra.o
 obj-$(CONFIG_INPUT_UINPUT)		+= uinput.o
 obj-$(CONFIG_INPUT_WISTRON_BTNS)	+= wistron_btns.o
 obj-$(CONFIG_INPUT_WM831X_ON)		+= wm831x-on.o
+obj-$(CONFIG_INPUT_SX8634)		+= sx8634.o
 obj-$(CONFIG_INPUT_XEN_KBDDEV_FRONTEND)	+= xen-kbdfront.o
 obj-$(CONFIG_INPUT_YEALINK)		+= yealink.o
drivers/input/misc/sx8634.c new file +745 -0

745 lines not on this page · raw message

include/linux/input/sx8634.h new file +32 -0
new file mode 100644
index 0000000..1eb2f00
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2011-2012 Avionic Design GmbH
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#ifndef __LINUX_INPUT_SX8634_H__
+#define __LINUX_INPUT_SX8634_H__
+
+#define SX8634_NUM_CAPS 12
+
+enum sx8634_cap_mode {
+	SX8634_CAP_MODE_DISABLED,
+	SX8634_CAP_MODE_BUTTON,
+	SX8634_CAP_MODE_SLIDER,
+	SX8634_CAP_MODE_RESERVED
+};
+
+struct sx8634_cap {
+	enum sx8634_cap_mode mode;
+	unsigned short keycode;
+	u8 sensitivity;
+	u8 threshold;
+};
+
+struct sx8634_platform_data {
+	struct sx8634_cap caps[SX8634_NUM_CAPS];
+};
+
+#endif
Signature · 1 line
1.7.10
#2 lore raw

Re: [PATCH 2/2] input: Add support for the Semtech SX8634 controller

Quoted 8 lines · Thierry Reding

This commit adds support for the Semtech SX8634 Capacitive Button and Slider Touch controller.

Cc Dmitry Torokhov <[email protected]>
Cc Grant Likely <[email protected]>
Cc Rob Herring <[email protected]>
Quoted 10 lines
---
 Documentation/devicetree/bindings/input/sx8634.txt |   58 ++
 drivers/input/misc/Kconfig                         |   10 +
 drivers/input/misc/Makefile                        |    1 +
 drivers/input/misc/sx8634.c                        |  745 ++++++++++++++++++++
 include/linux/input/sx8634.h                       |   32 +
 5 files changed, 846 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/input/sx8634.txt
 create mode 100644 drivers/input/misc/sx8634.c
 create mode 100644 include/linux/input/sx8634.h

Any comments on this one?

Thierry

#3 lore raw
In reply to Thierry Reding
Quoted 15 lines · Thierry Reding

This commit adds a device tree vendor prefix for Semtech Corp.

---
 Documentation/devicetree/bindings/vendor-prefixes.txt |    1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/vendor-prefixes.txt +0 -0
index 6b6e465..19af408 100644

Documentation/devicetree/bindings/vendor-prefixes.txt simtek · line 50

Quoted 7 lines
Documentation/devicetree/bindings/vendor-prefixes.txt +1 -0
@@ -44,6 +44,7 @@ simtek
 sirf	SiRF Technology, Inc.
 st	STMicroelectronics
 stericsson	ST-Ericsson
+sx	Semtech Corp.
 ti	Texas Instruments
 wlf	Wolfson Microelectronics
 xlnx	Xilinx

Does this patch need any more work or can it go in?

Thierry

#4 lore raw
In reply to Thierry Reding
Quoted 15 lines · Thierry Reding

This commit adds a device tree vendor prefix for Semtech Corp.

---
 Documentation/devicetree/bindings/vendor-prefixes.txt |    1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/vendor-prefixes.txt +0 -0
index 6b6e465..19af408 100644

Documentation/devicetree/bindings/vendor-prefixes.txt simtek · line 47

Quoted 4 lines
Documentation/devicetree/bindings/vendor-prefixes.txt +1 -0
@@ -44,6 +44,7 @@ simtek
 sirf	SiRF Technology, Inc.
 st	STMicroelectronics
 stericsson	ST-Ericsson
+sx	Semtech Corp.

This should be smtc to match stock ticker.

Rob

Quoted 3 lines
Documentation/devicetree/bindings/vendor-prefixes.txt +0 -0
 ti	Texas Instruments
 wlf	Wolfson Microelectronics
 xlnx	Xilinx
#5 lore raw
Quoted 11 lines · Rob Herring
Quoted 10 lines · Thierry Reding

This commit adds a device tree vendor prefix for Semtech Corp.

---
 Documentation/devicetree/bindings/vendor-prefixes.txt |    1 +
 1 file changed, 1 insertion(+)
Quoted 11 lines

Documentation/devicetree/bindings/vendor-prefixes.txt simtek · line 47

Quoted 9 lines
Documentation/devicetree/bindings/vendor-prefixes.txt +1 -0
index 6b6e465..19af408 100644
@@ -44,6 +44,7 @@ simtek
 sirf	SiRF Technology, Inc.
 st	STMicroelectronics
 stericsson	ST-Ericsson
+sx	Semtech Corp.

This should be smtc to match stock ticker.

Okay.