devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] dt-bindings: iio: ltc2632: expand for ltc2636 support
@ 2020-01-30 13:15 Uwe Kleine-König
  2020-01-30 13:15 ` [PATCH 2/3] iio: dac: ltc2632: drop some duplicated data Uwe Kleine-König
                   ` (4 more replies)
  0 siblings, 5 replies; 15+ messages in thread
From: Uwe Kleine-König @ 2020-01-30 13:15 UTC (permalink / raw)
  To: Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen,
	Peter Meerwald-Stadler
  Cc: Rob Herring, Mark Rutland, kernel, linux-iio, devicetree,
	Maxime Roussin-Belanger, Silvan Murer

The ltc2636 family of devices is register compatible with the ltc2636
chips, it just features 8 instead of 2 channels.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 Documentation/devicetree/bindings/iio/dac/ltc2632.txt | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/iio/dac/ltc2632.txt b/Documentation/devicetree/bindings/iio/dac/ltc2632.txt
index e0d5fea33031..9d114957a28b 100644
--- a/Documentation/devicetree/bindings/iio/dac/ltc2632.txt
+++ b/Documentation/devicetree/bindings/iio/dac/ltc2632.txt
@@ -1,4 +1,4 @@
-Linear Technology LTC2632 DAC device driver
+Linear Technology LTC2632/2636 DAC device driver
 
 Required properties:
  - compatible: Has to contain one of the following:
@@ -8,6 +8,12 @@ Required properties:
 	lltc,ltc2632-h12
 	lltc,ltc2632-h10
 	lltc,ltc2632-h8
+	lltc,ltc2636-l12
+	lltc,ltc2636-l10
+	lltc,ltc2636-l8
+	lltc,ltc2636-h12
+	lltc,ltc2636-h10
+	lltc,ltc2636-h8
 
 Property rules described in Documentation/devicetree/bindings/spi/spi-bus.txt
 apply. In particular, "reg" and "spi-max-frequency" properties must be given.
-- 
2.25.0


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

* [PATCH 2/3] iio: dac: ltc2632: drop some duplicated data
  2020-01-30 13:15 [PATCH 1/3] dt-bindings: iio: ltc2632: expand for ltc2636 support Uwe Kleine-König
@ 2020-01-30 13:15 ` Uwe Kleine-König
  2020-02-06 10:54   ` Jonathan Cameron
  2020-01-30 13:15 ` [PATCH 3/3] iio: dac: ltc2632: add support for LTC2636 family Uwe Kleine-König
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 15+ messages in thread
From: Uwe Kleine-König @ 2020-01-30 13:15 UTC (permalink / raw)
  To: Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen,
	Peter Meerwald-Stadler
  Cc: Rob Herring, Mark Rutland, kernel, linux-iio, devicetree,
	Maxime Roussin-Belanger, Silvan Murer

The channel data for ltc2632l12 and ltc2632h12 are identical. So there
is no gain in using two different (but identical) channel descriptions.
The only side effect of this change is some memory savings.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/iio/dac/ltc2632.c | 22 +++++++++-------------
 1 file changed, 9 insertions(+), 13 deletions(-)

diff --git a/drivers/iio/dac/ltc2632.c b/drivers/iio/dac/ltc2632.c
index 643d1ce956ce..7ab92e178496 100644
--- a/drivers/iio/dac/ltc2632.c
+++ b/drivers/iio/dac/ltc2632.c
@@ -192,37 +192,33 @@ static const struct iio_chan_spec_ext_info ltc2632_ext_info[] = {
 		LTC2632_CHANNEL(1, _bits), \
 	}
 
-static DECLARE_LTC2632_CHANNELS(ltc2632l12, 12);
-static DECLARE_LTC2632_CHANNELS(ltc2632l10, 10);
-static DECLARE_LTC2632_CHANNELS(ltc2632l8, 8);
-
-static DECLARE_LTC2632_CHANNELS(ltc2632h12, 12);
-static DECLARE_LTC2632_CHANNELS(ltc2632h10, 10);
-static DECLARE_LTC2632_CHANNELS(ltc2632h8, 8);
+static DECLARE_LTC2632_CHANNELS(ltc2632x12, 12);
+static DECLARE_LTC2632_CHANNELS(ltc2632x10, 10);
+static DECLARE_LTC2632_CHANNELS(ltc2632x8, 8);
 
 static const struct ltc2632_chip_info ltc2632_chip_info_tbl[] = {
 	[ID_LTC2632L12] = {
-		.channels	= ltc2632l12_channels,
+		.channels	= ltc2632x12_channels,
 		.vref_mv	= 2500,
 	},
 	[ID_LTC2632L10] = {
-		.channels	= ltc2632l10_channels,
+		.channels	= ltc2632x10_channels,
 		.vref_mv	= 2500,
 	},
 	[ID_LTC2632L8] =  {
-		.channels	= ltc2632l8_channels,
+		.channels	= ltc2632x8_channels,
 		.vref_mv	= 2500,
 	},
 	[ID_LTC2632H12] = {
-		.channels	= ltc2632h12_channels,
+		.channels	= ltc2632x12_channels,
 		.vref_mv	= 4096,
 	},
 	[ID_LTC2632H10] = {
-		.channels	= ltc2632h10_channels,
+		.channels	= ltc2632x10_channels,
 		.vref_mv	= 4096,
 	},
 	[ID_LTC2632H8] =  {
-		.channels	= ltc2632h8_channels,
+		.channels	= ltc2632x8_channels,
 		.vref_mv	= 4096,
 	},
 };
-- 
2.25.0


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

* [PATCH 3/3] iio: dac: ltc2632: add support for LTC2636 family
  2020-01-30 13:15 [PATCH 1/3] dt-bindings: iio: ltc2632: expand for ltc2636 support Uwe Kleine-König
  2020-01-30 13:15 ` [PATCH 2/3] iio: dac: ltc2632: drop some duplicated data Uwe Kleine-König
@ 2020-01-30 13:15 ` Uwe Kleine-König
  2020-02-02  9:54   ` Jonathan Cameron
  2020-02-02  9:52 ` [PATCH 1/3] dt-bindings: iio: ltc2632: expand for ltc2636 support Jonathan Cameron
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 15+ messages in thread
From: Uwe Kleine-König @ 2020-01-30 13:15 UTC (permalink / raw)
  To: Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen,
	Peter Meerwald-Stadler
  Cc: Rob Herring, Mark Rutland, kernel, linux-iio, devicetree,
	Maxime Roussin-Belanger, Silvan Murer

The only difference between LTC2632 and LTC2636 is that the former has
two DAC channels while the latter has eight.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/iio/dac/Kconfig   |  5 ++-
 drivers/iio/dac/ltc2632.c | 77 +++++++++++++++++++++++++++++++++++++--
 2 files changed, 77 insertions(+), 5 deletions(-)

diff --git a/drivers/iio/dac/Kconfig b/drivers/iio/dac/Kconfig
index cc42219a64f7..33a35ebe4fed 100644
--- a/drivers/iio/dac/Kconfig
+++ b/drivers/iio/dac/Kconfig
@@ -132,11 +132,12 @@ config LTC1660
 	  module will be called ltc1660.
 
 config LTC2632
-	tristate "Linear Technology LTC2632-12/10/8 DAC spi driver"
+	tristate "Linear Technology LTC2632-12/10/8 and LTC2636-12/10/8 DAC spi driver"
 	depends on SPI
 	help
 	  Say yes here to build support for Linear Technology
-	  LTC2632-12, LTC2632-10, LTC2632-8 converters (DAC).
+	  LTC2632-12, LTC2632-10, LTC2632-8, LTC2636-12, LTC2636-10 and
+	  LTC2636-8 converters (DAC).
 
 	  To compile this driver as a module, choose M here: the
 	  module will be called ltc2632.
diff --git a/drivers/iio/dac/ltc2632.c b/drivers/iio/dac/ltc2632.c
index 7ab92e178496..1e7ffa0f6071 100644
--- a/drivers/iio/dac/ltc2632.c
+++ b/drivers/iio/dac/ltc2632.c
@@ -12,8 +12,6 @@
 #include <linux/iio/iio.h>
 #include <linux/regulator/consumer.h>
 
-#define LTC2632_DAC_CHANNELS                    2
-
 #define LTC2632_ADDR_DAC0                       0x0
 #define LTC2632_ADDR_DAC1                       0x1
 
@@ -33,6 +31,7 @@
  */
 struct ltc2632_chip_info {
 	const struct iio_chan_spec *channels;
+	const size_t num_channels;
 	const int vref_mv;
 };
 
@@ -57,6 +56,12 @@ enum ltc2632_supported_device_ids {
 	ID_LTC2632H12,
 	ID_LTC2632H10,
 	ID_LTC2632H8,
+	ID_LTC2636L12,
+	ID_LTC2636L10,
+	ID_LTC2636L8,
+	ID_LTC2636H12,
+	ID_LTC2636H10,
+	ID_LTC2636H8,
 };
 
 static int ltc2632_spi_write(struct spi_device *spi,
@@ -190,6 +195,12 @@ static const struct iio_chan_spec_ext_info ltc2632_ext_info[] = {
 	const struct iio_chan_spec _name ## _channels[] = { \
 		LTC2632_CHANNEL(0, _bits), \
 		LTC2632_CHANNEL(1, _bits), \
+		LTC2632_CHANNEL(2, _bits), \
+		LTC2632_CHANNEL(3, _bits), \
+		LTC2632_CHANNEL(4, _bits), \
+		LTC2632_CHANNEL(5, _bits), \
+		LTC2632_CHANNEL(6, _bits), \
+		LTC2632_CHANNEL(7, _bits), \
 	}
 
 static DECLARE_LTC2632_CHANNELS(ltc2632x12, 12);
@@ -199,26 +210,62 @@ static DECLARE_LTC2632_CHANNELS(ltc2632x8, 8);
 static const struct ltc2632_chip_info ltc2632_chip_info_tbl[] = {
 	[ID_LTC2632L12] = {
 		.channels	= ltc2632x12_channels,
+		.num_channels	= 2,
 		.vref_mv	= 2500,
 	},
 	[ID_LTC2632L10] = {
 		.channels	= ltc2632x10_channels,
+		.num_channels	= 2,
 		.vref_mv	= 2500,
 	},
 	[ID_LTC2632L8] =  {
 		.channels	= ltc2632x8_channels,
+		.num_channels	= 2,
 		.vref_mv	= 2500,
 	},
 	[ID_LTC2632H12] = {
 		.channels	= ltc2632x12_channels,
+		.num_channels	= 2,
 		.vref_mv	= 4096,
 	},
 	[ID_LTC2632H10] = {
 		.channels	= ltc2632x10_channels,
+		.num_channels	= 2,
 		.vref_mv	= 4096,
 	},
 	[ID_LTC2632H8] =  {
 		.channels	= ltc2632x8_channels,
+		.num_channels	= 2,
+		.vref_mv	= 4096,
+	},
+	[ID_LTC2636L12] = {
+		.channels	= ltc2632x12_channels,
+		.num_channels	= 8,
+		.vref_mv	= 2500,
+	},
+	[ID_LTC2636L10] = {
+		.channels	= ltc2632x10_channels,
+		.num_channels	= 8,
+		.vref_mv	= 2500,
+	},
+	[ID_LTC2636L8] =  {
+		.channels	= ltc2632x8_channels,
+		.num_channels	= 8,
+		.vref_mv	= 2500,
+	},
+	[ID_LTC2636H12] = {
+		.channels	= ltc2632x12_channels,
+		.num_channels	= 8,
+		.vref_mv	= 4096,
+	},
+	[ID_LTC2636H10] = {
+		.channels	= ltc2632x10_channels,
+		.num_channels	= 8,
+		.vref_mv	= 4096,
+	},
+	[ID_LTC2636H8] =  {
+		.channels	= ltc2632x8_channels,
+		.num_channels	= 8,
 		.vref_mv	= 4096,
 	},
 };
@@ -287,7 +334,7 @@ static int ltc2632_probe(struct spi_device *spi)
 	indio_dev->info = &ltc2632_info;
 	indio_dev->modes = INDIO_DIRECT_MODE;
 	indio_dev->channels = chip_info->channels;
-	indio_dev->num_channels = LTC2632_DAC_CHANNELS;
+	indio_dev->num_channels = chip_info->num_channels;
 
 	return iio_device_register(indio_dev);
 }
@@ -312,6 +359,12 @@ static const struct spi_device_id ltc2632_id[] = {
 	{ "ltc2632-h12", (kernel_ulong_t)&ltc2632_chip_info_tbl[ID_LTC2632H12] },
 	{ "ltc2632-h10", (kernel_ulong_t)&ltc2632_chip_info_tbl[ID_LTC2632H10] },
 	{ "ltc2632-h8", (kernel_ulong_t)&ltc2632_chip_info_tbl[ID_LTC2632H8] },
+	{ "ltc2636-l12", (kernel_ulong_t)&ltc2632_chip_info_tbl[ID_LTC2636L12] },
+	{ "ltc2636-l10", (kernel_ulong_t)&ltc2632_chip_info_tbl[ID_LTC2636L10] },
+	{ "ltc2636-l8", (kernel_ulong_t)&ltc2632_chip_info_tbl[ID_LTC2636L8] },
+	{ "ltc2636-h12", (kernel_ulong_t)&ltc2632_chip_info_tbl[ID_LTC2636H12] },
+	{ "ltc2636-h10", (kernel_ulong_t)&ltc2632_chip_info_tbl[ID_LTC2636H10] },
+	{ "ltc2636-h8", (kernel_ulong_t)&ltc2632_chip_info_tbl[ID_LTC2636H8] },
 	{}
 };
 MODULE_DEVICE_TABLE(spi, ltc2632_id);
@@ -335,6 +388,24 @@ static const struct of_device_id ltc2632_of_match[] = {
 	}, {
 		.compatible = "lltc,ltc2632-h8",
 		.data = &ltc2632_chip_info_tbl[ID_LTC2632H8]
+	}, {
+		.compatible = "lltc,ltc2636-l12",
+		.data = &ltc2632_chip_info_tbl[ID_LTC2636L12]
+	}, {
+		.compatible = "lltc,ltc2636-l10",
+		.data = &ltc2632_chip_info_tbl[ID_LTC2636L10]
+	}, {
+		.compatible = "lltc,ltc2636-l8",
+		.data = &ltc2632_chip_info_tbl[ID_LTC2636L8]
+	}, {
+		.compatible = "lltc,ltc2636-h12",
+		.data = &ltc2632_chip_info_tbl[ID_LTC2636H12]
+	}, {
+		.compatible = "lltc,ltc2636-h10",
+		.data = &ltc2632_chip_info_tbl[ID_LTC2636H10]
+	}, {
+		.compatible = "lltc,ltc2636-h8",
+		.data = &ltc2632_chip_info_tbl[ID_LTC2636H8]
 	},
 	{}
 };
-- 
2.25.0


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

* Re: [PATCH 1/3] dt-bindings: iio: ltc2632: expand for ltc2636 support
  2020-01-30 13:15 [PATCH 1/3] dt-bindings: iio: ltc2632: expand for ltc2636 support Uwe Kleine-König
  2020-01-30 13:15 ` [PATCH 2/3] iio: dac: ltc2632: drop some duplicated data Uwe Kleine-König
  2020-01-30 13:15 ` [PATCH 3/3] iio: dac: ltc2632: add support for LTC2636 family Uwe Kleine-König
@ 2020-02-02  9:52 ` Jonathan Cameron
  2020-02-06 10:42   ` Jonathan Cameron
  2020-02-03 20:31 ` [PATCH 4/3] iio: dac: ltc2632: remove some unused defines Uwe Kleine-König
  2020-02-06 18:11 ` [PATCH 1/3] dt-bindings: iio: ltc2632: expand for ltc2636 support Rob Herring
  4 siblings, 1 reply; 15+ messages in thread
From: Jonathan Cameron @ 2020-02-02  9:52 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald-Stadler,
	Rob Herring, Mark Rutland, kernel, linux-iio, devicetree,
	Maxime Roussin-Belanger, Silvan Murer

On Thu, 30 Jan 2020 14:15:47 +0100
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote:

> The ltc2636 family of devices is register compatible with the ltc2636
> chips, it just features 8 instead of 2 channels.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
>  Documentation/devicetree/bindings/iio/dac/ltc2632.txt | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/iio/dac/ltc2632.txt b/Documentation/devicetree/bindings/iio/dac/ltc2632.txt
> index e0d5fea33031..9d114957a28b 100644
> --- a/Documentation/devicetree/bindings/iio/dac/ltc2632.txt
> +++ b/Documentation/devicetree/bindings/iio/dac/ltc2632.txt
> @@ -1,4 +1,4 @@
> -Linear Technology LTC2632 DAC device driver
> +Linear Technology LTC2632/2636 DAC device driver

Whilst we are here, can we clear out the reference to 'driver'.
It's a binding so describes the hardware, not the driver talking
to it.

Linear Technology LTC... DAC

If that's all that comes up, I can tidy this up when applying.

Jonathan

>  
>  Required properties:
>   - compatible: Has to contain one of the following:
> @@ -8,6 +8,12 @@ Required properties:
>  	lltc,ltc2632-h12
>  	lltc,ltc2632-h10
>  	lltc,ltc2632-h8
> +	lltc,ltc2636-l12
> +	lltc,ltc2636-l10
> +	lltc,ltc2636-l8
> +	lltc,ltc2636-h12
> +	lltc,ltc2636-h10
> +	lltc,ltc2636-h8
>  
>  Property rules described in Documentation/devicetree/bindings/spi/spi-bus.txt
>  apply. In particular, "reg" and "spi-max-frequency" properties must be given.


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

* Re: [PATCH 3/3] iio: dac: ltc2632: add support for LTC2636 family
  2020-01-30 13:15 ` [PATCH 3/3] iio: dac: ltc2632: add support for LTC2636 family Uwe Kleine-König
@ 2020-02-02  9:54   ` Jonathan Cameron
  2020-02-06 10:54     ` Jonathan Cameron
  0 siblings, 1 reply; 15+ messages in thread
From: Jonathan Cameron @ 2020-02-02  9:54 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald-Stadler,
	Rob Herring, Mark Rutland, kernel, linux-iio, devicetree,
	Maxime Roussin-Belanger, Silvan Murer

On Thu, 30 Jan 2020 14:15:49 +0100
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote:

> The only difference between LTC2632 and LTC2636 is that the former has
> two DAC channels while the latter has eight.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Looks good to me. I'd like to give a little time for Maxime and Silvan
to have a look if they wish.

If I seem to have lost this in a few weeks, give me a poke!

Thanks,

Jonathan

> ---
>  drivers/iio/dac/Kconfig   |  5 ++-
>  drivers/iio/dac/ltc2632.c | 77 +++++++++++++++++++++++++++++++++++++--
>  2 files changed, 77 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/iio/dac/Kconfig b/drivers/iio/dac/Kconfig
> index cc42219a64f7..33a35ebe4fed 100644
> --- a/drivers/iio/dac/Kconfig
> +++ b/drivers/iio/dac/Kconfig
> @@ -132,11 +132,12 @@ config LTC1660
>  	  module will be called ltc1660.
>  
>  config LTC2632
> -	tristate "Linear Technology LTC2632-12/10/8 DAC spi driver"
> +	tristate "Linear Technology LTC2632-12/10/8 and LTC2636-12/10/8 DAC spi driver"
>  	depends on SPI
>  	help
>  	  Say yes here to build support for Linear Technology
> -	  LTC2632-12, LTC2632-10, LTC2632-8 converters (DAC).
> +	  LTC2632-12, LTC2632-10, LTC2632-8, LTC2636-12, LTC2636-10 and
> +	  LTC2636-8 converters (DAC).
>  
>  	  To compile this driver as a module, choose M here: the
>  	  module will be called ltc2632.
> diff --git a/drivers/iio/dac/ltc2632.c b/drivers/iio/dac/ltc2632.c
> index 7ab92e178496..1e7ffa0f6071 100644
> --- a/drivers/iio/dac/ltc2632.c
> +++ b/drivers/iio/dac/ltc2632.c
> @@ -12,8 +12,6 @@
>  #include <linux/iio/iio.h>
>  #include <linux/regulator/consumer.h>
>  
> -#define LTC2632_DAC_CHANNELS                    2
> -
>  #define LTC2632_ADDR_DAC0                       0x0
>  #define LTC2632_ADDR_DAC1                       0x1
>  
> @@ -33,6 +31,7 @@
>   */
>  struct ltc2632_chip_info {
>  	const struct iio_chan_spec *channels;
> +	const size_t num_channels;
>  	const int vref_mv;
>  };
>  
> @@ -57,6 +56,12 @@ enum ltc2632_supported_device_ids {
>  	ID_LTC2632H12,
>  	ID_LTC2632H10,
>  	ID_LTC2632H8,
> +	ID_LTC2636L12,
> +	ID_LTC2636L10,
> +	ID_LTC2636L8,
> +	ID_LTC2636H12,
> +	ID_LTC2636H10,
> +	ID_LTC2636H8,
>  };
>  
>  static int ltc2632_spi_write(struct spi_device *spi,
> @@ -190,6 +195,12 @@ static const struct iio_chan_spec_ext_info ltc2632_ext_info[] = {
>  	const struct iio_chan_spec _name ## _channels[] = { \
>  		LTC2632_CHANNEL(0, _bits), \
>  		LTC2632_CHANNEL(1, _bits), \
> +		LTC2632_CHANNEL(2, _bits), \
> +		LTC2632_CHANNEL(3, _bits), \
> +		LTC2632_CHANNEL(4, _bits), \
> +		LTC2632_CHANNEL(5, _bits), \
> +		LTC2632_CHANNEL(6, _bits), \
> +		LTC2632_CHANNEL(7, _bits), \
>  	}
>  
>  static DECLARE_LTC2632_CHANNELS(ltc2632x12, 12);
> @@ -199,26 +210,62 @@ static DECLARE_LTC2632_CHANNELS(ltc2632x8, 8);
>  static const struct ltc2632_chip_info ltc2632_chip_info_tbl[] = {
>  	[ID_LTC2632L12] = {
>  		.channels	= ltc2632x12_channels,
> +		.num_channels	= 2,
>  		.vref_mv	= 2500,
>  	},
>  	[ID_LTC2632L10] = {
>  		.channels	= ltc2632x10_channels,
> +		.num_channels	= 2,
>  		.vref_mv	= 2500,
>  	},
>  	[ID_LTC2632L8] =  {
>  		.channels	= ltc2632x8_channels,
> +		.num_channels	= 2,
>  		.vref_mv	= 2500,
>  	},
>  	[ID_LTC2632H12] = {
>  		.channels	= ltc2632x12_channels,
> +		.num_channels	= 2,
>  		.vref_mv	= 4096,
>  	},
>  	[ID_LTC2632H10] = {
>  		.channels	= ltc2632x10_channels,
> +		.num_channels	= 2,
>  		.vref_mv	= 4096,
>  	},
>  	[ID_LTC2632H8] =  {
>  		.channels	= ltc2632x8_channels,
> +		.num_channels	= 2,
> +		.vref_mv	= 4096,
> +	},
> +	[ID_LTC2636L12] = {
> +		.channels	= ltc2632x12_channels,
> +		.num_channels	= 8,
> +		.vref_mv	= 2500,
> +	},
> +	[ID_LTC2636L10] = {
> +		.channels	= ltc2632x10_channels,
> +		.num_channels	= 8,
> +		.vref_mv	= 2500,
> +	},
> +	[ID_LTC2636L8] =  {
> +		.channels	= ltc2632x8_channels,
> +		.num_channels	= 8,
> +		.vref_mv	= 2500,
> +	},
> +	[ID_LTC2636H12] = {
> +		.channels	= ltc2632x12_channels,
> +		.num_channels	= 8,
> +		.vref_mv	= 4096,
> +	},
> +	[ID_LTC2636H10] = {
> +		.channels	= ltc2632x10_channels,
> +		.num_channels	= 8,
> +		.vref_mv	= 4096,
> +	},
> +	[ID_LTC2636H8] =  {
> +		.channels	= ltc2632x8_channels,
> +		.num_channels	= 8,
>  		.vref_mv	= 4096,
>  	},
>  };
> @@ -287,7 +334,7 @@ static int ltc2632_probe(struct spi_device *spi)
>  	indio_dev->info = &ltc2632_info;
>  	indio_dev->modes = INDIO_DIRECT_MODE;
>  	indio_dev->channels = chip_info->channels;
> -	indio_dev->num_channels = LTC2632_DAC_CHANNELS;
> +	indio_dev->num_channels = chip_info->num_channels;
>  
>  	return iio_device_register(indio_dev);
>  }
> @@ -312,6 +359,12 @@ static const struct spi_device_id ltc2632_id[] = {
>  	{ "ltc2632-h12", (kernel_ulong_t)&ltc2632_chip_info_tbl[ID_LTC2632H12] },
>  	{ "ltc2632-h10", (kernel_ulong_t)&ltc2632_chip_info_tbl[ID_LTC2632H10] },
>  	{ "ltc2632-h8", (kernel_ulong_t)&ltc2632_chip_info_tbl[ID_LTC2632H8] },
> +	{ "ltc2636-l12", (kernel_ulong_t)&ltc2632_chip_info_tbl[ID_LTC2636L12] },
> +	{ "ltc2636-l10", (kernel_ulong_t)&ltc2632_chip_info_tbl[ID_LTC2636L10] },
> +	{ "ltc2636-l8", (kernel_ulong_t)&ltc2632_chip_info_tbl[ID_LTC2636L8] },
> +	{ "ltc2636-h12", (kernel_ulong_t)&ltc2632_chip_info_tbl[ID_LTC2636H12] },
> +	{ "ltc2636-h10", (kernel_ulong_t)&ltc2632_chip_info_tbl[ID_LTC2636H10] },
> +	{ "ltc2636-h8", (kernel_ulong_t)&ltc2632_chip_info_tbl[ID_LTC2636H8] },
>  	{}
>  };
>  MODULE_DEVICE_TABLE(spi, ltc2632_id);
> @@ -335,6 +388,24 @@ static const struct of_device_id ltc2632_of_match[] = {
>  	}, {
>  		.compatible = "lltc,ltc2632-h8",
>  		.data = &ltc2632_chip_info_tbl[ID_LTC2632H8]
> +	}, {
> +		.compatible = "lltc,ltc2636-l12",
> +		.data = &ltc2632_chip_info_tbl[ID_LTC2636L12]
> +	}, {
> +		.compatible = "lltc,ltc2636-l10",
> +		.data = &ltc2632_chip_info_tbl[ID_LTC2636L10]
> +	}, {
> +		.compatible = "lltc,ltc2636-l8",
> +		.data = &ltc2632_chip_info_tbl[ID_LTC2636L8]
> +	}, {
> +		.compatible = "lltc,ltc2636-h12",
> +		.data = &ltc2632_chip_info_tbl[ID_LTC2636H12]
> +	}, {
> +		.compatible = "lltc,ltc2636-h10",
> +		.data = &ltc2632_chip_info_tbl[ID_LTC2636H10]
> +	}, {
> +		.compatible = "lltc,ltc2636-h8",
> +		.data = &ltc2632_chip_info_tbl[ID_LTC2636H8]
>  	},
>  	{}
>  };


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

