mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v3 0/3] Add Atmel maXTouch support for Peach Pit
@ 2014-08-27 14:24 Javier Martinez Canillas
  2014-08-27 14:24 ` [PATCH v3 1/3] ARM: dts: Add Peach Pit dts entry for Atmel touchpad Javier Martinez Canillas
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Javier Martinez Canillas @ 2014-08-27 14:24 UTC (permalink / raw)
  To: Kukjin Kim
  Cc: Doug Anderson, Olof Johansson, afaerber, Nick Dyer, Yufeng Shen,
	linux-samsung-soc, linux-arm-kernel, linux-kernel,
	Javier Martinez Canillas

This is a third version of the series that adds support
for the atmel trackpad found on the Exynos5420 Peach Pit.
The first version was [0] but I missunderstood the DT
bindings since I don't have documentation about this hw.
After the feedback provided by Nick Dyer and Yufeng Shen
I think I now understand how it works and why my earlier
(wrong) attempt used to work as well.

I've dropped support for Peach Pi since the Atmel chip
in that machine uses a different T100 touchscreen object
instead of the T9 used by the touchpad in Peach Pit. And
that object is not supported by the Atmel mXT driver yet.

The first patch adds the needed DTS changes to the Peach
Pit device tree file, the second patch enables the driver
in the Exynos-specific kernel config and the third patch
enables the driver on the ARMv7 multi-platform config file.

I chose to build as a module in the later because only some
multi-platform supported machines have this touchpad device.

Javier Martinez Canillas (2):
  ARM: exynos_defconfig: Enable Atmel maXTouch support
  ARM: multi_v7_defconfig: Enable Atmel maXTouch support

Sjoerd Simons (1):
  ARM: dts: Add Peach Pit dts entry for Atmel touchpad

 arch/arm/boot/dts/exynos5420-peach-pit.dts | 31 ++++++++++++++++++++++++++++++
 arch/arm/configs/exynos_defconfig          |  1 +
 arch/arm/configs/multi_v7_defconfig        |  1 +
 3 files changed, 33 insertions(+)

Best regards,
Javier

[0]: https://lkml.org/lkml/2014/8/6/589


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v3 1/3] ARM: dts: Add Peach Pit dts entry for Atmel touchpad
  2014-08-27 14:24 [PATCH v3 0/3] Add Atmel maXTouch support for Peach Pit Javier Martinez Canillas
@ 2014-08-27 14:24 ` Javier Martinez Canillas
  2014-08-27 14:24 ` [PATCH v3 2/3] ARM: exynos_defconfig: Enable Atmel maXTouch support Javier Martinez Canillas
  2014-08-27 14:24 ` [PATCH v3 3/3] ARM: multi_v7_defconfig: " Javier Martinez Canillas
  2 siblings, 0 replies; 4+ messages in thread
From: Javier Martinez Canillas @ 2014-08-27 14:24 UTC (permalink / raw)
  To: Kukjin Kim
  Cc: Doug Anderson, Olof Johansson, afaerber, Nick Dyer, Yufeng Shen,
	linux-samsung-soc, linux-arm-kernel, linux-kernel, Sjoerd Simons,
	Javier Martinez Canillas

From: Sjoerd Simons <sjoerd.simons@collabora.co.uk>

The Peach Pit board has an Atmel maXTouch trackpad device.
Add the needed Device Tree nodes to support it.

This Device Tree change is based on the Chrome OS 3.8 tree
but adapted to use the mainline Atmel maXTouch DT binding.

Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
[javier.martinez: added linux,gpio-keymap property and changed IRQ type]
Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
---

Changes since v2:
 - Add spaces around '=' on properties. Suggested by Andreas Faerber.

Changes since v1:
 - Change trackpad IRQ pad function from 0x0 (GPIO input) to 0xf (GPIO IRQ).
   suggested by Tomasz Figa.
 - Remove BTN_TOOL_* from "linux,gpio-keymap" property since those are set
   by input mt core if INPUT_MT_POINTER is set. Suggested by Nick Dyer.
 - Use correct values for "linux,gpio-keymap" property. Suggested by Nick Dyer.
 - Remove support for Peach Pi board since it uses a different Atmel touchpad
   that requires an Atmel object protocol  (T100) not supported by the driver.
 - Use IRQ type constants from <dt-bindings/interrupt-controller/irq.h> instead
   of magic numbers. Suggested by Andreas Faerber.
---
 arch/arm/boot/dts/exynos5420-peach-pit.dts | 31 ++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/arch/arm/boot/dts/exynos5420-peach-pit.dts b/arch/arm/boot/dts/exynos5420-peach-pit.dts
index ab06148..a3358fc 100644
--- a/arch/arm/boot/dts/exynos5420-peach-pit.dts
+++ b/arch/arm/boot/dts/exynos5420-peach-pit.dts
@@ -11,6 +11,7 @@
 /dts-v1/;
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/interrupt-controller/irq.h>
 #include "exynos5420.dtsi"
 
 / {
@@ -157,6 +158,29 @@
 	};
 };
 
