All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] iio:adc128s052: add support for adc124s021
@ 2015-12-09  9:24 Oliver Stäbler
  2015-12-09  9:24 ` [PATCH 1/1] " Oliver Stäbler
  0 siblings, 1 reply; 4+ messages in thread
From: Oliver Stäbler @ 2015-12-09  9:24 UTC (permalink / raw)
  To: angelo.compagnucci, jic23; +Cc: linux-kernel, linux-iio, Oliver Stäbler

This trivial patch adds support for adc124s021, which is a 4-channel version of
the already supported ADC chips.
Built against v4.4-rc4


Oliver Stäbler (1):
  iio:adc128s052: add support for adc124s021

 Documentation/devicetree/bindings/iio/adc/ti-adc128s052.txt |  4 ++--
 drivers/iio/adc/Kconfig                                     |  6 +++---
 drivers/iio/adc/ti-adc128s052.c                             | 13 ++++++++++++-
 3 files changed, 17 insertions(+), 6 deletions(-)

-- 
2.4.10


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

* [PATCH 1/1] iio:adc128s052: add support for adc124s021
  2015-12-09  9:24 [PATCH 0/1] iio:adc128s052: add support for adc124s021 Oliver Stäbler
@ 2015-12-09  9:24 ` Oliver Stäbler
  2015-12-11 11:50   ` Martin Kepplinger
  0 siblings, 1 reply; 4+ messages in thread
From: Oliver Stäbler @ 2015-12-09  9:24 UTC (permalink / raw)
  To: angelo.compagnucci, jic23; +Cc: linux-kernel, linux-iio, Oliver Stäbler

Signed-off-by: Oliver Stäbler <oliver.staebler@bytesatwork.ch>
---
 Documentation/devicetree/bindings/iio/adc/ti-adc128s052.txt |  4 ++--
 drivers/iio/adc/Kconfig                                     |  6 +++---
 drivers/iio/adc/ti-adc128s052.c                             | 13 ++++++++++++-
 3 files changed, 17 insertions(+), 6 deletions(-)

diff --git a/Documentation/devicetree/bindings/iio/adc/ti-adc128s052.txt b/Documentation/devicetree/bindings/iio/adc/ti-adc128s052.txt
index 15ca6b4..daa2b2c 100644
--- a/Documentation/devicetree/bindings/iio/adc/ti-adc128s052.txt
+++ b/Documentation/devicetree/bindings/iio/adc/ti-adc128s052.txt
@@ -1,7 +1,7 @@
-* Texas Instruments' ADC128S052 and ADC122S021 ADC chip
+* Texas Instruments' ADC128S052, ADC122S021 and ADC124S021 ADC chip
 
 Required properties:
- - compatible: Should be "ti,adc128s052" or "ti,adc122s021"
+ - compatible: Should be "ti,adc128s052", "ti,adc122s021" or "ti,adc124s021"
  - reg: spi chip select number for the device
  - vref-supply: The regulator supply for ADC reference voltage
 
diff --git a/drivers/iio/adc/Kconfig b/drivers/iio/adc/Kconfig
index 7868c74..351bd11 100644
--- a/drivers/iio/adc/Kconfig
+++ b/drivers/iio/adc/Kconfig
@@ -324,11 +324,11 @@ config TI_ADC081C
 	  called ti-adc081c.
 
 config TI_ADC128S052
-	tristate "Texas Instruments ADC128S052/ADC122S021"
+	tristate "Texas Instruments ADC128S052/ADC122S021/ADC124S021"
 	depends on SPI
 	help
-	  If you say yes here you get support for Texas Instruments ADC128S052
-	  and ADC122S021 chips.
+	  If you say yes here you get support for Texas Instruments ADC128S052,
+	  ADC122S021 and ADC124S021 chips.
 
 	  This driver can also be built as a module. If so, the module will be
 	  called ti-adc128s052.
diff --git a/drivers/iio/adc/ti-adc128s052.c b/drivers/iio/adc/ti-adc128s052.c
index ff6f7f6..bc58867 100644
--- a/drivers/iio/adc/ti-adc128s052.c
+++ b/drivers/iio/adc/ti-adc128s052.c
@@ -1,10 +1,11 @@
 /*
  * Copyright (C) 2014 Angelo Compagnucci <angelo.compagnucci@gmail.com>
  *
- * Driver for Texas Instruments' ADC128S052 and ADC122S021 ADC chip.
+ * Driver for Texas Instruments' ADC128S052, ADC122S021 and ADC124S021 ADC chip.
  * Datasheets can be found here:
  * http://www.ti.com/lit/ds/symlink/adc128s052.pdf
  * http://www.ti.com/lit/ds/symlink/adc122s021.pdf
+ * http://www.ti.com/lit/ds/symlink/adc124s021.pdf
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -114,9 +115,17 @@ static const struct iio_chan_spec adc122s021_channels[] = {
 	ADC128_VOLTAGE_CHANNEL(1),
 };
 
+static const struct iio_chan_spec adc124s021_channels[] = {
+	ADC128_VOLTAGE_CHANNEL(0),
+	ADC128_VOLTAGE_CHANNEL(1),
+	ADC128_VOLTAGE_CHANNEL(2),
+	ADC128_VOLTAGE_CHANNEL(3),
+};
+
 static const struct adc128_configuration adc128_config[] = {
 	{ adc128s052_channels, ARRAY_SIZE(adc128s052_channels) },
 	{ adc122s021_channels, ARRAY_SIZE(adc122s021_channels) },
+	{ adc124s021_channels, ARRAY_SIZE(adc124s021_channels) },
 };
 
 static const struct iio_info adc128_info = {
@@ -177,6 +186,7 @@ static int adc128_remove(struct spi_device *spi)
 static const struct of_device_id adc128_of_match[] = {
 	{ .compatible = "ti,adc128s052", },
 	{ .compatible = "ti,adc122s021", },
+	{ .compatible = "ti,adc124s021", },
 	{ /* sentinel */ },
 };
 MODULE_DEVICE_TABLE(of, adc128_of_match);
@@ -184,6 +194,7 @@ MODULE_DEVICE_TABLE(of, adc128_of_match);
 static const struct spi_device_id adc128_id[] = {
 	{ "adc128s052", 0},	/* index into adc128_config */
 	{ "adc122s021",	1},
+	{ "adc124s021", 2},
 	{ }
 };
 MODULE_DEVICE_TABLE(spi, adc128_id);
-- 
2.4.10


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

* Re: [PATCH 1/1] iio:adc128s052: add support for adc124s021
  2015-12-09  9:24 ` [PATCH 1/1] " Oliver Stäbler
