ARM: at91: sam9rl: switch from atmel_tsadcc to at91_adc
atmel_tsadcc is not allowing to use the remaining ADC channels while at91_adc does. Completely switch to at91_adc and remove the tsadcc platform_data for at91sam9rl and at91sam9rl based boards. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
This commit is contained in:
parent
9d9716255f
commit
8be1c477d5
@ -45,7 +45,6 @@ CONFIG_INPUT_EVDEV=y
|
||||
# CONFIG_INPUT_KEYBOARD is not set
|
||||
# CONFIG_INPUT_MOUSE is not set
|
||||
CONFIG_INPUT_TOUCHSCREEN=y
|
||||
CONFIG_TOUCHSCREEN_ATMEL_TSADCC=y
|
||||
# CONFIG_SERIO is not set
|
||||
CONFIG_SERIAL_ATMEL=y
|
||||
CONFIG_SERIAL_ATMEL_CONSOLE=y
|
||||
@ -65,6 +64,8 @@ CONFIG_MMC=y
|
||||
CONFIG_MMC_ATMELMCI=m
|
||||
CONFIG_RTC_CLASS=y
|
||||
CONFIG_RTC_DRV_AT91SAM9=y
|
||||
CONFIG_IIO=y
|
||||
CONFIG_AT91_ADC=y
|
||||
CONFIG_EXT2_FS=y
|
||||
CONFIG_MSDOS_FS=y
|
||||
CONFIG_VFAT_FS=y
|
||||
|
@ -609,56 +609,6 @@ static void __init at91_add_device_tc(void) { }
|
||||
#endif
|
||||
|
||||
|
||||
/* --------------------------------------------------------------------
|
||||
* Touchscreen
|
||||
* -------------------------------------------------------------------- */
|
||||
|
||||
#if defined(CONFIG_TOUCHSCREEN_ATMEL_TSADCC) || defined(CONFIG_TOUCHSCREEN_ATMEL_TSADCC_MODULE)
|
||||
static u64 tsadcc_dmamask = DMA_BIT_MASK(32);
|
||||
static struct at91_tsadcc_data tsadcc_data;
|
||||
|
||||
static struct resource tsadcc_resources[] = {
|
||||
[0] = {
|
||||
.start = AT91SAM9RL_BASE_TSC,
|
||||
.end = AT91SAM9RL_BASE_TSC + SZ_16K - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = NR_IRQS_LEGACY + AT91SAM9RL_ID_TSC,
|
||||
.end = NR_IRQS_LEGACY + AT91SAM9RL_ID_TSC,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
}
|
||||
};
|
||||
|
||||
static struct platform_device at91sam9rl_tsadcc_device = {
|
||||
.name = "atmel_tsadcc",
|
||||
.id = -1,
|
||||
.dev = {
|
||||
.dma_mask = &tsadcc_dmamask,
|
||||
.coherent_dma_mask = DMA_BIT_MASK(32),
|
||||
.platform_data = &tsadcc_data,
|
||||
},
|
||||
.resource = tsadcc_resources,
|
||||
.num_resources = ARRAY_SIZE(tsadcc_resources),
|
||||
};
|
||||
|
||||
void __init at91_add_device_tsadcc(struct at91_tsadcc_data *data)
|
||||
{
|
||||
if (!data)
|
||||
return;
|
||||
|
||||
at91_set_A_periph(AT91_PIN_PA17, 0); /* AD0_XR */
|
||||
at91_set_A_periph(AT91_PIN_PA18, 0); /* AD1_XL */
|
||||
at91_set_A_periph(AT91_PIN_PA19, 0); /* AD2_YT */
|
||||
at91_set_A_periph(AT91_PIN_PA20, 0); /* AD3_TB */
|
||||
|
||||
tsadcc_data = *data;
|
||||
platform_device_register(&at91sam9rl_tsadcc_device);
|
||||
}
|
||||
#else
|
||||
void __init at91_add_device_tsadcc(struct at91_tsadcc_data *data) {}
|
||||
#endif
|
||||
|
||||
/* --------------------------------------------------------------------
|
||||
* ADC and Touchscreen
|
||||
* -------------------------------------------------------------------- */
|
||||
|
@ -230,16 +230,6 @@ static struct gpio_led ek_leds[] = {
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Touchscreen
|
||||
*/
|
||||
static struct at91_tsadcc_data ek_tsadcc_data = {
|
||||
.adc_clock = 1000000,
|
||||
.pendet_debounce = 0x0f,
|
||||
.ts_sample_hold_time = 0x03,
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* ADC + Touchscreen
|
||||
*/
|
||||
@ -323,8 +313,6 @@ static void __init ek_board_init(void)
|
||||
at91_add_device_lcdc(&ek_lcdc_data);
|
||||
/* AC97 */
|
||||
at91_add_device_ac97(&ek_ac97_data);
|
||||
/* Touch Screen Controller */
|
||||
at91_add_device_tsadcc(&ek_tsadcc_data);
|
||||
/* Touch Screen Controller + ADC */
|
||||
at91_add_device_adc(&ek_adc_data);
|
||||
/* LEDs */
|
||||
|
Loading…
Reference in New Issue
Block a user