* [PATCH 4/3] iio: dac: ltc2632: remove some unused defines
  2020-01-30 13:15 [PATCH 1/3] dt-bindings: iio: ltc2632: expand for ltc2636 support Uwe Kleine-König
                   ` (2 preceding siblings ...)
  2020-02-02  9:52 ` [PATCH 1/3] dt-bindings: iio: ltc2632: expand for ltc2636 support Jonathan Cameron
@ 2020-02-03 20:31 ` Uwe Kleine-König
  2020-02-06 10:29   ` Jonathan Cameron
  2020-02-06 18:11 ` [PATCH 1/3] dt-bindings: iio: ltc2632: expand for ltc2636 support Rob Herring
  4 siblings, 1 reply; 15+ messages in thread
From: Uwe Kleine-König @ 2020-02-03 20:31 UTC (permalink / raw)
  To: Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen,
	Peter Meerwald-Stadler
  Cc: Mark Rutland, devicetree, Silvan Murer, linux-iio,
	Maxime Roussin-Belanger, Rob Herring, kernel

These two defines are unused since the driver was introduced in commit
02b829f9e11f ("iio: dac: Add support for ltc2632 DACs").

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/iio/dac/ltc2632.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/iio/dac/ltc2632.c b/drivers/iio/dac/ltc2632.c
index 1e7ffa0f6071..7adc91056aa1 100644
--- a/drivers/iio/dac/ltc2632.c
+++ b/drivers/iio/dac/ltc2632.c
@@ -12,9 +12,6 @@
 #include <linux/iio/iio.h>
 #include <linux/regulator/consumer.h>
 
-#define LTC2632_ADDR_DAC0                       0x0
-#define LTC2632_ADDR_DAC1                       0x1
-
 #define LTC2632_CMD_WRITE_INPUT_N               0x0
 #define LTC2632_CMD_UPDATE_DAC_N                0x1
 #define LTC2632_CMD_WRITE_INPUT_N_UPDATE_ALL    0x2
-- 
2.25.0


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

* Re: [PATCH 4/3] iio: dac: ltc2632: remove some unused defines
  2020-02-03 20:31 ` [PATCH 4/3] iio: dac: ltc2632: remove some unused defines Uwe Kleine-König
