Skip to contentSkip to conversation

(lm73) Add support for of_match_table

PATCH Applied Henry Shen 3 participants 6 messages Feb 12, 2020 – Feb 19, 2020

Subsystems (3)
lore
Share & tools
lore

Henry Shen

author
#0 lore raw

v2 cover (lm73) Add support for of_match_table

This series adds documentation and compatible info for the lm73 temperature sensor.

Henry Shen (2):
dt-bindings: Add TI LM73 as a trivial device
hwmon: (lm73) Add support for of_match_table

 Documentation/devicetree/bindings/trivial-devices.yaml |  2 ++
 drivers/hwmon/lm73.c                                   | 10 ++++++++++
 2 files changed, 12 insertions(+)
Signature · 1 line
2.25.0
author
#1 lore raw

PATCH v2 1/2 dt-bindings: Add TI LM73 as a trivial device

The Texas Instruments LM73 is a digital temperature sensor with 2-wire interface. Add LM73 as a trivial device.

---
Changes in v2:
- add missing sign-off

 Documentation/devicetree/bindings/trivial-devices.yaml | 2 ++
 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/trivial-devices.yaml +2 -0
index 978de7d37c66..20e6bae68fec 100644
@@ -350,6 +350,8 @@ properties:
           - ti,ads7830
             # Temperature Monitoring and Fan Control
           - ti,amc6821
+            # Temperature sensor with 2-wire interface
+          - ti,lm73
             # Temperature sensor with integrated fan control
           - ti,lm96000
             # I2C Touch-Screen Controller
Signature · 1 line
2.25.0
maintainer Acked-by on v2 1/2
#2 lore raw

Re: [PATCH v2 1/2] dt-bindings: Add TI LM73 as a trivial device

Quoted 4 lines · Henry Shen

The Texas Instruments LM73 is a digital temperature sensor with 2-wire interface. Add LM73 as a trivial device.

Quoted 8 lines

---
Changes in v2:
- add missing sign-off

 Documentation/devicetree/bindings/trivial-devices.yaml | 2 ++
 1 file changed, 2 insertions(+)
maintainer Applied
#3 lore raw

Re: [PATCH v2 1/2] dt-bindings: Add TI LM73 as a trivial device

In reply to Henry Shen
Quoted 5 lines · Henry Shen

The Texas Instruments LM73 is a digital temperature sensor with 2-wire interface. Add LM73 as a trivial device.

Applied to hwmon-next.

Thanks,
Guenter

Quoted 20 lines

---
Changes in v2:
- add missing sign-off

 Documentation/devicetree/bindings/trivial-devices.yaml | 2 ++
 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/trivial-devices.yaml +2 -0
index 978de7d37c66..20e6bae68fec 100644
@@ -350,6 +350,8 @@ properties:
           - ti,ads7830
             # Temperature Monitoring and Fan Control
           - ti,amc6821
+            # Temperature sensor with 2-wire interface
+          - ti,lm73
             # Temperature sensor with integrated fan control
           - ti,lm96000
             # I2C Touch-Screen Controller
author
#4 lore raw

PATCH v2 2/2 hwmon: (lm73) Add support for of_match_table

In reply to Henry Shen

Add the of_match_table.

---
Change in v2:
- add missing sign-off

 drivers/hwmon/lm73.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
drivers/hwmon/lm73.c +10 -0
index 1eeb9d7de2a0..733c48bf6c98 100644
@@ -262,10 +262,20 @@ static int lm73_detect(struct i2c_client *new_client,
 	return 0;
 }
 
+static const struct of_device_id lm73_of_match[] = {
+	{
+		.compatible = "ti,lm73",
+	},
+	{ },
+};
+
+MODULE_DEVICE_TABLE(of, lm73_of_match);
+
 static struct i2c_driver lm73_driver = {
 	.class		= I2C_CLASS_HWMON,
 	.driver = {
 		.name	= "lm73",
+		.of_match_table = lm73_of_match,
 	},
 	.probe		= lm73_probe,
 	.id_table	= lm73_ids,
Signature · 1 line
2.25.0
maintainer Applied
#5 lore raw

Re: [PATCH v2 2/2] hwmon: (lm73) Add support for of_match_table

Quoted 3 lines · Henry Shen

Add the of_match_table.

Applied to hwmon-next.

Thanks,
Guenter

Quoted 32 lines

---
Change in v2:
- add missing sign-off

 drivers/hwmon/lm73.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
drivers/hwmon/lm73.c +10 -0
index 1eeb9d7de2a0..733c48bf6c98 100644
@@ -262,10 +262,20 @@ static int lm73_detect(struct i2c_client *new_client,
 	return 0;
 }
 
+static const struct of_device_id lm73_of_match[] = {
+	{
+		.compatible = "ti,lm73",
+	},
+	{ },
+};
+
+MODULE_DEVICE_TABLE(of, lm73_of_match);
+
 static struct i2c_driver lm73_driver = {
 	.class		= I2C_CLASS_HWMON,
 	.driver = {
 		.name	= "lm73",
+		.of_match_table = lm73_of_match,
 	},
 	.probe		= lm73_probe,
 	.id_table	= lm73_ids,