linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] iio: adc: exynos-adc: Add support for S5PV210
@ 2018-12-07 19:11 Paweł Chmiel
  2018-12-07 19:11 ` [PATCH 1/3] iio: adc: exynos-adc: Add S5PV210 variant Paweł Chmiel
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Paweł Chmiel @ 2018-12-07 19:11 UTC (permalink / raw)
  To: jic23
  Cc: knaack.h, lars, pmeerw, kgene, krzk, xc-racer2,
	pawel.mikolaj.chmiel, broonie, arnaud.pouliquen, baolin.wang,
	smohanad, eugen.hristev, rdunlap, vilhelm.gray, freeman.liu,
	marcus.folkesson, geert, robh+dt, mark.rutland, devicetree,
	linux-iio, linux-arm-kernel, linux-samsung-soc, linux-kernel

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/3] iio: adc: exynos-adc: Add S5PV210 variant
  2018-12-07 19:11 [PATCH 0/3] iio: adc: exynos-adc: Add support for S5PV210 Paweł Chmiel
@ 2018-12-07 19:11 ` Paweł Chmiel
  2018-12-12 17:18   ` Jonathan Cameron
  2018-12-07 19:11 ` [PATCH 2/3] iio: adc: Allow selection of Exynos ADC on S5PV210 Paweł Chmiel
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 8+ messages in thread
From: Paweł Chmiel @ 2018-12-07 19:11 UTC (permalink / raw)
  To: jic23
  Cc: knaack.h, lars, pmeerw, kgene, krzk, xc-racer2,
	pawel.mikolaj.chmiel, broonie, arnaud.pouliquen, baolin.wang,
	smohanad, eugen.hristev, rdunlap, vilhelm.gray, freeman.liu,
	marcus.folkesson, geert, robh+dt, mark.rutland, devicetree,
	linux-iio, linux-arm-kernel, linux-samsung-soc, linux-kernel

From: Jonathan Bakker <xc-racer2@live.ca>

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>
---
 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


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/3] iio: adc: Allow selection of Exynos ADC on S5PV210
  2018-12-07 19:11 [PATCH 0/3] iio: adc: exynos-adc: Add support for S5PV210 Paweł Chmiel
  2018-12-07 19:11 ` [PATCH 1/3] iio: adc: exynos-adc: Add S5PV210 variant Paweł Chmiel
@ 2018-12-07 19:11 ` Paweł Chmiel
  2018-12-12 17:22   ` Jonathan Cameron
  2018-12-07 19:11 ` [PATCH 3/3] dt-bindings: iio: adc: exynos-adc: Add S5PV210 variant Paweł Chmiel
  2018-12-08 15:59 ` [PATCH 0/3] iio: adc: exynos-adc: Add support for S5PV210 Jonathan Cameron
  3 siblings, 1 reply; 8+ messages in thread
From: Paweł Chmiel @ 2018-12-07 19:11 UTC (permalink / raw)
  To: jic23
  Cc: knaack.h, lars, pmeerw, kgene, krzk, xc-racer2,
	pawel.mikolaj.chmiel, broonie, arnaud.pouliquen, baolin.wang,
	smohanad, eugen.hristev, rdunlap, vilhelm.gray, freeman.liu,
	marcus.folkesson, geert, robh+dt, mark.rutland, devicetree,
	linux-iio, linux-arm-kernel, linux-samsung-soc, linux-kernel

From: Jonathan Bakker <xc-racer2@live.ca>

Make it possible to use Exynos ADC driver on S5PV210 based devices.

Signed-off-by: Jonathan Bakker <xc-racer2@live.ca>
Signed-off-by: Paweł Chmiel <pawel.mikolaj.chmiel@gmail.com>
---
 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


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 3/3] dt-bindings: iio: adc: exynos-adc: Add S5PV210 variant
  2018-12-07 19:11 [PATCH 0/3] iio: adc: exynos-adc: Add support for S5PV210 Paweł Chmiel
  2018-12-07 19:11 ` [PATCH 1/3] iio: adc: exynos-adc: Add S5PV210 variant Paweł Chmiel
  2018-12-07 19:11 ` [PATCH 2/3] iio: adc: Allow selection of Exynos ADC on S5PV210 Paweł Chmiel
@ 2018-12-07 19:11 ` Paweł Chmiel
  2018-12-12 17:26   ` Jonathan Cameron
  2018-12-08 15:59 ` [PATCH 0/3] iio: adc: exynos-adc: Add support for S5PV210 Jonathan Cameron
  3 siblings, 1 reply; 8+ messages in thread
From: Paweł Chmiel @ 2018-12-07 19:11 UTC (permalink / raw)
  To: jic23
  Cc: knaack.h, lars, pmeerw, kgene, krzk, xc-racer2,
	pawel.mikolaj.chmiel, broonie, arnaud.pouliquen, baolin.wang,
	smohanad, eugen.hristev, rdunlap, vilhelm.gray, freeman.liu,
	marcus.folkesson, geert, robh+dt, mark.rutland, devicetree,
	linux-iio, linux-arm-kernel, linux-samsung-soc, linux-kernel

From: Jonathan Bakker <xc-racer2@live.ca>

Add information about new compatible for S5PV210

Signed-off-by: Jonathan Bakker <xc-racer2@live.ca>
Signed-off-by: Paweł Chmiel <pawel.mikolaj.chmiel@gmail.com>
---
 .../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


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/3] iio: adc: exynos-adc: Add support for S5PV210
  2018-12-07 19:11 [PATCH 0/3] iio: adc: exynos-adc: Add support for S5PV210 Paweł Chmiel
                   ` (2 preceding siblings ...)
  2018-12-07 19:11 ` [PATCH 3/3] dt-bindings: iio: adc: exynos-adc: Add S5PV210 variant Paweł Chmiel