@ 2020-02-06 10:29   ` Jonathan Cameron
  2020-02-06 10:34     ` Uwe Kleine-König
  0 siblings, 1 reply; 15+ messages in thread
From: Jonathan Cameron @ 2020-02-06 10:29 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald-Stadler,
	Mark Rutland, devicetree, Silvan Murer, linux-iio,
	Maxime Roussin-Belanger, Rob Herring, kernel

On Mon,  3 Feb 2020 21:31:26 +0100
Uwe Kleine-König         <u.kleine-koenig@pengutronix.de> wrote:

> These two defines are unused since the driver was introduced in commit
> 02b829f9e11f ("iio: dac: Add support for ltc2632 DACs").
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
A bit of fuzz and the mysterious bit of this being patch 4 of 3 aside all good.

Applied to the togreg branch of iio.git and pushed out as testing.

Thanks,

Jonathan

> ---
>  drivers/iio/dac/ltc2632.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/iio/dac/ltc2632.c b/drivers/iio/dac/ltc2632.c
> index 1e7ffa0f6071..7adc91056aa1 100644
> --- a/drivers/iio/dac/ltc2632.c
> +++ b/drivers/iio/dac/ltc2632.c
> @@ -12,9 +12,6 @@
>  #include <linux/iio/iio.h>
>  #include <linux/regulator/consumer.h>
>  
> -#define LTC2632_ADDR_DAC0                       0x0
> -#define LTC2632_ADDR_DAC1                       0x1
> -
>  #define LTC2632_CMD_WRITE_INPUT_N               0x0
>  #define LTC2632_CMD_UPDATE_DAC_N                0x1
>  #define LTC2632_CMD_WRITE_INPUT_N_UPDATE_ALL    0x2


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

* Re: [PATCH 4/3] iio: dac: ltc2632: remove some unused defines
  2020-02-06 10:29   ` Jonathan Cameron
@ 2020-02-06 10:34     ` Uwe Kleine-König
  2020-02-06 10:44       ` Jonathan Cameron
  0 siblings, 1 reply; 15+ messages in thread
From: Uwe Kleine-König @ 2020-02-06 10:34 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Mark Rutland, devicetree, Lars-Peter Clausen, Silvan Murer,
	linux-iio, Maxime Roussin-Belanger, Rob Herring,
	Peter Meerwald-Stadler, Hartmut Knaack, kernel

On Thu, Feb 06, 2020 at 10:29:15AM +0000, Jonathan Cameron wrote:
> On Mon,  3 Feb 2020 21:31:26 +0100
> Uwe Kleine-König         <u.kleine-koenig@pengutronix.de> wrote:
> 
> > These two defines are unused since the driver was introduced in commit
> > 02b829f9e11f ("iio: dac: Add support for ltc2632 DACs").
> > 
> > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> A bit of fuzz and the mysterious bit of this being patch 4 of 3 aside all good.
> 
> Applied to the togreg branch of iio.git and pushed out as testing.

If you applied patches 2 and 3 of the series before, the fuzz should
disappear. I assume the threading didn't work as intended for you and
you don't have the original patch series grouped with my patch 4/3?

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

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

* Re: [PATCH 1/3] dt-bindings: iio: ltc2632: expand for ltc2636 support
  2020-02-02  9:52 ` [PATCH 1/3] dt-bindings: iio: ltc2632: expand for ltc2636 support Jonathan Cameron
@ 2020-02-06 10:42   ` Jonathan Cameron
  0 siblings, 0 replies; 15+ messages in thread
From: Jonathan Cameron @ 2020-02-06 10:42 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald-Stadler,
	Rob Herring, Mark Rutland, kernel, linux-iio, devicetree,
	Maxime Roussin-Belanger, Silvan Murer

On Sun, 2 Feb 2020 09:52:07 +0000
Jonathan Cameron <jic23@kernel.org> wrote:

> On Thu, 30 Jan 2020 14:15:47 +0100
> Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote:
> 
> > The ltc2636 family of devices is register compatible with the ltc2636
> > chips, it just features 8 instead of 2 channels.
> > 
> > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > ---
> >  Documentation/devicetree/bindings/iio/dac/ltc2632.txt | 8 +++++++-
> >  1 file changed, 7 insertions(+), 1 deletion(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/iio/dac/ltc2632.txt b/Documentation/devicetree/bindings/iio/dac/ltc2632.txt
> > index e0d5fea33031..9d114957a28b 100644
> > --- a/Documentation/devicetree/bindings/iio/dac/ltc2632.txt
> > +++ b/Documentation/devicetree/bindings/iio/dac/ltc2632.txt
> > @@ -1,4 +1,4 @@
> > -Linear Technology LTC2632 DAC device driver
> > +Linear Technology LTC2632/2636 DAC device driver  
> 
> Whilst we are here, can we clear out the reference to 'driver'.
> It's a binding so describes the hardware, not the driver talking
> to it.
> 
> Linear Technology LTC... DAC
> 
> If that's all that comes up, I can tidy this up when applying.

Applied.

Thanks,
> 
> Jonathan
> 
> >  
> >  Required properties:
> >   - compatible: Has to contain one of the following:
> > @@ -8,6 +8,12 @@ Required properties:
> >  	lltc,ltc2632-h12
> >  	lltc,ltc2632-h10
> >  	lltc,ltc2632-h8
> > +	lltc,ltc2636-l12
> > +	lltc,ltc2636-l10
> > +	lltc,ltc2636-l8
> > +	lltc,ltc2636-h12
> > +	lltc,ltc2636-h10
> > +	lltc,ltc2636-h8
> >  
> >  Property rules described in Documentation/devicetree/bindings/spi/spi-bus.txt
> >  apply. In particular, "reg" and "spi-max-frequency" properties must be given.  
> 


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

* Re: [PATCH 4/3] iio: dac: ltc2632: remove some unused defines
  2020-02-06 10:34     ` Uwe Kleine-König
@ 2020-02-06 10:44       ` Jonathan Cameron
  2020-02-25  9:32         ` Uwe Kleine-König
  0 siblings, 1 reply; 15+ messages in thread
From: Jonathan Cameron @ 2020-02-06 10:44 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Mark Rutland, devicetree, Lars-Peter Clausen, Silvan Murer,
	linux-iio, Maxime Roussin-Belanger, Rob Herring,
	Peter Meerwald-Stadler, Hartmut Knaack, kernel

On Thu, 6 Feb 2020 11:34:43 +0100
Uwe Kleine-König         <u.kleine-koenig@pengutronix.de> wrote:

