From: Guenter Roeck <linux@roeck-us.net>
To: David Mosberger-Tang <davidm@egauge.net>
Cc: Navin Sankar Velliangiri <navin@linumiz.com>,
Jean Delvare <jdelvare@suse.com>,
linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] hwmon: (sht4x) Add device tree match table
Date: Sun, 21 Nov 2021 08:31:37 -0800 [thread overview]
Message-ID: <20211121163137.GA3534505@roeck-us.net> (raw)
In-Reply-To: <20211121160637.2312106-1-davidm@egauge.net>
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
>
next prev parent reply other threads:[~2021-11-21 16:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-21 16:07 [PATCH] hwmon: (sht4x) Add device tree match table David Mosberger-Tang
2021-11-21 16:31 ` Guenter Roeck [this message]
2021-11-21 16:46 ` David Mosberger-Tang
2021-11-30 2:20 ` Guenter Roeck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211121163137.GA3534505@roeck-us.net \
--to=linux@roeck-us.net \
--cc=davidm@egauge.net \
--cc=jdelvare@suse.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=navin@linumiz.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox