diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-09 22:52:01 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-09 22:52:01 -0500 |
commit | fa395aaec823b9d1a5800913a6b5d0e6d1c5ced2 (patch) | |
tree | d599abe9f4f48f1737da50fa9a48dadfd08100e3 /arch/arm/mach-at91 | |
parent | 3e7468313758913c5e4d372f35b271b96bad1298 (diff) | |
parent | 1f26978afd123deb22dd3c7dc75771a02f6e03f6 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (51 commits)
Input: appletouch - give up maintainership
Input: dm355evm_kbd - switch to using sparse keymap library
Input: wistron_btns - switch to using sparse keymap library
Input: add generic support for sparse keymaps
Input: fix memory leak in force feedback core
Input: wistron - remove identification strings from DMI table
Input: psmouse - remove identification strings from DMI tables
Input: atkbd - remove identification strings from DMI table
Input: i8042 - remove identification strings from DMI tables
DMI: allow omitting ident strings in DMI tables
Input: psmouse - do not carry DMI data around
Input: matrix-keypad - switch to using dev_pm_ops
Input: keyboard - fix lack of locking when traversing handler->h_list
Input: gpio_keys - scan gpio state at probe and resume time
Input: keyboard - add locking around event handling
Input: usbtouchscreen - add support for ET&T TC5UH touchscreen controller
Input: xpad - add two new Xbox 360 devices
Input: polled device - do not start polling if interval is zero
Input: polled device - schedule first poll immediately
Input: add S3C24XX touchscreen driver
...
Diffstat (limited to 'arch/arm/mach-at91')
-rw-r--r-- | arch/arm/mach-at91/at91sam9g45_devices.c | 51 | ||||
-rw-r--r-- | arch/arm/mach-at91/at91sam9rl_devices.c | 10 | ||||
-rw-r--r-- | arch/arm/mach-at91/board-sam9m10g45ek.c | 12 | ||||
-rw-r--r-- | arch/arm/mach-at91/board-sam9rlek.c | 12 | ||||
-rw-r--r-- | arch/arm/mach-at91/include/mach/board.h | 7 |
5 files changed, 88 insertions, 4 deletions
diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c b/arch/arm/mach-at91/at91sam9g45_devices.c index a57af3e99c7c..809114d5a5a6 100644 --- a/arch/arm/mach-at91/at91sam9g45_devices.c +++ b/arch/arm/mach-at91/at91sam9g45_devices.c | |||
@@ -866,6 +866,57 @@ static void __init at91_add_device_rtc(void) {} | |||
866 | 866 | ||
867 | 867 | ||
868 | /* -------------------------------------------------------------------- | 868 | /* -------------------------------------------------------------------- |
869 | * Touchscreen | ||
870 | * -------------------------------------------------------------------- */ | ||
871 | |||
872 | #if defined(CONFIG_TOUCHSCREEN_ATMEL_TSADCC) || defined(CONFIG_TOUCHSCREEN_ATMEL_TSADCC_MODULE) | ||
873 | static u64 tsadcc_dmamask = DMA_BIT_MASK(32); | ||
874 | static struct at91_tsadcc_data tsadcc_data; | ||
875 | |||
876 | static struct resource tsadcc_resources[] = { | ||
877 | [0] = { | ||
878 | .start = AT91SAM9G45_BASE_TSC, | ||
879 | .end = AT91SAM9G45_BASE_TSC + SZ_16K - 1, | ||
880 | .flags = IORESOURCE_MEM, | ||
881 | }, | ||
882 | [1] = { | ||
883 | .start = AT91SAM9G45_ID_TSC, | ||
884 | .end = AT91SAM9G45_ID_TSC, | ||
885 | .flags = IORESOURCE_IRQ, | ||
886 | } | ||
887 | }; | ||
888 | |||
889 | static struct platform_device at91sam9g45_tsadcc_device = { | ||
890 | .name = "atmel_tsadcc", | ||
891 | .id = -1, | ||
892 | .dev = { | ||
893 | .dma_mask = &tsadcc_dmamask, | ||
894 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
895 | .platform_data = &tsadcc_data, | ||
896 | }, | ||
897 | .resource = tsadcc_resources, | ||
898 | .num_resources = ARRAY_SIZE(tsadcc_resources), | ||
899 | }; | ||
900 | |||
901 | void __init at91_add_device_tsadcc(struct at91_tsadcc_data *data) | ||
902 | { | ||
903 | if (!data) | ||
904 | return; | ||
905 | |||
906 | at91_set_gpio_input(AT91_PIN_PD20, 0); /* AD0_XR */ | ||
907 | at91_set_gpio_input(AT91_PIN_PD21, 0); /* AD1_XL */ | ||
908 | at91_set_gpio_input(AT91_PIN_PD22, 0); /* AD2_YT */ | ||
909 | at91_set_gpio_input(AT91_PIN_PD23, 0); /* AD3_TB */ | ||
910 | |||
911 | tsadcc_data = *data; | ||
912 | platform_device_register(&at91sam9g45_tsadcc_device); | ||
913 | } | ||
914 | #else | ||
915 | void __init at91_add_device_tsadcc(struct at91_tsadcc_data *data) {} | ||
916 | #endif | ||
917 | |||
918 | |||
919 | /* -------------------------------------------------------------------- | ||
869 | * RTT | 920 | * RTT |
870 | * -------------------------------------------------------------------- */ | 921 | * -------------------------------------------------------------------- */ |
871 | 922 | ||
diff --git a/arch/arm/mach-at91/at91sam9rl_devices.c b/arch/arm/mach-at91/at91sam9rl_devices.c index d345f5453dbe..53aaa94df75a 100644 --- a/arch/arm/mach-at91/at91sam9rl_devices.c +++ b/arch/arm/mach-at91/at91sam9rl_devices.c | |||
@@ -622,6 +622,7 @@ static void __init at91_add_device_tc(void) { } | |||
622 | 622 | ||
623 | #if defined(CONFIG_TOUCHSCREEN_ATMEL_TSADCC) || defined(CONFIG_TOUCHSCREEN_ATMEL_TSADCC_MODULE) | 623 | #if defined(CONFIG_TOUCHSCREEN_ATMEL_TSADCC) || defined(CONFIG_TOUCHSCREEN_ATMEL_TSADCC_MODULE) |
624 | static u64 tsadcc_dmamask = DMA_BIT_MASK(32); | 624 | static u64 tsadcc_dmamask = DMA_BIT_MASK(32); |
625 | static struct at91_tsadcc_data tsadcc_data; | ||
625 | 626 | ||
626 | static struct resource tsadcc_resources[] = { | 627 | static struct resource tsadcc_resources[] = { |
627 | [0] = { | 628 | [0] = { |
@@ -642,22 +643,27 @@ static struct platform_device at91sam9rl_tsadcc_device = { | |||
642 | .dev = { | 643 | .dev = { |
643 | .dma_mask = &tsadcc_dmamask, | 644 | .dma_mask = &tsadcc_dmamask, |
644 | .coherent_dma_mask = DMA_BIT_MASK(32), | 645 | .coherent_dma_mask = DMA_BIT_MASK(32), |
646 | .platform_data = &tsadcc_data, | ||
645 | }, | 647 | }, |
646 | .resource = tsadcc_resources, | 648 | .resource = tsadcc_resources, |
647 | .num_resources = ARRAY_SIZE(tsadcc_resources), | 649 | .num_resources = ARRAY_SIZE(tsadcc_resources), |
648 | }; | 650 | }; |
649 | 651 | ||
650 | void __init at91_add_device_tsadcc(void) | 652 | void __init at91_add_device_tsadcc(struct at91_tsadcc_data *data) |
651 | { | 653 | { |
654 | if (!data) | ||
655 | return; | ||
656 | |||
652 | at91_set_A_periph(AT91_PIN_PA17, 0); /* AD0_XR */ | 657 | at91_set_A_periph(AT91_PIN_PA17, 0); /* AD0_XR */ |
653 | at91_set_A_periph(AT91_PIN_PA18, 0); /* AD1_XL */ | 658 | at91_set_A_periph(AT91_PIN_PA18, 0); /* AD1_XL */ |
654 | at91_set_A_periph(AT91_PIN_PA19, 0); /* AD2_YT */ | 659 | at91_set_A_periph(AT91_PIN_PA19, 0); /* AD2_YT */ |
655 | at91_set_A_periph(AT91_PIN_PA20, 0); /* AD3_TB */ | 660 | at91_set_A_periph(AT91_PIN_PA20, 0); /* AD3_TB */ |
656 | 661 | ||
662 | tsadcc_data = *data; | ||
657 | platform_device_register(&at91sam9rl_tsadcc_device); | 663 | platform_device_register(&at91sam9rl_tsadcc_device); |
658 | } | 664 | } |
659 | #else | 665 | #else |
660 | void __init at91_add_device_tsadcc(void) {} | 666 | void __init at91_add_device_tsadcc(struct at91_tsadcc_data *data) {} |
661 | #endif | 667 | #endif |
662 | 668 | ||
663 | 669 | ||
diff --git a/arch/arm/mach-at91/board-sam9m10g45ek.c b/arch/arm/mach-at91/board-sam9m10g45ek.c index 1cf4d8681078..98f9f4bc9396 100644 --- a/arch/arm/mach-at91/board-sam9m10g45ek.c +++ b/arch/arm/mach-at91/board-sam9m10g45ek.c | |||
@@ -229,6 +229,16 @@ static struct atmel_lcdfb_info __initdata ek_lcdc_data; | |||
229 | 229 | ||
230 | 230 | ||
231 | /* | 231 | /* |
232 | * Touchscreen | ||
233 | */ | ||
234 | static struct at91_tsadcc_data ek_tsadcc_data = { | ||
235 | .adc_clock = 300000, | ||
236 | .pendet_debounce = 0x0d, | ||
237 | .ts_sample_hold_time = 0x0a, | ||
238 | }; | ||
239 | |||
240 | |||
241 | /* | ||
232 | * GPIO Buttons | 242 | * GPIO Buttons |
233 | */ | 243 | */ |
234 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) | 244 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) |
@@ -379,6 +389,8 @@ static void __init ek_board_init(void) | |||
379 | at91_add_device_i2c(0, NULL, 0); | 389 | at91_add_device_i2c(0, NULL, 0); |
380 | /* LCD Controller */ | 390 | /* LCD Controller */ |
381 | at91_add_device_lcdc(&ek_lcdc_data); | 391 | at91_add_device_lcdc(&ek_lcdc_data); |
392 | /* Touch Screen */ | ||
393 | at91_add_device_tsadcc(&ek_tsadcc_data); | ||
382 | /* Push Buttons */ | 394 | /* Push Buttons */ |
383 | ek_add_device_buttons(); | 395 | ek_add_device_buttons(); |
384 | /* AC97 */ | 396 | /* AC97 */ |
diff --git a/arch/arm/mach-at91/board-sam9rlek.c b/arch/arm/mach-at91/board-sam9rlek.c index bd28e989e54e..7ac20f3a2067 100644 --- a/arch/arm/mach-at91/board-sam9rlek.c +++ b/arch/arm/mach-at91/board-sam9rlek.c | |||
@@ -243,6 +243,16 @@ static struct gpio_led ek_leds[] = { | |||
243 | 243 | ||
244 | 244 | ||
245 | /* | 245 | /* |
246 | * Touchscreen | ||
247 | */ | ||
248 | static struct at91_tsadcc_data ek_tsadcc_data = { | ||
249 | .adc_clock = 1000000, | ||
250 | .pendet_debounce = 0x0f, | ||
251 | .ts_sample_hold_time = 0x03, | ||
252 | }; | ||
253 | |||
254 | |||
255 | /* | ||
246 | * GPIO Buttons | 256 | * GPIO Buttons |
247 | */ | 257 | */ |
248 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) | 258 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) |
@@ -310,7 +320,7 @@ static void __init ek_board_init(void) | |||
310 | /* AC97 */ | 320 | /* AC97 */ |
311 | at91_add_device_ac97(&ek_ac97_data); | 321 | at91_add_device_ac97(&ek_ac97_data); |
312 | /* Touch Screen Controller */ | 322 | /* Touch Screen Controller */ |
313 | at91_add_device_tsadcc(); | 323 | at91_add_device_tsadcc(&ek_tsadcc_data); |
314 | /* LEDs */ | 324 | /* LEDs */ |
315 | at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds)); | 325 | at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds)); |
316 | /* Push Buttons */ | 326 | /* Push Buttons */ |
diff --git a/arch/arm/mach-at91/include/mach/board.h b/arch/arm/mach-at91/include/mach/board.h index 2295d80dd893..bb6f6a7ba5e0 100644 --- a/arch/arm/mach-at91/include/mach/board.h +++ b/arch/arm/mach-at91/include/mach/board.h | |||
@@ -187,7 +187,12 @@ extern void __init at91_add_device_ac97(struct ac97c_platform_data *data); | |||
187 | extern void __init at91_add_device_isi(void); | 187 | extern void __init at91_add_device_isi(void); |
188 | 188 | ||
189 | /* Touchscreen Controller */ | 189 | /* Touchscreen Controller */ |
190 | extern void __init at91_add_device_tsadcc(void); | 190 | struct at91_tsadcc_data { |
191 | unsigned int adc_clock; | ||
192 | u8 pendet_debounce; | ||
193 | u8 ts_sample_hold_time; | ||
194 | }; | ||
195 | extern void __init at91_add_device_tsadcc(struct at91_tsadcc_data *data); | ||
191 | 196 | ||
192 | /* CAN */ | 197 | /* CAN */ |
193 | struct at91_can_data { | 198 | struct at91_can_data { |