> On Thu, Feb 06, 2020 at 10:29:15AM +0000, Jonathan Cameron wrote:
> > On Mon,  3 Feb 2020 21:31:26 +0100
> > Uwe Kleine-König         <u.kleine-koenig@pengutronix.de> wrote:
> >   
> > > These two defines are unused since the driver was introduced in commit
> > > 02b829f9e11f ("iio: dac: Add support for ltc2632 DACs").
> > > 
> > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>  
> > A bit of fuzz and the mysterious bit of this being patch 4 of 3 aside all good.
> > 
> > Applied to the togreg branch of iio.git and pushed out as testing.  
> 
> If you applied patches 2 and 3 of the series before, the fuzz should
> disappear. I assume the threading didn't work as intended for you and
> you don't have the original patch series grouped with my patch 4/3?
Yup.  Just realised that after sending :)  

I'll apply them in the right order.

Jonathan

> 
> Best regards
> Uwe
> 


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

* Re: [PATCH 2/3] iio: dac: ltc2632: drop some duplicated data
  2020-01-30 13:15 ` [PATCH 2/3] iio: dac: ltc2632: drop some duplicated data Uwe Kleine-König
@ 2020-02-06 10:54   ` Jonathan Cameron
  0 siblings, 0 replies; 15+ messages in thread
From: Jonathan Cameron @ 2020-02-06 10:54 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald-Stadler,
	Rob Herring, Mark Rutland, kernel, linux-iio, devicetree,
	Maxime Roussin-Belanger, Silvan Murer

On Thu, 30 Jan 2020 14:15:48 +0100
Uwe Kleine-König         <u.kleine-koenig@pengutronix.de> wrote:

> The channel data for ltc2632l12 and ltc2632h12 are identical. So there
> is no gain in using two different (but identical) channel descriptions.
> The only side effect of this change is some memory savings.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Applied.
> ---
>  drivers/iio/dac/ltc2632.c | 22 +++++++++-------------
>  1 file changed, 9 insertions(+), 13 deletions(-)
> 
> diff --git a/drivers/iio/dac/ltc2632.c b/drivers/iio/dac/ltc2632.c
> index 643d1ce956ce..7ab92e178496 100644
> --- a/drivers/iio/dac/ltc2632.c
> +++ b/drivers/iio/dac/ltc2632.c
> @@ -192,37 +192,33 @@ static const struct iio_chan_spec_ext_info ltc2632_ext_info[] = {
>  		LTC2632_CHANNEL(1, _bits), \
>  	}
>  
> -static DECLARE_LTC2632_CHANNELS(ltc2632l12, 12);
> -static DECLARE_LTC2632_CHANNELS(ltc2632l10, 10);
> -static DECLARE_LTC2632_CHANNELS(ltc2632l8, 8);
> -
> -static DECLARE_LTC2632_CHANNELS(ltc2632h12, 12);
> -static DECLARE_LTC2632_CHANNELS(ltc2632h10, 10);
> -static DECLARE_LTC2632_CHANNELS(ltc2632h8, 8);
> +static DECLARE_LTC2632_CHANNELS(ltc2632x12, 12);
> +static DECLARE_LTC2632_CHANNELS(ltc2632x10, 10);
> +static DECLARE_LTC2632_CHANNELS(ltc2632x8, 8);
>  
>  static const struct ltc2632_chip_info ltc2632_chip_info_tbl[] = {
>  	[ID_LTC2632L12] = {
> -		.channels	= ltc2632l12_channels,
> +		.channels	= ltc2632x12_channels,
>  		.vref_mv	= 2500,
>  	},
>  	[ID_LTC2632L10] = {
> -		.channels	= ltc2632l10_channels,
> +		.channels	= ltc2632x10_channels,
>  		.vref_mv	= 2500,
>  	},
>  	[ID_LTC2632L8] =  {
> -		.channels	= ltc2632l8_channels,
> +		.channels	= ltc2632x8_channels,
>  		.vref_mv	= 2500,
>  	},
>  	[ID_LTC2632H12] = {
> -		.channels	= ltc2632h12_channels,
> +		.channels	= ltc2632x12_channels,
>  		.vref_mv	= 4096,
>  	},
>  	[ID_LTC2632H10] = {
> -		.channels	= ltc2632h10_channels,
> +		.channels	= ltc2632x10_channels,
>  		.vref_mv	= 4096,
>  	},
>  	[ID_LTC2632H8] =  {
> -		.channels	= ltc2632h8_channels,
> +		.channels	= ltc2632x8_channels,
>  		.vref_mv	= 4096,
>  	},
>  };


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

* Re: [PATCH 3/3] iio: dac: ltc2632: add support for LTC2636 family
  2020-02-02  9:54   ` Jonathan Cameron
@ 2020-02-06 10:54     ` Jonathan Cameron
  0 siblings, 0 replies; 15+ messages in thread
From: Jonathan Cameron @ 2020-02-06 10:54 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald-Stadler,
	Rob Herring, Mark Rutland, kernel, linux-iio, devicetree,
	Maxime Roussin-Belanger, Silvan Murer

On Sun, 2 Feb 2020 09:54:28 +0000
Jonathan Cameron <jic23@kernel.org> wrote:

> On Thu, 30 Jan 2020 14:15:49 +0100
> Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote:
> 
> > The only difference between LTC2632 and LTC2636 is that the former has
> > two DAC channels while the latter has eight.
> > 
> > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>  
> Looks good to me. I'd like to give a little time for Maxime and Silvan
> to have a look if they wish.
> 
> If I seem to have lost this in a few weeks, give me a poke!

Applied thanks,

Jonathan

