diff options
author | Alexandre Belloni <alexandre.belloni@free-electrons.com> | 2014-04-15 06:28:02 -0400 |
---|---|---|
committer | Nicolas Ferre <nicolas.ferre@atmel.com> | 2014-05-07 12:28:40 -0400 |
commit | 65b1fdbac9e39d98a1416633106e89c1be1bef1b (patch) | |
tree | 10f00963d82228f4bfeb84e280beea7aedf28f05 | |
parent | bee20c4be1e2c32172f41c24ebaa7762aa9e4825 (diff) |
iio: adc: at91: add sam9rl support
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
-rw-r--r-- | drivers/iio/adc/at91_adc.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/iio/adc/at91_adc.c b/drivers/iio/adc/at91_adc.c index a51b8badbf8e..3b5bacd4d8da 100644 --- a/drivers/iio/adc/at91_adc.c +++ b/drivers/iio/adc/at91_adc.c | |||
@@ -1346,6 +1346,20 @@ static struct at91_adc_caps at91sam9260_caps = { | |||
1346 | }, | 1346 | }, |
1347 | }; | 1347 | }; |
1348 | 1348 | ||
1349 | static struct at91_adc_caps at91sam9rl_caps = { | ||
1350 | .has_ts = true, | ||
1351 | .calc_startup_ticks = calc_startup_ticks_9260, /* same as 9260 */ | ||
1352 | .num_channels = 6, | ||
1353 | .registers = { | ||
1354 | .channel_base = AT91_ADC_CHR(0), | ||
1355 | .drdy_mask = AT91_ADC_DRDY, | ||
1356 | .status_register = AT91_ADC_SR, | ||
1357 | .trigger_register = AT91_ADC_TRGR_9G45, | ||
1358 | .mr_prescal_mask = AT91_ADC_PRESCAL_9260, | ||
1359 | .mr_startup_mask = AT91_ADC_STARTUP_9G45, | ||
1360 | }, | ||
1361 | }; | ||
1362 | |||
1349 | static struct at91_adc_caps at91sam9g45_caps = { | 1363 | static struct at91_adc_caps at91sam9g45_caps = { |
1350 | .has_ts = true, | 1364 | .has_ts = true, |
1351 | .calc_startup_ticks = calc_startup_ticks_9260, /* same as 9260 */ | 1365 | .calc_startup_ticks = calc_startup_ticks_9260, /* same as 9260 */ |
@@ -1380,6 +1394,7 @@ static struct at91_adc_caps at91sam9x5_caps = { | |||
1380 | 1394 | ||
1381 | static const struct of_device_id at91_adc_dt_ids[] = { | 1395 | static const struct of_device_id at91_adc_dt_ids[] = { |
1382 | { .compatible = "atmel,at91sam9260-adc", .data = &at91sam9260_caps }, | 1396 | { .compatible = "atmel,at91sam9260-adc", .data = &at91sam9260_caps }, |
1397 | { .compatible = "atmel,at91sam9rl-adc", .data = &at91sam9rl_caps }, | ||
1383 | { .compatible = "atmel,at91sam9g45-adc", .data = &at91sam9g45_caps }, | 1398 | { .compatible = "atmel,at91sam9g45-adc", .data = &at91sam9g45_caps }, |
1384 | { .compatible = "atmel,at91sam9x5-adc", .data = &at91sam9x5_caps }, | 1399 | { .compatible = "atmel,at91sam9x5-adc", .data = &at91sam9x5_caps }, |
1385 | {}, | 1400 | {}, |
@@ -1391,6 +1406,9 @@ static const struct platform_device_id at91_adc_ids[] = { | |||
1391 | .name = "at91sam9260-adc", | 1406 | .name = "at91sam9260-adc", |
1392 | .driver_data = (unsigned long)&at91sam9260_caps, | 1407 | .driver_data = (unsigned long)&at91sam9260_caps, |
1393 | }, { | 1408 | }, { |
1409 | .name = "at91sam9rl-adc", | ||
1410 | .driver_data = (unsigned long)&at91sam9rl_caps, | ||
1411 | }, { | ||
1394 | .name = "at91sam9g45-adc", | 1412 | .name = "at91sam9g45-adc", |
1395 | .driver_data = (unsigned long)&at91sam9g45_caps, | 1413 | .driver_data = (unsigned long)&at91sam9g45_caps, |
1396 | }, { | 1414 | }, { |