public inbox for linux-hwmon@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] hwmon: (sht4x) Add device tree match table
@ 2021-11-21 16:07 David Mosberger-Tang
  2021-11-21 16:31 ` Guenter Roeck
  2021-11-30  2:20 ` Guenter Roeck
  0 siblings, 2 replies; 4+ messages in thread
From: David Mosberger-Tang @ 2021-11-21 16:07 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Navin Sankar Velliangiri, Jean Delvare, linux-hwmon, linux-kernel,
	David Mosberger-Tang

This patch enables automatic loading of the sht4x module via a device
tree table entry.

Signed-off-by: David Mosberger-Tang <davidm@egauge.net>
---
 drivers/hwmon/sht4x.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/hwmon/sht4x.c b/drivers/hwmon/sht4x.c
index 3415d7a0e0fc..6e53d81e32d4 100644
--- a/drivers/hwmon/sht4x.c
+++ b/drivers/hwmon/sht4x.c
@@ -281,9 +281,16 @@ static const struct i2c_device_id sht4x_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, sht4x_id);
 
+static const struct of_device_id sht4x_of_match[] = {
+	{ .compatible = "sensirion,sht4x" },
+	{ }
+};
+MODULE_DEVICE_TABLE(of, sht4x_of_match);
+
 static struct i2c_driver sht4x_driver = {
 	.driver = {
 		.name = "sht4x",
+		.of_match_table = sht4x_of_match
 	},
 	.probe		= sht4x_probe,
 	.id_table	= sht4x_id,
-- 
2.25.1


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

* Re: [PATCH] hwmon: (sht4x) Add device tree match table
  2021-11-21 16:07 [PATCH] hwmon: (sht4x) Add device tree match table David Mosberger-Tang
@ 2021-11-21 16:31 ` Guenter Roeck
  2021-11-21 16:46   ` David Mosberger-Tang
  2021-11-30  2:20 ` Guenter Roeck
  1 sibling, 1 reply; 4+ messages in thread
From: Guenter Roeck @ 2021-11-21 16:31 UTC (permalink / raw)
  To: David Mosberger-Tang
  Cc: Navin Sankar Velliangiri, Jean Delvare, linux-hwmon, linux-kernel

On Sun, Nov 21, 2021 at 04:07:02PM +0000, David Mosberger-Tang wrote:
> This patch enables automatic loading of the sht4x module via a device
> tree table entry.
> 
> Signed-off-by: David Mosberger-Tang <davidm@egauge.net>

I'll wait for the DT patch to be approved before applying.

Please send related patches as series in the future; this should have been
patch 2/2, with the DT patch as first patch.

Thanks,
Guenter

> ---
>  drivers/hwmon/sht4x.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/hwmon/sht4x.c b/drivers/hwmon/sht4x.c
> index 3415d7a0e0fc..6e53d81e32d4 100644
> --- a/drivers/hwmon/sht4x.c
> +++ b/drivers/hwmon/sht4x.c
> @@ -281,9 +281,16 @@ static const struct i2c_device_id sht4x_id[] = {
>  };
>  MODULE_DEVICE_TABLE(i2c, sht4x_id);
>  
> +static const struct of_device_id sht4x_of_match[] = {
> +	{ .compatible = "sensirion,sht4x" },
> +	{ }
> +};
> +MODULE_DEVICE_TABLE(of, sht4x_of_match);
> +
>  static struct i2c_driver sht4x_driver = {
>  	.driver = {
>  		.name = "sht4x",
> +		.of_match_table = sht4x_of_match
>  	},
>  	.probe		= sht4x_probe,
>  	.id_table	= sht4x_id,
> -- 
> 2.25.1
> 

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

* Re: [PATCH] hwmon: (sht4x) Add device tree match table
  2021-11-21 16:31 ` Guenter Roeck
@ 2021-11-21 16:46   ` David Mosberger-Tang
  0 siblings, 0 replies; 4+ messages in thread
From: David Mosberger-Tang @ 2021-11-21 16:46 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Navin Sankar Velliangiri, Jean Delvare, linux-hwmon, linux-kernel

On Sun, 2021-11-21 at 08:31 -0800, Guenter Roeck wrote:
> On Sun, Nov 21, 2021 at 04:07:02PM +0000, David Mosberger-Tang wrote:
> > This patch enables automatic loading of the sht4x module via a device
> > tree table entry.
> > 
> > Signed-off-by: David Mosberger-Tang <davidm@egauge.net>
> 
> I'll wait for the DT patch to be approved before applying.
> 
> Please send related patches as series in the future; this should have been
> patch 2/2, with the DT patch as first patch.

Ah, I misunderstood.  I thought you wanted me to send the two patches
to the relevant maintainers only.  I got it now.

Thanks,

  --david



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

* Re: [PATCH] hwmon: (sht4x) Add device tree match table
  2021-11-21 16:07 [PATCH] hwmon: (sht4x) Add device tree match table David Mosberger-Tang
  2021-11-21 16:31 ` Guenter Roeck
@ 2021-11-30  2:20 ` Guenter Roeck
  1 sibling, 0 replies; 4+ messages in thread
From: Guenter Roeck @ 2021-11-30  2:20 UTC (permalink / raw)
  To: David Mosberger-Tang
  Cc: Navin Sankar Velliangiri, Jean Delvare, linux-hwmon, linux-kernel

On Sun, Nov 21, 2021 at 04:07:02PM +0000, David Mosberger-Tang wrote:
> This patch enables automatic loading of the sht4x module via a device
> tree table entry.
> 
> Signed-off-by: David Mosberger-Tang <davidm@egauge.net>

Applied to hwmon-next.

Thanks,
Guenter

> ---
>  drivers/hwmon/sht4x.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/hwmon/sht4x.c b/drivers/hwmon/sht4x.c
> index 3415d7a0e0fc..6e53d81e32d4 100644
> --- a/drivers/hwmon/sht4x.c
> +++ b/drivers/hwmon/sht4x.c
> @@ -281,9 +281,16 @@ static const struct i2c_device_id sht4x_id[] = {
>  };
>  MODULE_DEVICE_TABLE(i2c, sht4x_id);
>  
> +static const struct of_device_id sht4x_of_match[] = {
> +	{ .compatible = "sensirion,sht4x" },
> +	{ }
> +};
> +MODULE_DEVICE_TABLE(of, sht4x_of_match);
> +
>  static struct i2c_driver sht4x_driver = {
>  	.driver = {
>  		.name = "sht4x",
> +		.of_match_table = sht4x_of_match
>  	},
>  	.probe		= sht4x_probe,
>  	.id_table	= sht4x_id,

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

end of thread, other threads:[~2021-11-30  2:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-21 16:07 [PATCH] hwmon: (sht4x) Add device tree match table David Mosberger-Tang
2021-11-21 16:31 ` Guenter Roeck
2021-11-21 16:46   ` David Mosberger-Tang
2021-11-30  2:20 ` Guenter Roeck

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