> 
> Thanks,
> 
> Jonathan
> 
> > ---
> >  drivers/iio/dac/Kconfig   |  5 ++-
> >  drivers/iio/dac/ltc2632.c | 77 +++++++++++++++++++++++++++++++++++++--
> >  2 files changed, 77 insertions(+), 5 deletions(-)
> > 
> > diff --git a/drivers/iio/dac/Kconfig b/drivers/iio/dac/Kconfig
> > index cc42219a64f7..33a35ebe4fed 100644
> > --- a/drivers/iio/dac/Kconfig
> > +++ b/drivers/iio/dac/Kconfig
> > @@ -132,11 +132,12 @@ config LTC1660
> >  	  module will be called ltc1660.
> >  
> >  config LTC2632
> > -	tristate "Linear Technology LTC2632-12/10/8 DAC spi driver"
> > +	tristate "Linear Technology LTC2632-12/10/8 and LTC2636-12/10/8 DAC spi driver"
> >  	depends on SPI
> >  	help
> >  	  Say yes here to build support for Linear Technology
> > -	  LTC2632-12, LTC2632-10, LTC2632-8 converters (DAC).
> > +	  LTC2632-12, LTC2632-10, LTC2632-8, LTC2636-12, LTC2636-10 and
> > +	  LTC2636-8 converters (DAC).
> >  
> >  	  To compile this driver as a module, choose M here: the
> >  	  module will be called ltc2632.
> > diff --git a/drivers/iio/dac/ltc2632.c b/drivers/iio/dac/ltc2632.c
> > index 7ab92e178496..1e7ffa0f6071 100644
> > --- a/drivers/iio/dac/ltc2632.c
> > +++ b/drivers/iio/dac/ltc2632.c
> > @@ -12,8 +12,6 @@
> >  #include <linux/iio/iio.h>
> >  #include <linux/regulator/consumer.h>
> >  
> > -#define LTC2632_DAC_CHANNELS                    2
> > -
> >  #define LTC2632_ADDR_DAC0                       0x0
> >  #define LTC2632_ADDR_DAC1                       0x1
> >  
> > @@ -33,6 +31,7 @@
> >   */
> >  struct ltc2632_chip_info {
> >  	const struct iio_chan_spec *channels;
> > +	const size_t num_channels;
> >  	const int vref_mv;
> >  };
> >  
> > @@ -57,6 +56,12 @@ enum ltc2632_supported_device_ids {
> >  	ID_LTC2632H12,
> >  	ID_LTC2632H10,
> >  	ID_LTC2632H8,
> > +	ID_LTC2636L12,
> > +	ID_LTC2636L10,
> > +	ID_LTC2636L8,
> > +	ID_LTC2636H12,
> > +	ID_LTC2636H10,
> > +	ID_LTC2636H8,
> >  };
> >  
> >  static int ltc2632_spi_write(struct spi_device *spi,
> > @@ -190,6 +195,12 @@ static const struct iio_chan_spec_ext_info ltc2632_ext_info[] = {
> >  	const struct iio_chan_spec _name ## _channels[] = { \
> >  		LTC2632_CHANNEL(0, _bits), \
> >  		LTC2632_CHANNEL(1, _bits), \
> > +		LTC2632_CHANNEL(2, _bits), \
> > +		LTC2632_CHANNEL(3, _bits), \
> > +		LTC2632_CHANNEL(4, _bits), \
> > +		LTC2632_CHANNEL(5, _bits), \
> > +		LTC2632_CHANNEL(6, _bits), \
> > +		LTC2632_CHANNEL(7, _bits), \
> >  	}
> >  
> >  static DECLARE_LTC2632_CHANNELS(ltc2632x12, 12);
> > @@ -199,26 +210,62 @@ static DECLARE_LTC2632_CHANNELS(ltc2632x8, 8);
> >  static const struct ltc2632_chip_info ltc2632_chip_info_tbl[] = {
> >  	[ID_LTC2632L12] = {
> >  		.channels	= ltc2632x12_channels,
> > +		.num_channels	= 2,
> >  		.vref_mv	= 2500,
> >  	},
> >  	[ID_LTC2632L10] = {
> >  		.channels	= ltc2632x10_channels,
> > +		.num_channels	= 2,
> >  		.vref_mv	= 2500,
> >  	},
> >  	[ID_LTC2632L8] =  {
> >  		.channels	= ltc2632x8_channels,
> > +		.num_channels	= 2,
> >  		.vref_mv	= 2500,
> >  	},
> >  	[ID_LTC2632H12] = {
> >  		.channels	= ltc2632x12_channels,
> > +		.num_channels	= 2,
> >  		.vref_mv	= 4096,
> >  	},
> >  	[ID_LTC2632H10] = {
> >  		.channels	= ltc2632x10_channels,
> > +		.num_channels	= 2,
> >  		.vref_mv	= 4096,
> >  	},
> >  	[ID_LTC2632H8] =  {
> >  		.channels	= ltc2632x8_channels,
> > +		.num_channels	= 2,
> > +		.vref_mv	= 4096,
> > +	},
> > +	[ID_LTC2636L12] = {
> > +		.channels	= ltc2632x12_channels,
> > +		.num_channels	= 8,
> > +		.vref_mv	= 2500,
> > +	},
> > +	[ID_LTC2636L10] = {
> > +		.channels	= ltc2632x10_channels,
> > +		.num_channels	= 8,
> > +		.vref_mv	= 2500,
> > +	},
> > +	[ID_LTC2636L8] =  {
> > +		.channels	= ltc2632x8_channels,
> > +		.num_channels	= 8,
> > +		.vref_mv	= 2500,
> > +	},
> > +	[ID_LTC2636H12] = {
> > +		.channels	= ltc2632x12_channels,
> > +		.num_channels	= 8,
> > +		.vref_mv	= 4096,
> > +	},
> > +	[ID_LTC2636H10] = {
> > +		.channels	= ltc2632x10_channels,
> > +		.num_channels	= 8,
> > +		.vref_mv	= 4096,
> > +	},
> > +	[ID_LTC2636H8] =  {
> > +		.channels	= ltc2632x8_channels,
> > +		.num_channels	= 8,
> >  		.vref_mv	= 4096,
> >  	},
> >  };
> > @@ -287,7 +334,7 @@ static int ltc2632_probe(struct spi_device *spi)
> >  	indio_dev->info = &ltc2632_info;
> >  	indio_dev->modes = INDIO_DIRECT_MODE;
> >  	indio_dev->channels = chip_info->channels;
> > -	indio_dev->num_channels = LTC2632_DAC_CHANNELS;
> > +	indio_dev->num_channels = chip_info->num_channels;
> >  
> >  	return iio_device_register(indio_dev);
> >  }
> > @@ -312,6 +359,12 @@ static const struct spi_device_id ltc2632_id[] = {
> >  	{ "ltc2632-h12", (kernel_ulong_t)&ltc2632_chip_info_tbl[ID_LTC2632H12] },
> >  	{ "ltc2632-h10", (kernel_ulong_t)&ltc2632_chip_info_tbl[ID_LTC2632H10] },
> >  	{ "ltc2632-h8", (kernel_ulong_t)&ltc2632_chip_info_tbl[ID_LTC2632H8] },
> > +	{ "ltc2636-l12", (kernel_ulong_t)&ltc2632_chip_info_tbl[ID_LTC2636L12] },
> > +	{ "ltc2636-l10", (kernel_ulong_t)&ltc2632_chip_info_tbl[ID_LTC2636L10] },
> > +	{ "ltc2636-l8", (kernel_ulong_t)&ltc2632_chip_info_tbl[ID_LTC2636L8] },
> > +	{ "ltc2636-h12", (kernel_ulong_t)&ltc2632_chip_info_tbl[ID_LTC2636H12] },
> > +	{ "ltc2636-h10", (kernel_ulong_t)&ltc2632_chip_info_tbl[ID_LTC2636H10] },
> > +	{ "ltc2636-h8", (kernel_ulong_t)&ltc2632_chip_info_tbl[ID_LTC2636H8] },
> >  	{}
> >  };
> >  MODULE_DEVICE_TABLE(spi, ltc2632_id);
> > @@ -335,6 +388,24 @@ static const struct of_device_id ltc2632_of_match[] = {
> >  	}, {
> >  		.compatible = "lltc,ltc2632-h8",
> >  		.data = &ltc2632_chip_info_tbl[ID_LTC2632H8]
> > +	}, {
> > +		.compatible = "lltc,ltc2636-l12",
> > +		.data = &ltc2632_chip_info_tbl[ID_LTC2636L12]
> > +	}, {
> > +		.compatible = "lltc,ltc2636-l10",
> > +		.data = &ltc2632_chip_info_tbl[ID_LTC2636L10]
> > +	}, {
> > +		.compatible = "lltc,ltc2636-l8",
> > +		.data = &ltc2632_chip_info_tbl[ID_LTC2636L8]
> > +	}, {
> > +		.compatible = "lltc,ltc2636-h12",
> > +		.data = &ltc2632_chip_info_tbl[ID_LTC2636H12]
> > +	}, {
> > +		.compatible = "lltc,ltc2636-h10",
> > +		.data = &ltc2632_chip_info_tbl[ID_LTC2636H10]
> > +	}, {
> > +		.compatible = "lltc,ltc2636-h8",
> > +		.data = &ltc2632_chip_info_tbl[ID_LTC2636H8]
> >  	},
> >  	{}
> >  };  
> 


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

* Re: [PATCH 1/3] dt-bindings: iio: ltc2632: expand for ltc2636 support
  2020-01-30 13:15 [PATCH 1/3] dt-bindings: iio: ltc2632: expand for ltc2636 support Uwe Kleine-König
                   ` (3 preceding siblings ...)
  2020-02-03 20:31 ` [PATCH 4/3] iio: dac: ltc2632: remove some unused defines Uwe Kleine-König
@ 2020-02-06 18:11 ` Rob Herring
  4 siblings, 0 replies; 15+ messages in thread
From: Rob Herring @ 2020-02-06 18:11 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen,
	Peter Meerwald-Stadler, Mark Rutland, kernel, linux-iio,
	devicetree, Maxime Roussin-Belanger, Silvan Murer

On Thu, 30 Jan 2020 14:15:47 +0100, =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= wrote:
> The ltc2636 family of devices is register compatible with the ltc2636
> chips, it just features 8 instead of 2 channels.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
>  Documentation/devicetree/bindings/iio/dac/ltc2632.txt | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 

Acked-by: Rob Herring <robh@kernel.org>

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

* Re: [PATCH 4/3] iio: dac: ltc2632: remove some unused defines
  2020-02-06 10:44       ` Jonathan Cameron
@ 2020-02-25  9:32         ` Uwe Kleine-König
  2020-03-07 11:17           ` Jonathan Cameron
  0 siblings, 1 reply; 15+ messages in thread
From: Uwe Kleine-König @ 2020-02-25  9:32 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Mark Rutland, devicetree, Lars-Peter Clausen, Silvan Murer,
	linux-iio, Maxime Roussin-Belanger, Rob Herring,
	Peter Meerwald-Stadler, Hartmut Knaack, kernel

On Thu, Feb 06, 2020 at 10:44:18AM +0000, Jonathan Cameron wrote:
> On Thu, 6 Feb 2020 11:34:43 +0100
> Uwe Kleine-König         <u.kleine-koenig@pengutronix.de> wrote:
> 
> > On Thu, Feb 06, 2020 at 10:29:15AM +0000, Jonathan Cameron wrote:
> > > On Mon,  3 Feb 2020 21:31:26 +0100
> > > Uwe Kleine-König         <u.kleine-koenig@pengutronix.de> wrote:
> > >   
> > > > These two defines are unused since the driver was introduced in commit
> > > > 02b829f9e11f ("iio: dac: Add support for ltc2632 DACs").
> > > > 
> > > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>  
> > > A bit of fuzz and the mysterious bit of this being patch 4 of 3 aside all good.
> > > 
> > > Applied to the togreg branch of iio.git and pushed out as testing.  
> > 
> > If you applied patches 2 and 3 of the series before, the fuzz should
> > disappear. I assume the threading didn't work as intended for you and
> > you don't have the original patch series grouped with my patch 4/3?
> Yup.  Just realised that after sending :)  
> 
> I'll apply them in the right order.

Last time I already wondered why patches you applied don't appear in
next. This had something to do with the workflow how patches go from you
over Greg to Linus.

Given that next is different and in my experience it is possible to get
a tree into next even as a "second-level" maintainer, I wonder if adding
your tree would be beneficial. You applied the patch more than two weeks
ago and there is still no exposure to next. :-|

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

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

* Re: [PATCH 4/3] iio: dac: ltc2632: remove some unused defines
  2020-02-25  9:32         ` Uwe Kleine-König
@ 2020-03-07 11:17           ` Jonathan Cameron
  0 siblings, 0 replies; 15+ messages in thread
From: Jonathan Cameron @ 2020-03-07 11:17 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Mark Rutland, devicetree, Lars-Peter Clausen, Silvan Murer,
	linux-iio, Maxime Roussin-Belanger, Rob Herring,
	Peter Meerwald-Stadler, Hartmut Knaack, kernel

On Tue, 25 Feb 2020 10:32:59 +0100
Uwe Kleine-König         <u.kleine-koenig@pengutronix.de> wrote:

> On Thu, Feb 06, 2020 at 10:44:18AM +0000, Jonathan Cameron wrote:
> > On Thu, 6 Feb 2020 11:34:43 +0100
> > Uwe Kleine-König         <u.kleine-koenig@pengutronix.de> wrote:
> >   
> > > On Thu, Feb 06, 2020 at 10:29:15AM +0000, Jonathan Cameron wrote:  
> > > > On Mon,  3 Feb 2020 21:31:26 +0100
> > > > Uwe Kleine-König         <u.kleine-koenig@pengutronix.de> wrote:
> > > >     
> > > > > These two defines are unused since the driver was introduced in commit
> > > > > 02b829f9e11f ("iio: dac: Add support for ltc2632 DACs").
> > > > > 
> > > > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>    
> > > > A bit of fuzz and the mysterious bit of this being patch 4 of 3 aside all good.
> > > > 
> > > > Applied to the togreg branch of iio.git and pushed out as testing.    
> > > 
> > > If you applied patches 2 and 3 of the series before, the fuzz should
> > > disappear. I assume the threading didn't work as intended for you and
> > > you don't have the original patch series grouped with my patch 4/3?  
> > Yup.  Just realised that after sending :)  
> > 
> > I'll apply them in the right order.  
> 
> Last time I already wondered why patches you applied don't appear in
> next. This had something to do with the workflow how patches go from you
> over Greg to Linus.
> 
> Given that next is different and in my experience it is possible to get
> a tree into next even as a "second-level" maintainer, I wonder if adding
> your tree would be beneficial. You applied the patch more than two weeks
> ago and there is still no exposure to next. :-|

Ideally things would normally move quicker. I've been fighting off a
nasty and very persistent cold so running rather behind.

Agreed in theory it would make sense to take IIO directly into next,
but to do that the issue is that my availability can be rather intermittent
so I try to time pull requests to Greg for times when I can deal with any
fall out the over the next few days.  It's not uncommon for there to be
problems and I hate to annoy people by not being able to sort them in
a timely fashion.

Anyhow, I'll look at it again sometime soon.

Jonathan

> 
> Best regards
> Uwe
> 


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

end of thread, other threads:[~2020-03-07 11:18 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-30 13:15 [PATCH 1/3] dt-bindings: iio: ltc2632: expand for ltc2636 support Uwe Kleine-König
2020-01-30 13:15 ` [PATCH 2/3] iio: dac: ltc2632: drop some duplicated data Uwe Kleine-König
2020-02-06 10:54   ` Jonathan Cameron
2020-01-30 13:15 ` [PATCH 3/3] iio: dac: ltc2632: add support for LTC2636 family Uwe Kleine-König
2020-02-02  9:54   ` Jonathan Cameron
2020-02-06 10:54     ` Jonathan Cameron
2020-02-02  9:52 ` [PATCH 1/3] dt-bindings: iio: ltc2632: expand for ltc2636 support Jonathan Cameron
2020-02-06 10:42   ` Jonathan Cameron
2020-02-03 20:31 ` [PATCH 4/3] iio: dac: ltc2632: remove some unused defines Uwe Kleine-König
2020-02-06 10:29   ` Jonathan Cameron
2020-02-06 10:34     ` Uwe Kleine-König
2020-02-06 10:44       ` Jonathan Cameron
2020-02-25  9:32         ` Uwe Kleine-König
2020-03-07 11:17           ` Jonathan Cameron
2020-02-06 18:11 ` [PATCH 1/3] dt-bindings: iio: ltc2632: expand for ltc2636 support Rob Herring

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