Linux-IIO Archive on lore.kernel.org
 help / Atom feed
* [PATCH] iio: adc: mcp3422: fix of match table
@ 2019-05-07 19:45 Angelo Compagnucci
  2019-05-11  9:54 ` Jonathan Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: Angelo Compagnucci @ 2019-05-07 19:45 UTC (permalink / raw)
  To: linux-iio; +Cc: Angelo Compagnucci

In order to support all the chip variants in dts, compatible should
explicitly list all the variants and not only the base one.

Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>
---
 drivers/iio/adc/mcp3422.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/iio/adc/mcp3422.c b/drivers/iio/adc/mcp3422.c
index 63de705..91d6be3 100644
--- a/drivers/iio/adc/mcp3422.c
+++ b/drivers/iio/adc/mcp3422.c
@@ -410,7 +410,14 @@ MODULE_DEVICE_TABLE(i2c, mcp3422_id);
 
 #ifdef CONFIG_OF
 static const struct of_device_id mcp3422_of_match[] = {
+	{ .compatible = "mcp3421" },
 	{ .compatible = "mcp3422" },
+	{ .compatible = "mcp3423" },
+	{ .compatible = "mcp3424" },
+	{ .compatible = "mcp3425" },
+	{ .compatible = "mcp3426" },
+	{ .compatible = "mcp3427" },
+	{ .compatible = "mcp3428" },
 	{ }
 };
 MODULE_DEVICE_TABLE(of, mcp3422_of_match);
-- 
2.7.4


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

* Re: [PATCH] iio: adc: mcp3422: fix of match table
  2019-05-07 19:45 [PATCH] iio: adc: mcp3422: fix of match table Angelo Compagnucci
@ 2019-05-11  9:54 ` Jonathan Cameron
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2019-05-11  9:54 UTC (permalink / raw)
  To: Angelo Compagnucci; +Cc: linux-iio

On Tue,  7 May 2019 21:45:35 +0200
Angelo Compagnucci <angelo@amarulasolutions.com> wrote:

> In order to support all the chip variants in dts, compatible should
> explicitly list all the variants and not only the base one.
> 
> Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>
These should have a manufacturer prefix.

Note that the fallback path to the id_table will work anyway
for these devices so whilst it is good to tidy this up there
isn't any great urgency.

Jonathan

> ---
>  drivers/iio/adc/mcp3422.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/iio/adc/mcp3422.c b/drivers/iio/adc/mcp3422.c
> index 63de705..91d6be3 100644
> --- a/drivers/iio/adc/mcp3422.c
> +++ b/drivers/iio/adc/mcp3422.c
> @@ -410,7 +410,14 @@ MODULE_DEVICE_TABLE(i2c, mcp3422_id);
>  
>  #ifdef CONFIG_OF
>  static const struct of_device_id mcp3422_of_match[] = {
> +	{ .compatible = "mcp3421" },
>  	{ .compatible = "mcp3422" },
> +	{ .compatible = "mcp3423" },
> +	{ .compatible = "mcp3424" },
> +	{ .compatible = "mcp3425" },
> +	{ .compatible = "mcp3426" },
> +	{ .compatible = "mcp3427" },
> +	{ .compatible = "mcp3428" },
>  	{ }
>  };
>  MODULE_DEVICE_TABLE(of, mcp3422_of_match);


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

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-07 19:45 [PATCH] iio: adc: mcp3422: fix of match table Angelo Compagnucci
2019-05-11  9:54 ` Jonathan Cameron

Linux-IIO Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-iio/0 linux-iio/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-iio linux-iio/ https://lore.kernel.org/linux-iio \
		linux-iio@vger.kernel.org linux-iio@archiver.kernel.org
	public-inbox-index linux-iio


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-iio


AGPL code for this site: git clone https://public-inbox.org/ public-inbox