diff options
author | Paul Parsons <lost.distance@yahoo.com> | 2012-05-12 07:31:02 -0400 |
---|---|---|
committer | Haojian Zhuang <haojian.zhuang@gmail.com> | 2012-05-13 21:38:17 -0400 |
commit | b2596c682814b39f0dd16e19e3be8fc8581643bd (patch) | |
tree | efdc0bd71df73aa53f1e2c8fde2876c50df83d44 /arch/arm/mach-pxa | |
parent | 0bf189abc52b89bfcfa9782543de7f5e90263fe5 (diff) |
ARM: pxa: hx4700: Add Synaptics NavPoint touchpad
This patch adds the Synaptics NavPoint touchpad to the hx4700 platform:
1. Change GPIO23_SSP1_SCLK value in hx4700_pin_config[] from an output
to an input, since the NavPoint is connected to SSP in SPI slave mode.
2. Add GPIO102_GPIO (NavPoint power) to hx4700_pin_config[].
3. Add navpoint platform_device to devices[].
Signed-off-by: Paul Parsons <lost.distance@yahoo.com>
Cc: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Diffstat (limited to 'arch/arm/mach-pxa')
-rw-r--r-- | arch/arm/mach-pxa/hx4700.c | 24 | ||||
-rw-r--r-- | arch/arm/mach-pxa/include/mach/mfp-pxa27x.h | 1 |
2 files changed, 24 insertions, 1 deletions
diff --git a/arch/arm/mach-pxa/hx4700.c b/arch/arm/mach-pxa/hx4700.c index 88f0f51ad6d5..865f6d37372e 100644 --- a/arch/arm/mach-pxa/hx4700.c +++ b/arch/arm/mach-pxa/hx4700.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/gpio.h> | 22 | #include <linux/gpio.h> |
23 | #include <linux/gpio_keys.h> | 23 | #include <linux/gpio_keys.h> |
24 | #include <linux/input.h> | 24 | #include <linux/input.h> |
25 | #include <linux/input/navpoint.h> | ||
25 | #include <linux/lcd.h> | 26 | #include <linux/lcd.h> |
26 | #include <linux/mfd/htc-egpio.h> | 27 | #include <linux/mfd/htc-egpio.h> |
27 | #include <linux/mfd/asic3.h> | 28 | #include <linux/mfd/asic3.h> |
@@ -113,7 +114,7 @@ static unsigned long hx4700_pin_config[] __initdata = { | |||
113 | GPIO113_I2S_SYSCLK, | 114 | GPIO113_I2S_SYSCLK, |
114 | 115 | ||
115 | /* SSP 1 (NavPoint) */ | 116 | /* SSP 1 (NavPoint) */ |
116 | GPIO23_SSP1_SCLK, | 117 | GPIO23_SSP1_SCLK_IN, |
117 | GPIO24_SSP1_SFRM, | 118 | GPIO24_SSP1_SFRM, |
118 | GPIO25_SSP1_TXD, | 119 | GPIO25_SSP1_TXD, |
119 | GPIO26_SSP1_RXD, | 120 | GPIO26_SSP1_RXD, |
@@ -129,6 +130,9 @@ static unsigned long hx4700_pin_config[] __initdata = { | |||
129 | GPIO13_GPIO, /* W3220_IRQ */ | 130 | GPIO13_GPIO, /* W3220_IRQ */ |
130 | GPIO14_GPIO, /* nWLAN_IRQ */ | 131 | GPIO14_GPIO, /* nWLAN_IRQ */ |
131 | 132 | ||
133 | /* HX4700 specific output GPIOs */ | ||
134 | GPIO102_GPIO | MFP_LPM_DRIVE_LOW, /* SYNAPTICS_POWER_ON */ | ||
135 | |||
132 | GPIO10_GPIO, /* GSM_IRQ */ | 136 | GPIO10_GPIO, /* GSM_IRQ */ |
133 | GPIO13_GPIO, /* CPLD_IRQ */ | 137 | GPIO13_GPIO, /* CPLD_IRQ */ |
134 | GPIO107_GPIO, /* DS1WM_IRQ */ | 138 | GPIO107_GPIO, /* DS1WM_IRQ */ |
@@ -183,6 +187,23 @@ static struct platform_device gpio_keys = { | |||
183 | }; | 187 | }; |
184 | 188 | ||
185 | /* | 189 | /* |
190 | * Synaptics NavPoint connected to SSP1 | ||
191 | */ | ||
192 | |||
193 | static struct navpoint_platform_data navpoint_platform_data = { | ||
194 | .port = 1, | ||
195 | .gpio = GPIO102_HX4700_SYNAPTICS_POWER_ON, | ||
196 | }; | ||
197 | |||
198 | static struct platform_device navpoint = { | ||
199 | .name = "navpoint", | ||
200 | .id = -1, | ||
201 | .dev = { | ||
202 | .platform_data = &navpoint_platform_data, | ||
203 | }, | ||
204 | }; | ||
205 | |||
206 | /* | ||
186 | * ASIC3 | 207 | * ASIC3 |
187 | */ | 208 | */ |
188 | 209 | ||
@@ -823,6 +844,7 @@ static struct platform_device audio = { | |||
823 | static struct platform_device *devices[] __initdata = { | 844 | static struct platform_device *devices[] __initdata = { |
824 | &asic3, | 845 | &asic3, |
825 | &gpio_keys, | 846 | &gpio_keys, |
847 | &navpoint, | ||
826 | &backlight, | 848 | &backlight, |
827 | &w3220, | 849 | &w3220, |
828 | &hx4700_lcd, | 850 | &hx4700_lcd, |
diff --git a/arch/arm/mach-pxa/include/mach/mfp-pxa27x.h b/arch/arm/mach-pxa/include/mach/mfp-pxa27x.h index a65867209aa0..a611ad3153c7 100644 --- a/arch/arm/mach-pxa/include/mach/mfp-pxa27x.h +++ b/arch/arm/mach-pxa/include/mach/mfp-pxa27x.h | |||
@@ -208,6 +208,7 @@ | |||
208 | #define GPIO113_I2S_SYSCLK MFP_CFG_OUT(GPIO113, AF1, DRIVE_LOW) | 208 | #define GPIO113_I2S_SYSCLK MFP_CFG_OUT(GPIO113, AF1, DRIVE_LOW) |
209 | 209 | ||
210 | /* SSP 1 */ | 210 | /* SSP 1 */ |
211 | #define GPIO23_SSP1_SCLK_IN MFP_CFG_IN(GPIO23, AF2) | ||
211 | #define GPIO23_SSP1_SCLK MFP_CFG_OUT(GPIO23, AF2, DRIVE_LOW) | 212 | #define GPIO23_SSP1_SCLK MFP_CFG_OUT(GPIO23, AF2, DRIVE_LOW) |
212 | #define GPIO29_SSP1_SCLK MFP_CFG_IN(GPIO29, AF3) | 213 | #define GPIO29_SSP1_SCLK MFP_CFG_IN(GPIO29, AF3) |
213 | #define GPIO27_SSP1_SYSCLK MFP_CFG_OUT(GPIO27, AF1, DRIVE_LOW) | 214 | #define GPIO27_SSP1_SYSCLK MFP_CFG_OUT(GPIO27, AF1, DRIVE_LOW) |