@ 2015-12-11 11:50   ` Martin Kepplinger
  2015-12-12 12:10     ` Jonathan Cameron
  0 siblings, 1 reply; 4+ messages in thread
From: Martin Kepplinger @ 2015-12-11 11:50 UTC (permalink / raw)
  To: Oliver Stäbler, angelo.compagnucci, jic23; +Cc: linux-kernel, linux-iio

Am 2015-12-09 um 10:24 schrieb Oliver Stäbler:
> Signed-off-by: Oliver Stäbler <oliver.staebler@bytesatwork.ch>

If the datasheet is publicly available, please link to it in the commit
message, so people can easily verify this.

Seems ok though. Feel free to add
Reviewed-by: Martin Kepplinger <martink@posteo.de>
if you feel like it.

thanks
                         martin

> ---
>  Documentation/devicetree/bindings/iio/adc/ti-adc128s052.txt |  4 ++--
>  drivers/iio/adc/Kconfig                                     |  6 +++---
>  drivers/iio/adc/ti-adc128s052.c                             | 13 ++++++++++++-
>  3 files changed, 17 insertions(+), 6 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/iio/adc/ti-adc128s052.txt b/Documentation/devicetree/bindings/iio/adc/ti-adc128s052.txt
> index 15ca6b4..daa2b2c 100644
> --- a/Documentation/devicetree/bindings/iio/adc/ti-adc128s052.txt
> +++ b/Documentation/devicetree/bindings/iio/adc/ti-adc128s052.txt
> @@ -1,7 +1,7 @@
> -* Texas Instruments' ADC128S052 and ADC122S021 ADC chip
> +* Texas Instruments' ADC128S052, ADC122S021 and ADC124S021 ADC chip
>  
>  Required properties:
> - - compatible: Should be "ti,adc128s052" or "ti,adc122s021"
> + - compatible: Should be "ti,adc128s052", "ti,adc122s021" or "ti,adc124s021"
>   - reg: spi chip select number for the device
>   - vref-supply: The regulator supply for ADC reference voltage
>  
> diff --git a/drivers/iio/adc/Kconfig b/drivers/iio/adc/Kconfig
> index 7868c74..351bd11 100644
> --- a/drivers/iio/adc/Kconfig
> +++ b/drivers/iio/adc/Kconfig
> @@ -324,11 +324,11 @@ config TI_ADC081C
>  	  called ti-adc081c.
>  
>  config TI_ADC128S052
> -	tristate "Texas Instruments ADC128S052/ADC122S021"
> +	tristate "Texas Instruments ADC128S052/ADC122S021/ADC124S021"
>  	depends on SPI
>  	help
> -	  If you say yes here you get support for Texas Instruments ADC128S052
> -	  and ADC122S021 chips.
> +	  If you say yes here you get support for Texas Instruments ADC128S052,
> +	  ADC122S021 and ADC124S021 chips.
>  
>  	  This driver can also be built as a module. If so, the module will be
>  	  called ti-adc128s052.
> diff --git a/drivers/iio/adc/ti-adc128s052.c b/drivers/iio/adc/ti-adc128s052.c
> index ff6f7f6..bc58867 100644
> --- a/drivers/iio/adc/ti-adc128s052.c
> +++ b/drivers/iio/adc/ti-adc128s052.c
> @@ -1,10 +1,11 @@
>  /*
>   * Copyright (C) 2014 Angelo Compagnucci <angelo.compagnucci@gmail.com>
>   *
> - * Driver for Texas Instruments' ADC128S052 and ADC122S021 ADC chip.
> + * Driver for Texas Instruments' ADC128S052, ADC122S021 and ADC124S021 ADC chip.
>   * Datasheets can be found here:
>   * http://www.ti.com/lit/ds/symlink/adc128s052.pdf
>   * http://www.ti.com/lit/ds/symlink/adc122s021.pdf
> + * http://www.ti.com/lit/ds/symlink/adc124s021.pdf
>   *
>   * This program is free software; you can redistribute it and/or modify
>   * it under the terms of the GNU General Public License version 2 as
> @@ -114,9 +115,17 @@ static const struct iio_chan_spec adc122s021_channels[] = {
>  	ADC128_VOLTAGE_CHANNEL(1),
>  };
>  
> +static const struct iio_chan_spec adc124s021_channels[] = {
> +	ADC128_VOLTAGE_CHANNEL(0),
> +	ADC128_VOLTAGE_CHANNEL(1),
> +	ADC128_VOLTAGE_CHANNEL(2),
> +	ADC128_VOLTAGE_CHANNEL(3),
> +};
> +
>  static const struct adc128_configuration adc128_config[] = {
>  	{ adc128s052_channels, ARRAY_SIZE(adc128s052_channels) },
>  	{ adc122s021_channels, ARRAY_SIZE(adc122s021_channels) },
> +	{ adc124s021_channels, ARRAY_SIZE(adc124s021_channels) },
>  };
>  
>  static const struct iio_info adc128_info = {
> @@ -177,6 +186,7 @@ static int adc128_remove(struct spi_device *spi)
>  static const struct of_device_id adc128_of_match[] = {
>  	{ .compatible = "ti,adc128s052", },
>  	{ .compatible = "ti,adc122s021", },
> +	{ .compatible = "ti,adc124s021", },
>  	{ /* sentinel */ },
>  };
>  MODULE_DEVICE_TABLE(of, adc128_of_match);
> @@ -184,6 +194,7 @@ MODULE_DEVICE_TABLE(of, adc128_of_match);
>  static const struct spi_device_id adc128_id[] = {
>  	{ "adc128s052", 0},	/* index into adc128_config */
>  	{ "adc122s021",	1},
> +	{ "adc124s021", 2},
>  	{ }
>  };
>  MODULE_DEVICE_TABLE(spi, adc128_id);
> 


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