+&hsi2c_8 {
+	status = "okay";
+	clock-frequency = <333000>;
+
+	trackpad@4b {
+		compatible = "atmel,maxtouch";
+		reg = <0x4b>;
+		interrupt-parent = <&gpx1>;
+		interrupts = <1 IRQ_TYPE_EDGE_FALLING>;
+		wakeup-source;
+		pinctrl-names = "default";
+		pinctrl-0 = <&trackpad_irq>;
+		linux,gpio-keymap = < KEY_RESERVED
+				      KEY_RESERVED
+				      0		/* GPIO 0 */
+				      0		/* GPIO 1 */
+				      0		/* GPIO 2 */
+				      BTN_LEFT 	/* GPIO 3 */
+				      KEY_RESERVED
+				      KEY_RESERVED >;
+	};
+};
+
 &hsi2c_9 {
 	status = "okay";
 	clock-frequency = <400000>;
@@ -241,6 +265,13 @@
 		samsung,pin-drv = <0>;
 	};
 
+	trackpad_irq: trackpad-irq {
+		samsung,pins = "gpx1-1";
+		samsung,pin-function = <0xf>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <0>;
+	};
+
 	power_key_irq: power-key-irq {
 		samsung,pins = "gpx1-2";
 		samsung,pin-function = <0>;
-- 
2.0.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v3 2/3] ARM: exynos_defconfig: Enable Atmel maXTouch support
  2014-08-27 14:24 [PATCH v3 0/3] Add Atmel maXTouch support for Peach Pit Javier Martinez Canillas
  2014-08-27 14:24 ` [PATCH v3 1/3] ARM: dts: Add Peach Pit dts entry for Atmel touchpad Javier Martinez Canillas
@ 2014-08-27 14:24 ` Javier Martinez Canillas
  2014-08-27 14:24 ` [PATCH v3 3/3] ARM: multi_v7_defconfig: " Javier Martinez Canillas
  2 siblings, 0 replies; 4+ messages in thread
From: Javier Martinez Canillas @ 2014-08-27 14:24 UTC (permalink / raw)
  To: Kukjin Kim
  Cc: Doug Anderson, Olof Johansson, afaerber, Nick Dyer, Yufeng Shen,
	linux-samsung-soc, linux-arm-kernel, linux-kernel,
	Javier Martinez Canillas

Many Exynos based Chromebooks have an Atmel trackpad so enable
support for it by default will make easier for users.

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
---
 arch/arm/configs/exynos_defconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/configs/exynos_defconfig b/arch/arm/configs/exynos_defconfig
index 676c744..3d1a435 100644
--- a/arch/arm/configs/exynos_defconfig
+++ b/arch/arm/configs/exynos_defconfig
@@ -60,6 +60,7 @@ CONFIG_KEYBOARD_CROS_EC=y
 # CONFIG_MOUSE_PS2 is not set
 CONFIG_MOUSE_CYAPA=y
 CONFIG_INPUT_TOUCHSCREEN=y
+CONFIG_TOUCHSCREEN_ATMEL_MXT=y
 CONFIG_SERIAL_8250=y
 CONFIG_SERIAL_SAMSUNG=y
 CONFIG_SERIAL_SAMSUNG_CONSOLE=y
-- 
2.0.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v3 3/3] ARM: multi_v7_defconfig: Enable Atmel maXTouch support
  2014-08-27 14:24 [PATCH v3 0/3] Add Atmel maXTouch support for Peach Pit Javier Martinez Canillas
  2014-08-27 14:24 ` [PATCH v3 1/3] ARM: dts: Add Peach Pit dts entry for Atmel touchpad Javier Martinez Canillas
  2014-08-27 14:24 ` [PATCH v3 2/3] ARM: exynos_defconfig: Enable Atmel maXTouch support Javier Martinez Canillas
@ 2014-08-27 14:24 ` Javier Martinez Canillas
  2 siblings, 0 replies; 4+ messages in thread
From: Javier Martinez Canillas @ 2014-08-27 14:24 UTC (permalink / raw)
  To: Kukjin Kim
  Cc: Doug Anderson, Olof Johansson, afaerber, Nick Dyer, Yufeng Shen,
	linux-samsung-soc, linux-arm-kernel, linux-kernel,
	Javier Martinez Canillas

Some boards with multi platform support (e.g: Exynos based
Chromebooks) have an Atmel trackpad so enable support for
as a module will make easier for users.

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
---
 arch/arm/configs/multi_v7_defconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig
index 7cfa5fa..ac5c10c 100644
--- a/arch/arm/configs/multi_v7_defconfig
+++ b/arch/arm/configs/multi_v7_defconfig
@@ -167,6 +167,7 @@ CONFIG_KEYBOARD_ST_KEYSCAN=y
 CONFIG_KEYBOARD_CROS_EC=y
 CONFIG_MOUSE_PS2_ELANTECH=y
 CONFIG_INPUT_TOUCHSCREEN=y
+CONFIG_TOUCHSCREEN_ATMEL_MXT=m
 CONFIG_TOUCHSCREEN_STMPE=y
 CONFIG_INPUT_MISC=y
 CONFIG_INPUT_MPU3050=y
-- 
2.0.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-08-27 14:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-27 14:24 [PATCH v3 0/3] Add Atmel maXTouch support for Peach Pit Javier Martinez Canillas
2014-08-27 14:24 ` [PATCH v3 1/3] ARM: dts: Add Peach Pit dts entry for Atmel touchpad Javier Martinez Canillas
2014-08-27 14:24 ` [PATCH v3 2/3] ARM: exynos_defconfig: Enable Atmel maXTouch support Javier Martinez Canillas
2014-08-27 14:24 ` [PATCH v3 3/3] ARM: multi_v7_defconfig: " Javier Martinez Canillas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®