This patchset adds support for S5PV210 adc variant to exynos-adc driver.
Jonathan Bakker (3):
iio: adc: exynos-adc: Add S5PV210 variant
iio: adc: Allow selection of Exynos ADC on S5PV210
dt-bindings: iio: adc: exynos-adc: Add S5PV210 variant
.../bindings/iio/adc/samsung,exynos-adc.txt | 4 +++-
drivers/iio/adc/Kconfig | 2 +-
drivers/iio/adc/exynos_adc.c | 14 ++++++++++++++
3 files changed, 18 insertions(+), 2 deletions(-)
--
2.17.1
From: Jonathan Bakker <[email protected]>
Add information about new compatible for S5PV210
Signed-off-by: Jonathan Bakker <[email protected]>
Signed-off-by: Paweł Chmiel <[email protected]>
---
.../devicetree/bindings/iio/adc/samsung,exynos-adc.txt | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.txt b/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.txt
index 6c49db7f8ad2..a10c1f89037d 100644
--- a/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.txt
+++ b/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.txt
@@ -11,7 +11,7 @@ New driver handles the following
Required properties:
- compatible: Must be "samsung,exynos-adc-v1"
- for exynos4412/5250 and s5pv210 controllers.
+ for exynos4412/5250 controllers.
Must be "samsung,exynos-adc-v2" for
future controllers.
Must be "samsung,exynos3250-adc" for
@@ -28,6 +28,8 @@ Required properties:
the ADC in s3c2443 and compatibles
Must be "samsung,s3c6410-adc" for
the ADC in s3c6410 and compatibles
+ Must be "samsung,s5pv210-adc" for
+ the ADC in s5pv210 and compatibles
- reg: List of ADC register address range
- The base address and range of ADC register
- The base address and range of ADC_PHY register (every
--
2.17.1
From: Jonathan Bakker <[email protected]>
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 <[email protected]>
Signed-off-by: Paweł Chmiel <[email protected]>
---
drivers/iio/adc/exynos_adc.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/drivers/iio/adc/exynos_adc.c b/drivers/iio/adc/exynos_adc.c
index f10443f92e4c..fa2d2b5767f3 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)
{
@@ -478,6 +489,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,
--
2.17.1
From: Jonathan Bakker <[email protected]>
Make it possible to use Exynos ADC driver on S5PV210 based devices.
Signed-off-by: Jonathan Bakker <[email protected]>
Signed-off-by: Paweł Chmiel <[email protected]>
---
drivers/iio/adc/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iio/adc/Kconfig b/drivers/iio/adc/Kconfig
index a52fea8749a9..20e126ff030e 100644
--- a/drivers/iio/adc/Kconfig
+++ b/drivers/iio/adc/Kconfig
@@ -274,7 +274,7 @@ config EP93XX_ADC
config EXYNOS_ADC
tristate "Exynos ADC driver support"
- depends on ARCH_EXYNOS || ARCH_S3C24XX || ARCH_S3C64XX || (OF && COMPILE_TEST)
+ depends on ARCH_EXYNOS || ARCH_S3C24XX || ARCH_S3C64XX || ARCH_S5PV210 || (OF && COMPILE_TEST)
depends on HAS_IOMEM
help
Core support for the ADC block found in the Samsung EXYNOS series
--
2.17.1
On Fri, 7 Dec 2018 20:11:33 +0100
Paweł Chmiel <[email protected]> wrote:
> This patchset adds support for S5PV210 adc variant to exynos-adc driver.
This looks fine to me, but I'd like to let it sit on the lists
for a few days to let people more familiar with the platform have
time to review.
Give me a poke if I seem to have forgotten it in a week or so.
Thanks,
Jonathan
>
> Jonathan Bakker (3):
> iio: adc: exynos-adc: Add S5PV210 variant
> iio: adc: Allow selection of Exynos ADC on S5PV210
> dt-bindings: iio: adc: exynos-adc: Add S5PV210 variant
>
> .../bindings/iio/adc/samsung,exynos-adc.txt | 4 +++-
> drivers/iio/adc/Kconfig | 2 +-
> drivers/iio/adc/exynos_adc.c | 14 ++++++++++++++
> 3 files changed, 18 insertions(+), 2 deletions(-)
>
On Fri, 7 Dec 2018 20:11:34 +0100
Paweł Chmiel <[email protected]> wrote:
> From: Jonathan Bakker <[email protected]>
>
> 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 <[email protected]>
> Signed-off-by: Paweł Chmiel <[email protected]>
Long enough I thing ;)
Applied to the togreg branch of iio.git and pushed out as testing
for the autobuilders to play with it.
Thanks,
Jonathan
> ---
> drivers/iio/adc/exynos_adc.c | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
>
> diff --git a/drivers/iio/adc/exynos_adc.c b/drivers/iio/adc/exynos_adc.c
> index f10443f92e4c..fa2d2b5767f3 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)
> {
> @@ -478,6 +489,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,
On Fri, 7 Dec 2018 20:11:35 +0100
Paweł Chmiel <[email protected]> wrote:
> From: Jonathan Bakker <[email protected]>
>
> Make it possible to use Exynos ADC driver on S5PV210 based devices.
>
> Signed-off-by: Jonathan Bakker <[email protected]>
> Signed-off-by: Paweł Chmiel <[email protected]>
Applied to the togreg branch of iio.git and pushed out as testing
for the autobuilders to play with it.
Thanks,
Jonathan
> ---
> drivers/iio/adc/Kconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/adc/Kconfig b/drivers/iio/adc/Kconfig
> index a52fea8749a9..20e126ff030e 100644
> --- a/drivers/iio/adc/Kconfig
> +++ b/drivers/iio/adc/Kconfig
> @@ -274,7 +274,7 @@ config EP93XX_ADC
>
> config EXYNOS_ADC
> tristate "Exynos ADC driver support"
> - depends on ARCH_EXYNOS || ARCH_S3C24XX || ARCH_S3C64XX || (OF && COMPILE_TEST)
> + depends on ARCH_EXYNOS || ARCH_S3C24XX || ARCH_S3C64XX || ARCH_S5PV210 || (OF && COMPILE_TEST)
> depends on HAS_IOMEM
> help
> Core support for the ADC block found in the Samsung EXYNOS series
On Fri, 7 Dec 2018 20:11:36 +0100
Paweł Chmiel <[email protected]> wrote:
> From: Jonathan Bakker <[email protected]>
>
> Add information about new compatible for S5PV210
>
> Signed-off-by: Jonathan Bakker <[email protected]>
> Signed-off-by: Paweł Chmiel <[email protected]>
Applied to the togreg branch of iio.git and pushed out as
testing for the autobuilders to play with it.
Thanks,
Jonathan
> ---
> .../devicetree/bindings/iio/adc/samsung,exynos-adc.txt | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.txt b/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.txt
> index 6c49db7f8ad2..a10c1f89037d 100644
> --- a/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.txt
> +++ b/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.txt
> @@ -11,7 +11,7 @@ New driver handles the following
>
> Required properties:
> - compatible: Must be "samsung,exynos-adc-v1"
> - for exynos4412/5250 and s5pv210 controllers.
> + for exynos4412/5250 controllers.
> Must be "samsung,exynos-adc-v2" for
> future controllers.
> Must be "samsung,exynos3250-adc" for
> @@ -28,6 +28,8 @@ Required properties:
> the ADC in s3c2443 and compatibles
> Must be "samsung,s3c6410-adc" for
> the ADC in s3c6410 and compatibles
> + Must be "samsung,s5pv210-adc" for
> + the ADC in s5pv210 and compatibles
> - reg: List of ADC register address range
> - The base address and range of ADC register
> - The base address and range of ADC_PHY register (every