diff options
author | Jonathan Bakker <xc-racer2@live.ca> | 2018-12-07 20:11:34 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-09-16 08:22:05 +0200 |
commit | 7f588a7262b3e4878e3dce5e60b27b7bbc59e2b2 (patch) | |
tree | f6845b3812bdd7582aa2dec448c4cb4e5ae2aeba | |
parent | cd490d44150da6e7600fcee57d2480c6e2b9609c (diff) | |
download | linux-stable-7f588a7262b3e4878e3dce5e60b27b7bbc59e2b2.tar.gz linux-stable-7f588a7262b3e4878e3dce5e60b27b7bbc59e2b2.tar.bz2 linux-stable-7f588a7262b3e4878e3dce5e60b27b7bbc59e2b2.zip |
iio: adc: exynos-adc: Add S5PV210 variant
[ Upstream commit 882bf52fdeab47dbe991cc0e564b0b51c571d0a3 ]
S5PV210's ADC variant is almost the same as v1 except that it has 10
channels and doesn't require the pmu register
Signed-off-by: Jonathan Bakker <xc-racer2@live.ca>
Signed-off-by: Paweł Chmiel <pawel.mikolaj.chmiel@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r-- | drivers/iio/adc/exynos_adc.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/iio/adc/exynos_adc.c b/drivers/iio/adc/exynos_adc.c index 4be29ed44755..41da522fc673 100644 --- a/drivers/iio/adc/exynos_adc.c +++ b/drivers/iio/adc/exynos_adc.c @@ -115,6 +115,7 @@ #define MAX_ADC_V2_CHANNELS 10 #define MAX_ADC_V1_CHANNELS 8 #define MAX_EXYNOS3250_ADC_CHANNELS 2 +#define MAX_S5PV210_ADC_CHANNELS 10 /* Bit definitions common for ADC_V1 and ADC_V2 */ #define ADC_CON_EN_START (1u << 0) @@ -282,6 +283,16 @@ static const struct exynos_adc_data exynos_adc_v1_data = { .start_conv = exynos_adc_v1_start_conv, }; +static const struct exynos_adc_data exynos_adc_s5pv210_data = { + .num_channels = MAX_S5PV210_ADC_CHANNELS, + .mask = ADC_DATX_MASK, /* 12 bit ADC resolution */ + + .init_hw = exynos_adc_v1_init_hw, + .exit_hw = exynos_adc_v1_exit_hw, + .clear_irq = exynos_adc_v1_clear_irq, + .start_conv = exynos_adc_v1_start_conv, +}; + static void exynos_adc_s3c2416_start_conv(struct exynos_adc *info, unsigned long addr) { @@ -479,6 +490,9 @@ static const struct of_device_id exynos_adc_match[] = { .compatible = "samsung,s3c6410-adc", .data = &exynos_adc_s3c64xx_data, }, { + .compatible = "samsung,s5pv210-adc", + .data = &exynos_adc_s5pv210_data, + }, { .compatible = "samsung,exynos-adc-v1", .data = &exynos_adc_v1_data, }, { |