Linux IIO development
 help / color / mirror / Atom feed
* [PATCH] iio: cdc: ad7150: fix OF matching and publish module aliases
@ 2026-09-05 13:39 hpp.iscas
  2026-09-05 23:11 ` Jonathan Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: hpp.iscas @ 2026-09-05 13:39 UTC (permalink / raw)
  To: Nuno Sá
  Cc: hpp.iscas, Michael Hennerich, Jonathan Cameron, David Lechner,
	Andy Shevchenko, linux, linux-iio, linux-kernel

The positional initializers in ad7150_of_match populate the name member
of struct of_device_id, not compatible. Consequently the table does not
match the compatible properties documented for AD7150, AD7151 and AD7156.
The table is also absent from the module alias metadata.

Use designated compatible initializers and publish the corrected table.
Keep the existing I2C ID fallback and per-device driver data unchanged.

Fixes: 89f2d5b080bc ("staging:iio:cdc:ad7150: Add of_match_table")
Signed-off-by: hpp.iscas <hppiscas@163.com>
---
 drivers/iio/cdc/ad7150.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/iio/cdc/ad7150.c b/drivers/iio/cdc/ad7150.c
index 2f35c6d..b36ac4e 100644
--- a/drivers/iio/cdc/ad7150.c
+++ b/drivers/iio/cdc/ad7150.c
@@ -636,11 +636,13 @@ static const struct i2c_device_id ad7150_id[] = {
 MODULE_DEVICE_TABLE(i2c, ad7150_id);
 
 static const struct of_device_id ad7150_of_match[] = {
-	{ "adi,ad7150" },
-	{ "adi,ad7151" },
-	{ "adi,ad7156" },
+	{ .compatible = "adi,ad7150" },
+	{ .compatible = "adi,ad7151" },
+	{ .compatible = "adi,ad7156" },
 	{ }
 };
+MODULE_DEVICE_TABLE(of, ad7150_of_match);
+
 static struct i2c_driver ad7150_driver = {
 	.driver = {
 		.name = "ad7150",


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

* Re: [PATCH] iio: cdc: ad7150: fix OF matching and publish module aliases
  2026-09-05 13:39 [PATCH] iio: cdc: ad7150: fix OF matching and publish module aliases hpp.iscas
@ 2026-09-05 23:11 ` Jonathan Cameron
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2026-09-05 23:11 UTC (permalink / raw)
  To: hpp.iscas
  Cc: Nuno Sá, Michael Hennerich, David Lechner, Andy Shevchenko,
	linux, linux-iio, linux-kernel

On Sat,  5 Sep 2026 21:39:39 +0800
"hpp.iscas" <hppiscas@163.com> wrote:

> The positional initializers in ad7150_of_match populate the name member
> of struct of_device_id, not compatible. Consequently the table does not
> match the compatible properties documented for AD7150, AD7151 and AD7156.
> The table is also absent from the module alias metadata.
> 
> Use designated compatible initializers and publish the corrected table.
> Keep the existing I2C ID fallback and per-device driver data unchanged.
> 
> Fixes: 89f2d5b080bc ("staging:iio:cdc:ad7150: Add of_match_table")
> Signed-off-by: hpp.iscas <hppiscas@163.com>
Hi, 

We need a 'known' identifier for signed off. That basically means
real name or a name that you have used widely in other forums.
I did my usual test of putting hpp.iscas into google and seeing if 
anything looked like a person in the top few links.

As nothing does, I can't pick this up under the Developer Certificate
of Origin (look in docs if this not familiar to you) rules.

Please either provide me with some links as evidence this is a well
known identifier for you, or send a v2 with a name.

Patch itself is good.

thanks,

Jonathan


> ---
>  drivers/iio/cdc/ad7150.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/iio/cdc/ad7150.c b/drivers/iio/cdc/ad7150.c
> index 2f35c6d..b36ac4e 100644
> --- a/drivers/iio/cdc/ad7150.c
> +++ b/drivers/iio/cdc/ad7150.c
> @@ -636,11 +636,13 @@ static const struct i2c_device_id ad7150_id[] = {
>  MODULE_DEVICE_TABLE(i2c, ad7150_id);
>  
>  static const struct of_device_id ad7150_of_match[] = {
> -	{ "adi,ad7150" },
> -	{ "adi,ad7151" },
> -	{ "adi,ad7156" },
> +	{ .compatible = "adi,ad7150" },
> +	{ .compatible = "adi,ad7151" },
> +	{ .compatible = "adi,ad7156" },
>  	{ }
>  };
> +MODULE_DEVICE_TABLE(of, ad7150_of_match);
> +
>  static struct i2c_driver ad7150_driver = {
>  	.driver = {
>  		.name = "ad7150",
> 


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

end of thread, other threads:[~2026-09-05 23:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-05 13:39 [PATCH] iio: cdc: ad7150: fix OF matching and publish module aliases hpp.iscas
2026-09-05 23:11 ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox