* [PATCH v2 0/2] Add dt-binding support for ti tmp006
@ 2023-05-20 10:51 Anup Sharma
2023-05-20 10:53 ` [PATCH v2 1/2] dt-bindings: iio: temperature: Add support for tmp006 Anup Sharma
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Anup Sharma @ 2023-05-20 10:51 UTC (permalink / raw)
To: Jonathan Cameron, Lars-Peter Clausen, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Anup Sharma, Peter Meerwald,
u.kleine-koenig, andriy.shevchenko, linux-iio, devicetree,
linux-kernel
These patches introduce device tree binding support and
add an of_device_id table entry to the driver.
Changes in v2:
- Keep the exsisting MODULE_DEVICE_TABLE entry.
- Removed the inner comma in of_device_id.
- Order the included header to improve code organization.
- Adding missing semicolon to fix syntax error detected
using dt_binding_check.
Anup Sharma (2):
dt-bindings: iio: temperature: Add support for tmp006
iio: temperature: tmp006: Add OF device matching support
.../bindings/iio/temperature/ti,tmp006.yaml | 42 +++++++++++++++++++
drivers/iio/temperature/tmp006.c | 8 ++++
2 files changed, 50 insertions(+)
create mode 100644 Documentation/devicetree/bindings/iio/temperature/ti,tmp006.yaml
--
2.34.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2 1/2] dt-bindings: iio: temperature: Add support for tmp006
2023-05-20 10:51 [PATCH v2 0/2] Add dt-binding support for ti tmp006 Anup Sharma
@ 2023-05-20 10:53 ` Anup Sharma
2023-05-20 10:55 ` [PATCH v2 2/2] iio: temperature: tmp006: Add OF device matching support Anup Sharma
2023-05-20 15:20 ` [PATCH v2 0/2] Add dt-binding support for ti tmp006 Jonathan Cameron
2 siblings, 0 replies; 6+ messages in thread
From: Anup Sharma @ 2023-05-20 10:53 UTC (permalink / raw)
To: Jonathan Cameron, Lars-Peter Clausen, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Anup Sharma, Peter Meerwald,
u.kleine-koenig, andriy.shevchenko, linux-iio, devicetree,
linux-kernel
Add devicetree binding document for TMP006, IR thermopile sensor.
Signed-off-by: Anup Sharma <anupnewsmail@gmail.com>
---
Changes:
V1 -> V2: Removed redundant dt-binding from subject.
Added supply information.
Adhere to the generic node name.
Adding missing semicolon to fix syntax error detected
using dt_binding_check
---
.../bindings/iio/temperature/ti,tmp006.yaml | 42 +++++++++++++++++++
1 file changed, 42 insertions(+)
create mode 100644 Documentation/devicetree/bindings/iio/temperature/ti,tmp006.yaml
diff --git a/Documentation/devicetree/bindings/iio/temperature/ti,tmp006.yaml b/Documentation/devicetree/bindings/iio/temperature/ti,tmp006.yaml
new file mode 100644
index 000000000000..d43002b9bfdc
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/temperature/ti,tmp006.yaml
@@ -0,0 +1,42 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/temperature/ti,tmp006.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: TI TMP006 IR thermopile sensor
+
+maintainers:
+ - Peter Meerwald <pmeerw@pmeerw.net>
+
+description: |
+ TI TMP006 - Infrared Thermopile Sensor in Chip-Scale Package.
+ https://cdn.sparkfun.com/datasheets/Sensors/Temp/tmp006.pdf
+
+properties:
+ compatible:
+ const: ti,tmp006
+
+ reg:
+ maxItems: 1
+
+ vdd-supply:
+ description: provide VDD power to the sensor.
+
+required:
+ - compatible
+ - reg
+
+additionalProperties: false
+
+examples:
+ - |
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ temperature-sensor@40 {
+ compatible = "ti,tmp006";
+ reg = <0x40>;
+ vdd-supply = <&ldo4_reg>;
+ };
+ };
--
2.34.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2 2/2] iio: temperature: tmp006: Add OF device matching support
2023-05-20 10:51 [PATCH v2 0/2] Add dt-binding support for ti tmp006 Anup Sharma
2023-05-20 10:53 ` [PATCH v2 1/2] dt-bindings: iio: temperature: Add support for tmp006 Anup Sharma
@ 2023-05-20 10:55 ` Anup Sharma
2023-05-20 15:20 ` [PATCH v2 0/2] Add dt-binding support for ti tmp006 Jonathan Cameron
2 siblings, 0 replies; 6+ messages in thread
From: Anup Sharma @ 2023-05-20 10:55 UTC (permalink / raw)
To: Jonathan Cameron, Lars-Peter Clausen, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Anup Sharma, Peter Meerwald,
u.kleine-koenig, andriy.shevchenko, linux-iio, devicetree,
linux-kernel
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>
---
Changes:
V1 -> V2: Keep the exsisting MODULE_DEVICE_TABLE entry.
Removed the inner comma in of_device_id.
Order the included header to improve code organization.
---
drivers/iio/temperature/tmp006.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/iio/temperature/tmp006.c b/drivers/iio/temperature/tmp006.c
index cdf08477e63f..5f5a7450bd5b 100644
--- a/drivers/iio/temperature/tmp006.c
+++ b/drivers/iio/temperature/tmp006.c
@@ -15,6 +15,7 @@
#include <linux/i2c.h>
#include <linux/delay.h>
#include <linux/module.h>
+#include <linux/mod_devicetable.h>
#include <linux/pm.h>
#include <linux/bitops.h>
@@ -272,6 +273,12 @@ 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" },
+ { }
+};
+MODULE_DEVICE_TABLE(of, tmp006_of_match);
+
static const struct i2c_device_id tmp006_id[] = {
{ "tmp006", 0 },
{ }
@@ -281,6 +288,7 @@ MODULE_DEVICE_TABLE(i2c, tmp006_id);
static struct i2c_driver tmp006_driver = {
.driver = {
.name = "tmp006",
+ .of_match_table = tmp006_of_match,
.pm = pm_sleep_ptr(&tmp006_pm_ops),
},
.probe_new = tmp006_probe,
--
2.34.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2 0/2] Add dt-binding support for ti tmp006
2023-05-20 10:51 [PATCH v2 0/2] Add dt-binding support for ti tmp006 Anup Sharma
2023-05-20 10:53 ` [PATCH v2 1/2] dt-bindings: iio: temperature: Add support for tmp006 Anup Sharma
2023-05-20 10:55 ` [PATCH v2 2/2] iio: temperature: tmp006: Add OF device matching support Anup Sharma
@ 2023-05-20 15:20 ` Jonathan Cameron
2023-05-20 22:32 ` Conor Dooley
2 siblings, 1 reply; 6+ messages in thread
From: Jonathan Cameron @ 2023-05-20 15:20 UTC (permalink / raw)
To: Anup Sharma
Cc: Lars-Peter Clausen, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Peter Meerwald, u.kleine-koenig, andriy.shevchenko,
linux-iio, devicetree, linux-kernel
On Sat, 20 May 2023 16:21:50 +0530
Anup Sharma <anupnewsmail@gmail.com> wrote:
> These patches introduce device tree binding support and
> add an of_device_id table entry to the driver.
>
> Changes in v2:
> - Keep the exsisting MODULE_DEVICE_TABLE entry.
> - Removed the inner comma in of_device_id.
> - Order the included header to improve code organization.
> - Adding missing semicolon to fix syntax error detected
> using dt_binding_check.
>
LGTM - I'll leave them a little while though for others to comment before
picking them up.
Thanks,
Jonathan
> Anup Sharma (2):
> dt-bindings: iio: temperature: Add support for tmp006
> iio: temperature: tmp006: Add OF device matching support
>
> .../bindings/iio/temperature/ti,tmp006.yaml | 42 +++++++++++++++++++
> drivers/iio/temperature/tmp006.c | 8 ++++
> 2 files changed, 50 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/iio/temperature/ti,tmp006.yaml
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 0/2] Add dt-binding support for ti tmp006
2023-05-20 15:20 ` [PATCH v2 0/2] Add dt-binding support for ti tmp006 Jonathan Cameron
@ 2023-05-20 22:32 ` Conor Dooley
2023-05-28 19:22 ` Jonathan Cameron
0 siblings, 1 reply; 6+ messages in thread
From: Conor Dooley @ 2023-05-20 22:32 UTC (permalink / raw)
To: Jonathan Cameron
Cc: Anup Sharma, Lars-Peter Clausen, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Peter Meerwald, u.kleine-koenig, andriy.shevchenko,
linux-iio, devicetree, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 907 bytes --]
On Sat, May 20, 2023 at 04:20:02PM +0100, Jonathan Cameron wrote:
> On Sat, 20 May 2023 16:21:50 +0530
> Anup Sharma <anupnewsmail@gmail.com> wrote:
>
> > These patches introduce device tree binding support and
> > add an of_device_id table entry to the driver.
> >
> > Changes in v2:
> > - Keep the exsisting MODULE_DEVICE_TABLE entry.
> > - Removed the inner comma in of_device_id.
> > - Order the included header to improve code organization.
> > - Adding missing semicolon to fix syntax error detected
> > using dt_binding_check.
> >
> LGTM - I'll leave them a little while though for others to comment before
> picking them up.
It may be a wee bit before you here from Krzysztof, but the binding
check issues have been fixed, as have the things he pointed out in the
original submission AFAICT.
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Thanks,
Conor.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 0/2] Add dt-binding support for ti tmp006
2023-05-20 22:32 ` Conor Dooley
@ 2023-05-28 19:22 ` Jonathan Cameron
0 siblings, 0 replies; 6+ messages in thread
From: Jonathan Cameron @ 2023-05-28 19:22 UTC (permalink / raw)
To: Conor Dooley
Cc: Anup Sharma, Lars-Peter Clausen, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Peter Meerwald, u.kleine-koenig, andriy.shevchenko,
linux-iio, devicetree, linux-kernel
On Sat, 20 May 2023 23:32:03 +0100
Conor Dooley <conor@kernel.org> wrote:
> On Sat, May 20, 2023 at 04:20:02PM +0100, Jonathan Cameron wrote:
> > On Sat, 20 May 2023 16:21:50 +0530
> > Anup Sharma <anupnewsmail@gmail.com> wrote:
> >
> > > These patches introduce device tree binding support and
> > > add an of_device_id table entry to the driver.
> > >
> > > Changes in v2:
> > > - Keep the exsisting MODULE_DEVICE_TABLE entry.
> > > - Removed the inner comma in of_device_id.
> > > - Order the included header to improve code organization.
> > > - Adding missing semicolon to fix syntax error detected
> > > using dt_binding_check.
> > >
> > LGTM - I'll leave them a little while though for others to comment before
> > picking them up.
>
> It may be a wee bit before you here from Krzysztof, but the binding
> check issues have been fixed, as have the things he pointed out in the
> original submission AFAICT.
> Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
>
Thanks!
Applied to the togreg branch of iio.git and pushed out as testing for
the autobuilders to have their fun.
Thanks,
Jonathan
> Thanks,
> Conor.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-05-28 19:06 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-20 10:51 [PATCH v2 0/2] Add dt-binding support for ti tmp006 Anup Sharma
2023-05-20 10:53 ` [PATCH v2 1/2] dt-bindings: iio: temperature: Add support for tmp006 Anup Sharma
2023-05-20 10:55 ` [PATCH v2 2/2] iio: temperature: tmp006: Add OF device matching support Anup Sharma
2023-05-20 15:20 ` [PATCH v2 0/2] Add dt-binding support for ti tmp006 Jonathan Cameron
2023-05-20 22:32 ` Conor Dooley
2023-05-28 19:22 ` Jonathan Cameron
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).