From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Anup Sharma <anupnewsmail@gmail.com>,
Jonathan Cameron <jic23@kernel.org>,
Lars-Peter Clausen <lars@metafoo.de>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
Peter Meerwald <pmeerw@pmeerw.net>,
u.kleine-koenig@pengutronix.de,
andriy.shevchenko@linux.intel.com, linux-iio@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] iio: temperature: tmp006: Add OF device matching support
Date: Mon, 15 May 2023 08:18:20 +0200 [thread overview]
Message-ID: <1a72facf-422e-7a1a-032e-8760424b012d@linaro.org> (raw)
In-Reply-To: <d0114a66fa3e9fb07a98dde3cc0bd87c526a3753.1684089997.git.anupnewsmail@gmail.com>
On 14/05/2023 21:03, Anup Sharma wrote:
> Adds an of_device_id table entry to the driver, enabling
> device matching through device tree. With this update, the driver
> can now match devices using both the i2c_device_id entry and the
> newly added of_device_id table.
>
> Signed-off-by: Anup Sharma <anupnewsmail@gmail.com>
> ---
> drivers/iio/temperature/tmp006.c | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/iio/temperature/tmp006.c b/drivers/iio/temperature/tmp006.c
> index cdf08477e63f..2b1782263cc9 100644
> --- a/drivers/iio/temperature/tmp006.c
> +++ b/drivers/iio/temperature/tmp006.c
> @@ -17,6 +17,7 @@
> #include <linux/module.h>
> #include <linux/pm.h>
> #include <linux/bitops.h>
> +#include <linux/mod_devicetable.h>
>
> #include <linux/iio/iio.h>
> #include <linux/iio/sysfs.h>
> @@ -272,15 +273,22 @@ static int tmp006_resume(struct device *dev)
>
> static DEFINE_SIMPLE_DEV_PM_OPS(tmp006_pm_ops, tmp006_suspend, tmp006_resume);
>
> +static const struct of_device_id tmp006_of_match[] = {
> + { .compatible = "ti,tmp006", },
> + { }
> +};
> +
Drop blank line.
> +MODULE_DEVICE_TABLE(of, tmp006_of_match);
> +
> static const struct i2c_device_id tmp006_id[] = {
> { "tmp006", 0 },
> { }
> };
> -MODULE_DEVICE_TABLE(i2c, tmp006_id);
This should stay.
Best regards,
Krzysztof
next prev parent reply other threads:[~2023-05-15 6:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-14 19:00 [PATCH 0/2] Add dt-binding support for ti tmp006 Anup Sharma
2023-05-14 19:01 ` [PATCH 1/2] dt-bindings: iio: temperature: Add support for tmp006 Anup Sharma
2023-05-15 6:17 ` Krzysztof Kozlowski
2023-05-15 6:23 ` Krzysztof Kozlowski
2023-05-14 19:03 ` [PATCH 2/2] iio: temperature: tmp006: Add OF device matching support Anup Sharma
2023-05-15 6:18 ` Krzysztof Kozlowski [this message]
2023-05-15 21:45 ` Andy Shevchenko
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=1a72facf-422e-7a1a-032e-8760424b012d@linaro.org \
--to=krzysztof.kozlowski@linaro.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=anupnewsmail@gmail.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jic23@kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pmeerw@pmeerw.net \
--cc=robh+dt@kernel.org \
--cc=u.kleine-koenig@pengutronix.de \
/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;
as well as URLs for NNTP newsgroup(s).