@ 2018-12-08 15:59 ` Jonathan Cameron
  3 siblings, 0 replies; 8+ messages in thread
From: Jonathan Cameron @ 2018-12-08 15:59 UTC (permalink / raw)
  To: Paweł Chmiel
  Cc: knaack.h, lars, pmeerw, kgene, krzk, xc-racer2, broonie,
	arnaud.pouliquen, baolin.wang, smohanad, eugen.hristev, rdunlap,
	vilhelm.gray, freeman.liu, marcus.folkesson, geert, robh+dt,
	mark.rutland, devicetree, linux-iio, linux-arm-kernel,
	linux-samsung-soc, linux-kernel

On Fri,  7 Dec 2018 20:11:33 +0100
Paweł Chmiel <pawel.mikolaj.chmiel@gmail.com> 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(-)
> 


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/3] iio: adc: exynos-adc: Add S5PV210 variant
  2018-12-07 19:11 ` [PATCH 1/3] iio: adc: exynos-adc: Add S5PV210 variant Paweł Chmiel
@ 2018-12-12 17:18   ` Jonathan Cameron
  0 siblings, 0 replies; 8+ messages in thread
From: Jonathan Cameron @ 2018-12-12 17:18 UTC (permalink / raw)
  To: Paweł Chmiel
  Cc: knaack.h, lars, pmeerw, kgene, krzk, xc-racer2, broonie,
	arnaud.pouliquen, baolin.wang, smohanad, eugen.hristev, rdunlap,
	vilhelm.gray, freeman.liu, marcus.folkesson, geert, robh+dt,
	mark.rutland, devicetree, linux-iio, linux-arm-kernel,
	linux-samsung-soc, linux-kernel

On Fri,  7 Dec 2018 20:11:34 +0100
Paweł Chmiel <pawel.mikolaj.chmiel@gmail.com> wrote:

> From: Jonathan Bakker <xc-racer2@live.ca>
> 
> 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>
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,


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/3] iio: adc: Allow selection of Exynos ADC on S5PV210
  2018-12-07 19:11 ` [PATCH 2/3] iio: adc: Allow selection of Exynos ADC on S5PV210 Paweł Chmiel
@ 2018-12-12 17:22   ` Jonathan Cameron
  0 siblings, 0 replies; 8+ messages in thread
From: Jonathan Cameron @ 2018-12-12 17:22 UTC (permalink / raw)
  To: Paweł Chmiel
  Cc: knaack.h, lars, pmeerw, kgene, krzk, xc-racer2, broonie,
	arnaud.pouliquen, baolin.wang, smohanad, eugen.hristev, rdunlap,
	vilhelm.gray, freeman.liu, marcus.folkesson, geert, robh+dt,
	mark.rutland, devicetree, linux-iio, linux-arm-kernel,
	linux-samsung-soc, linux-kernel

On Fri,  7 Dec 2018 20:11:35 +0100
Paweł Chmiel <pawel.mikolaj.chmiel@gmail.com> wrote:

> From: Jonathan Bakker <xc-racer2@live.ca>
> 
> Make it possible to use Exynos ADC driver on S5PV210 based devices.
> 
> Signed-off-by: Jonathan Bakker <xc-racer2@live.ca>
> Signed-off-by: Paweł Chmiel <pawel.mikolaj.chmiel@gmail.com>
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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 3/3] dt-bindings: iio: adc: exynos-adc: Add S5PV210 variant
  2018-12-07 19:11 ` [PATCH 3/3] dt-bindings: iio: adc: exynos-adc: Add S5PV210 variant Paweł Chmiel
@ 2018-12-12 17:26   ` Jonathan Cameron
  0 siblings, 0 replies; 8+ messages in thread
From: Jonathan Cameron @ 2018-12-12 17:26 UTC (permalink / raw)
  To: Paweł Chmiel
  Cc: knaack.h, lars, pmeerw, kgene, krzk, xc-racer2, broonie,
	arnaud.pouliquen, baolin.wang, smohanad, eugen.hristev, rdunlap,
	vilhelm.gray, freeman.liu, marcus.folkesson, geert, robh+dt,
	mark.rutland, devicetree, linux-iio, linux-arm-kernel,
	linux-samsung-soc, linux-kernel

On Fri,  7 Dec 2018 20:11:36 +0100
Paweł Chmiel <pawel.mikolaj.chmiel@gmail.com> wrote:

> From: Jonathan Bakker <xc-racer2@live.ca>
> 
> Add information about new compatible for S5PV210
> 
> Signed-off-by: Jonathan Bakker <xc-racer2@live.ca>
> Signed-off-by: Paweł Chmiel <pawel.mikolaj.chmiel@gmail.com>

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-12-12 17:26 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-07 19:11 [PATCH 0/3] iio: adc: exynos-adc: Add support for S5PV210 Paweł Chmiel
2018-12-07 19:11 ` [PATCH 1/3] iio: adc: exynos-adc: Add S5PV210 variant Paweł Chmiel
2018-12-12 17:18   ` Jonathan Cameron
2018-12-07 19:11 ` [PATCH 2/3] iio: adc: Allow selection of Exynos ADC on S5PV210 Paweł Chmiel
2018-12-12 17:22   ` Jonathan Cameron
2018-12-07 19:11 ` [PATCH 3/3] dt-bindings: iio: adc: exynos-adc: Add S5PV210 variant Paweł Chmiel
2018-12-12 17:26   ` Jonathan Cameron
2018-12-08 15:59 ` [PATCH 0/3] iio: adc: exynos-adc: Add support for S5PV210 Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).