diff options
-rw-r--r-- | arch/arm/configs/at91sam9g45_defconfig | 3 | ||||
-rw-r--r-- | arch/arm/mach-at91/at91sam9g45_devices.c | 53 | ||||
-rw-r--r-- | arch/arm/mach-at91/board-sam9m10g45ek.c | 15 |
3 files changed, 5 insertions, 66 deletions
diff --git a/arch/arm/configs/at91sam9g45_defconfig b/arch/arm/configs/at91sam9g45_defconfig index e181a50fd65a..c6661a60025d 100644 --- a/arch/arm/configs/at91sam9g45_defconfig +++ b/arch/arm/configs/at91sam9g45_defconfig | |||
@@ -83,7 +83,6 @@ CONFIG_KEYBOARD_GPIO=y | |||
83 | # CONFIG_INPUT_MOUSE is not set | 83 | # CONFIG_INPUT_MOUSE is not set |
84 | CONFIG_INPUT_TOUCHSCREEN=y | 84 | CONFIG_INPUT_TOUCHSCREEN=y |
85 | CONFIG_TOUCHSCREEN_ATMEL_MXT=m | 85 | CONFIG_TOUCHSCREEN_ATMEL_MXT=m |
86 | CONFIG_TOUCHSCREEN_ATMEL_TSADCC=y | ||
87 | # CONFIG_SERIO is not set | 86 | # CONFIG_SERIO is not set |
88 | # CONFIG_LEGACY_PTYS is not set | 87 | # CONFIG_LEGACY_PTYS is not set |
89 | CONFIG_SERIAL_ATMEL=y | 88 | CONFIG_SERIAL_ATMEL=y |
@@ -146,6 +145,8 @@ CONFIG_DMADEVICES=y | |||
146 | CONFIG_AT_HDMAC=y | 145 | CONFIG_AT_HDMAC=y |
147 | CONFIG_DMATEST=m | 146 | CONFIG_DMATEST=m |
148 | # CONFIG_IOMMU_SUPPORT is not set | 147 | # CONFIG_IOMMU_SUPPORT is not set |
148 | CONFIG_IIO=y | ||
149 | CONFIG_AT91_ADC=y | ||
149 | CONFIG_EXT4_FS=y | 150 | CONFIG_EXT4_FS=y |
150 | CONFIG_FANOTIFY=y | 151 | CONFIG_FANOTIFY=y |
151 | CONFIG_VFAT_FS=y | 152 | CONFIG_VFAT_FS=y |
diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c b/arch/arm/mach-at91/at91sam9g45_devices.c index eb06348de330..d943363c1845 100644 --- a/arch/arm/mach-at91/at91sam9g45_devices.c +++ b/arch/arm/mach-at91/at91sam9g45_devices.c | |||
@@ -1133,58 +1133,7 @@ static void __init at91_add_device_rtc(void) {} | |||
1133 | 1133 | ||
1134 | 1134 | ||
1135 | /* -------------------------------------------------------------------- | 1135 | /* -------------------------------------------------------------------- |
1136 | * Touchscreen | 1136 | * ADC and touchscreen |
1137 | * -------------------------------------------------------------------- */ | ||
1138 | |||
1139 | #if defined(CONFIG_TOUCHSCREEN_ATMEL_TSADCC) || defined(CONFIG_TOUCHSCREEN_ATMEL_TSADCC_MODULE) | ||
1140 | static u64 tsadcc_dmamask = DMA_BIT_MASK(32); | ||
1141 | static struct at91_tsadcc_data tsadcc_data; | ||
1142 | |||
1143 | static struct resource tsadcc_resources[] = { | ||
1144 | [0] = { | ||
1145 | .start = AT91SAM9G45_BASE_TSC, | ||
1146 | .end = AT91SAM9G45_BASE_TSC + SZ_16K - 1, | ||
1147 | .flags = IORESOURCE_MEM, | ||
1148 | }, | ||
1149 | [1] = { | ||
1150 | .start = NR_IRQS_LEGACY + AT91SAM9G45_ID_TSC, | ||
1151 | .end = NR_IRQS_LEGACY + AT91SAM9G45_ID_TSC, | ||
1152 | .flags = IORESOURCE_IRQ, | ||
1153 | } | ||
1154 | }; | ||
1155 | |||
1156 | static struct platform_device at91sam9g45_tsadcc_device = { | ||
1157 | .name = "atmel_tsadcc", | ||
1158 | .id = -1, | ||
1159 | .dev = { | ||
1160 | .dma_mask = &tsadcc_dmamask, | ||
1161 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
1162 | .platform_data = &tsadcc_data, | ||
1163 | }, | ||
1164 | .resource = tsadcc_resources, | ||
1165 | .num_resources = ARRAY_SIZE(tsadcc_resources), | ||
1166 | }; | ||
1167 | |||
1168 | void __init at91_add_device_tsadcc(struct at91_tsadcc_data *data) | ||
1169 | { | ||
1170 | if (!data) | ||
1171 | return; | ||
1172 | |||
1173 | at91_set_gpio_input(AT91_PIN_PD20, 0); /* AD0_XR */ | ||
1174 | at91_set_gpio_input(AT91_PIN_PD21, 0); /* AD1_XL */ | ||
1175 | at91_set_gpio_input(AT91_PIN_PD22, 0); /* AD2_YT */ | ||
1176 | at91_set_gpio_input(AT91_PIN_PD23, 0); /* AD3_TB */ | ||
1177 | |||
1178 | tsadcc_data = *data; | ||
1179 | platform_device_register(&at91sam9g45_tsadcc_device); | ||
1180 | } | ||
1181 | #else | ||
1182 | void __init at91_add_device_tsadcc(struct at91_tsadcc_data *data) {} | ||
1183 | #endif | ||
1184 | |||
1185 | |||
1186 | /* -------------------------------------------------------------------- | ||
1187 | * ADC | ||
1188 | * -------------------------------------------------------------------- */ | 1137 | * -------------------------------------------------------------------- */ |
1189 | 1138 | ||
1190 | #if IS_ENABLED(CONFIG_AT91_ADC) | 1139 | #if IS_ENABLED(CONFIG_AT91_ADC) |
diff --git a/arch/arm/mach-at91/board-sam9m10g45ek.c b/arch/arm/mach-at91/board-sam9m10g45ek.c index ffef9698d2c1..1ea61328f30d 100644 --- a/arch/arm/mach-at91/board-sam9m10g45ek.c +++ b/arch/arm/mach-at91/board-sam9m10g45ek.c | |||
@@ -301,16 +301,7 @@ static struct atmel_lcdfb_pdata __initdata ek_lcdc_data; | |||
301 | 301 | ||
302 | 302 | ||
303 | /* | 303 | /* |
304 | * Touchscreen | 304 | * ADCs and touchscreen |
305 | */ | ||
306 | static struct at91_tsadcc_data ek_tsadcc_data = { | ||
307 | .adc_clock = 300000, | ||
308 | .pendet_debounce = 0x0d, | ||
309 | .ts_sample_hold_time = 0x0a, | ||
310 | }; | ||
311 | |||
312 | /* | ||
313 | * ADCs | ||
314 | */ | 305 | */ |
315 | static struct at91_adc_data ek_adc_data = { | 306 | static struct at91_adc_data ek_adc_data = { |
316 | .channels_used = BIT(0) | BIT(1) | BIT(2) | BIT(3) | BIT(4) | BIT(5) | BIT(6) | BIT(7), | 307 | .channels_used = BIT(0) | BIT(1) | BIT(2) | BIT(3) | BIT(4) | BIT(5) | BIT(6) | BIT(7), |
@@ -487,9 +478,7 @@ static void __init ek_board_init(void) | |||
487 | at91_add_device_isi(&isi_data, true); | 478 | at91_add_device_isi(&isi_data, true); |
488 | /* LCD Controller */ | 479 | /* LCD Controller */ |
489 | at91_add_device_lcdc(&ek_lcdc_data); | 480 | at91_add_device_lcdc(&ek_lcdc_data); |
490 | /* Touch Screen */ | 481 | /* ADC and touchscreen */ |
491 | at91_add_device_tsadcc(&ek_tsadcc_data); | ||
492 | /* ADC */ | ||
493 | at91_add_device_adc(&ek_adc_data); | 482 | at91_add_device_adc(&ek_adc_data); |
494 | /* Push Buttons */ | 483 | /* Push Buttons */ |
495 | ek_add_device_buttons(); | 484 | ek_add_device_buttons(); |