* Re: [PATCH 1/1] iio:adc128s052: add support for adc124s021
  2015-12-11 11:50   ` Martin Kepplinger
@ 2015-12-12 12:10     ` Jonathan Cameron
  0 siblings, 0 replies; 4+ messages in thread
From: Jonathan Cameron @ 2015-12-12 12:10 UTC (permalink / raw)
  To: Martin Kepplinger, Oliver Stäbler, angelo.compagnucci
  Cc: linux-kernel, linux-iio

On 11/12/15 11:50, Martin Kepplinger wrote:
> Am 2015-12-09 um 10:24 schrieb Oliver Stäbler:
>> Signed-off-by: Oliver Stäbler <oliver.staebler@bytesatwork.ch>
> 
> If the datasheet is publicly available, please link to it in the commit
> message, so people can easily verify this.
> 
> Seems ok though. Feel free to add
> Reviewed-by: Martin Kepplinger <martink@posteo.de>
> if you feel like it.
Applied to the togreg branch of iio.git - will be initially pushed out as testing
for the autobuilders to play with it.

Thanks,

Jonathan
> 
> thanks
>                          martin
> 
>> ---
>>  Documentation/devicetree/bindings/iio/adc/ti-adc128s052.txt |  4 ++--
>>  drivers/iio/adc/Kconfig                                     |  6 +++---
>>  drivers/iio/adc/ti-adc128s052.c                             | 13 ++++++++++++-
>>  3 files changed, 17 insertions(+), 6 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/iio/adc/ti-adc128s052.txt b/Documentation/devicetree/bindings/iio/adc/ti-adc128s052.txt
>> index 15ca6b4..daa2b2c 100644
>> --- a/Documentation/devicetree/bindings/iio/adc/ti-adc128s052.txt
>> +++ b/Documentation/devicetree/bindings/iio/adc/ti-adc128s052.txt
>> @@ -1,7 +1,7 @@
>> -* Texas Instruments' ADC128S052 and ADC122S021 ADC chip
>> +* Texas Instruments' ADC128S052, ADC122S021 and ADC124S021 ADC chip
>>  
>>  Required properties:
>> - - compatible: Should be "ti,adc128s052" or "ti,adc122s021"
>> + - compatible: Should be "ti,adc128s052", "ti,adc122s021" or "ti,adc124s021"
>>   - reg: spi chip select number for the device
>>   - vref-supply: The regulator supply for ADC reference voltage
>>  
>> diff --git a/drivers/iio/adc/Kconfig b/drivers/iio/adc/Kconfig
>> index 7868c74..351bd11 100644
>> --- a/drivers/iio/adc/Kconfig
>> +++ b/drivers/iio/adc/Kconfig
>> @@ -324,11 +324,11 @@ config TI_ADC081C
>>  	  called ti-adc081c.
>>  
>>  config TI_ADC128S052
>> -	tristate "Texas Instruments ADC128S052/ADC122S021"
>> +	tristate "Texas Instruments ADC128S052/ADC122S021/ADC124S021"
>>  	depends on SPI
>>  	help
>> -	  If you say yes here you get support for Texas Instruments ADC128S052
>> -	  and ADC122S021 chips.
>> +	  If you say yes here you get support for Texas Instruments ADC128S052,
>> +	  ADC122S021 and ADC124S021 chips.
>>  
>>  	  This driver can also be built as a module. If so, the module will be
>>  	  called ti-adc128s052.
>> diff --git a/drivers/iio/adc/ti-adc128s052.c b/drivers/iio/adc/ti-adc128s052.c
>> index ff6f7f6..bc58867 100644
>> --- a/drivers/iio/adc/ti-adc128s052.c
>> +++ b/drivers/iio/adc/ti-adc128s052.c
>> @@ -1,10 +1,11 @@
>>  /*
>>   * Copyright (C) 2014 Angelo Compagnucci <angelo.compagnucci@gmail.com>
>>   *
>> - * Driver for Texas Instruments' ADC128S052 and ADC122S021 ADC chip.
>> + * Driver for Texas Instruments' ADC128S052, ADC122S021 and ADC124S021 ADC chip.
>>   * Datasheets can be found here:
>>   * http://www.ti.com/lit/ds/symlink/adc128s052.pdf
>>   * http://www.ti.com/lit/ds/symlink/adc122s021.pdf
>> + * http://www.ti.com/lit/ds/symlink/adc124s021.pdf
>>   *
>>   * This program is free software; you can redistribute it and/or modify
>>   * it under the terms of the GNU General Public License version 2 as
>> @@ -114,9 +115,17 @@ static const struct iio_chan_spec adc122s021_channels[] = {
>>  	ADC128_VOLTAGE_CHANNEL(1),
>>  };
>>  
>> +static const struct iio_chan_spec adc124s021_channels[] = {
>> +	ADC128_VOLTAGE_CHANNEL(0),
>> +	ADC128_VOLTAGE_CHANNEL(1),
>> +	ADC128_VOLTAGE_CHANNEL(2),
>> +	ADC128_VOLTAGE_CHANNEL(3),
>> +};
>> +
>>  static const struct adc128_configuration adc128_config[] = {
>>  	{ adc128s052_channels, ARRAY_SIZE(adc128s052_channels) },
>>  	{ adc122s021_channels, ARRAY_SIZE(adc122s021_channels) },
>> +	{ adc124s021_channels, ARRAY_SIZE(adc124s021_channels) },
>>  };
>>  
>>  static const struct iio_info adc128_info = {
>> @@ -177,6 +186,7 @@ static int adc128_remove(struct spi_device *spi)
>>  static const struct of_device_id adc128_of_match[] = {
>>  	{ .compatible = "ti,adc128s052", },
>>  	{ .compatible = "ti,adc122s021", },
>> +	{ .compatible = "ti,adc124s021", },
>>  	{ /* sentinel */ },
>>  };
>>  MODULE_DEVICE_TABLE(of, adc128_of_match);
>> @@ -184,6 +194,7 @@ MODULE_DEVICE_TABLE(of, adc128_of_match);
>>  static const struct spi_device_id adc128_id[] = {
>>  	{ "adc128s052", 0},	/* index into adc128_config */
>>  	{ "adc122s021",	1},
>> +	{ "adc124s021", 2},
>>  	{ }
>>  };
>>  MODULE_DEVICE_TABLE(spi, adc128_id);
>>
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


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

end of thread, other threads:[~2015-12-12 12:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-09  9:24 [PATCH 0/1] iio:adc128s052: add support for adc124s021 Oliver Stäbler
2015-12-09  9:24 ` [PATCH 1/1] " Oliver Stäbler
2015-12-11 11:50   ` Martin Kepplinger
2015-12-12 12:10     ` Jonathan Cameron

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.