Skip to contentSkip to conversation

pxa/hx4700: Add Synaptics NavPoint (PXA27x SSP/SPI) driver

PATCH Superseded Paul Parsons 1 participant 1 message Jan 6, 2012

Subsystems (5)

v6 of 8 Superseded Latest is v8 →

lore
Share & tools
lore
#0 lore raw

PATCH v6 1/2 pxa/hx4700: Add Synaptics NavPoint (PXA27x SSP/SPI) driver

Add support for the Synaptics NavPoint touchpad connected to a PXA27x SSP port in SPI slave mode. The driver implements a simple navigation pad. The four raised dots are mapped to UP/DOWN/LEFT/RIGHT buttons and the centre of the touchpad is mapped to the ENTER button.

---

V6:
Added some help on module building as tristate.
Changed driver_data.pressed type from int to bool.
Added threaded irq handler for input_report_key() & input_sync() calls. Added navpoint_open() & navpoint_close() for hardware up/down. Corrected dev_id argument to free_irq().
Rebased to linux-3.2.

arch/arm/mach-pxa/include/mach/mfp-pxa27x.h +1 -0
diff -uprN clean-3.2/arch/arm/mach-pxa/include/mach/mfp-pxa27x.h linux-3.2/arch/arm/mach-pxa/include/mach/mfp-pxa27x.h
@@ -206,6 +206,7 @@
 #define GPIO113_I2S_SYSCLK	MFP_CFG_OUT(GPIO113, AF1, DRIVE_LOW)
 
 /* SSP 1 */
+#define GPIO23_SSP1_SCLK_IN	MFP_CFG_IN(GPIO23, AF2)
 #define GPIO23_SSP1_SCLK	MFP_CFG_OUT(GPIO23, AF2, DRIVE_LOW)
 #define GPIO29_SSP1_SCLK	MFP_CFG_IN(GPIO29, AF3)
 #define GPIO27_SSP1_SYSCLK	MFP_CFG_OUT(GPIO27, AF1, DRIVE_LOW)
drivers/input/mouse/Kconfig +12 -0
diff -uprN clean-3.2/drivers/input/mouse/Kconfig linux-3.2/drivers/input/mouse/Kconfig
@@ -322,4 +322,16 @@ config MOUSE_SYNAPTICS_I2C
 	  To compile this driver as a module, choose M here: the
 	  module will be called synaptics_i2c.
 
+config MOUSE_NAVPOINT_PXA27x
+	tristate "Synaptics NavPoint (PXA27x SSP/SPI)"
+	depends on PXA27x && PXA_SSP
+	help
+	  This option enables support for the Synaptics NavPoint connected to
+	  a PXA27x SSP port in SPI slave mode. The driver implements a simple
+	  navigation pad. The four raised dots are mapped to UP/DOWN/LEFT/RIGHT
+	  buttons and the centre of the touchpad is mapped to the ENTER button.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called navpoint.
+
 endif
drivers/input/mouse/Makefile +1 -0
diff -uprN clean-3.2/drivers/input/mouse/Makefile linux-3.2/drivers/input/mouse/Makefile
@@ -12,6 +12,7 @@ obj-$(CONFIG_MOUSE_GPIO)		+= gpio_mouse.
 obj-$(CONFIG_MOUSE_INPORT)		+= inport.o
 obj-$(CONFIG_MOUSE_LOGIBM)		+= logibm.o
 obj-$(CONFIG_MOUSE_MAPLE)		+= maplemouse.o
+obj-$(CONFIG_MOUSE_NAVPOINT_PXA27x)	+= navpoint.o
 obj-$(CONFIG_MOUSE_PC110PAD)		+= pc110pad.o
 obj-$(CONFIG_MOUSE_PS2)			+= psmouse.o
 obj-$(CONFIG_MOUSE_PXA930_TRKBALL)	+= pxa930_trkball.o
drivers/input/mouse/navpoint.c +393 -0

393 lines not on this page · raw message

include/linux/input/navpoint.h +12 -0
diff -uprN clean-3.2/include/linux/input/navpoint.h linux-3.2/include/linux/input/navpoint.h
@@ -0,0 +1,12 @@
+/*
+ *  Copyright (C) 2012 Paul Parsons <[email protected]>
+ *
+ *  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.
+ */
+
+struct navpoint_platform_data {
+	int		port;		/* PXA SSP port for pxa_ssp_request() */
+	int		gpio;		/* GPIO for power on/off */
+};