Linux-Hwmon Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH v2 0/2] (lm73) Add support for of_match_table
@ 2020-02-12  3:06 Henry Shen
  2020-02-12  3:06 ` [PATCH v2 1/2] dt-bindings: Add TI LM73 as a trivial device Henry Shen
  2020-02-12  3:06 ` [PATCH v2 2/2] hwmon: (lm73) Add support for of_match_table Henry Shen
  0 siblings, 2 replies; 4+ messages in thread
From: Henry Shen @ 2020-02-12  3:06 UTC (permalink / raw)
  To: robh+dt, mark.rutland, guillaume.ligneul, jdelvare, linux,
	trivial, venture
  Cc: devicetree, linux-kernel, linux-hwmon, Henry Shen

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(+)

-- 
2.25.0


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

* [PATCH v2 1/2] dt-bindings: Add TI LM73 as a trivial device
  2020-02-12  3:06 [PATCH v2 0/2] (lm73) Add support for of_match_table Henry Shen
@ 2020-02-12  3:06 ` Henry Shen
  2020-02-19 15:19   ` Rob Herring
  2020-02-12  3:06 ` [PATCH v2 2/2] hwmon: (lm73) Add support for of_match_table Henry Shen
  1 sibling, 1 reply; 4+ messages in thread
From: Henry Shen @ 2020-02-12  3:06 UTC (permalink / raw)
  To: robh+dt, mark.rutland, guillaume.ligneul, jdelvare, linux,
	trivial, venture
  Cc: devicetree, linux-kernel, linux-hwmon, Henry Shen

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

Signed-off-by: Henry Shen <henry.shen@alliedtelesis.co.nz>
---
Changes in v2:
- add missing sign-off

 Documentation/devicetree/bindings/trivial-devices.yaml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/trivial-devices.yaml b/Documentation/devicetree/bindings/trivial-devices.yaml
index 978de7d37c66..20e6bae68fec 100644
--- a/Documentation/devicetree/bindings/trivial-devices.yaml
+++ b/Documentation/devicetree/bindings/trivial-devices.yaml
@@ -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
-- 
2.25.0


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

* [PATCH v2 2/2] hwmon: (lm73) Add support for of_match_table
  2020-02-12  3:06 [PATCH v2 0/2] (lm73) Add support for of_match_table Henry Shen
  2020-02-12  3:06 ` [PATCH v2 1/2] dt-bindings: Add TI LM73 as a trivial device Henry Shen
@ 2020-02-12  3:06 ` Henry Shen
  1 sibling, 0 replies; 4+ messages in thread
From: Henry Shen @ 2020-02-12  3:06 UTC (permalink / raw)
  To: robh+dt, mark.rutland, guillaume.ligneul, jdelvare, linux,
	trivial, venture
  Cc: devicetree, linux-kernel, linux-hwmon, Henry Shen

Add the of_match_table.

Signed-off-by: Henry Shen <henry.shen@alliedtelesis.co.nz>
---
Change in v2:
- add missing sign-off

 drivers/hwmon/lm73.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/hwmon/lm73.c b/drivers/hwmon/lm73.c
index 1eeb9d7de2a0..733c48bf6c98 100644
--- a/drivers/hwmon/lm73.c
+++ b/drivers/hwmon/lm73.c
@@ -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,
-- 
2.25.0


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

* Re: [PATCH v2 1/2] dt-bindings: Add TI LM73 as a trivial device
  2020-02-12  3:06 ` [PATCH v2 1/2] dt-bindings: Add TI LM73 as a trivial device Henry Shen
@ 2020-02-19 15:19   ` Rob Herring
  0 siblings, 0 replies; 4+ messages in thread
From: Rob Herring @ 2020-02-19 15:19 UTC (permalink / raw)
  To: Henry Shen
  Cc: robh+dt, mark.rutland, guillaume.ligneul, jdelvare, linux,
	trivial, venture, devicetree, linux-kernel, linux-hwmon,
	Henry Shen

On Wed, 12 Feb 2020 16:06:14 +1300, Henry Shen wrote:
> 
> The Texas Instruments LM73 is a digital temperature sensor with 2-wire
> interface. Add LM73 as a trivial device.
> 
> Signed-off-by: Henry Shen <henry.shen@alliedtelesis.co.nz>
> ---
> Changes in v2:
> - add missing sign-off
> 
>  Documentation/devicetree/bindings/trivial-devices.yaml | 2 ++
>  1 file changed, 2 insertions(+)
> 

Acked-by: Rob Herring <robh@kernel.org>

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

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-12  3:06 [PATCH v2 0/2] (lm73) Add support for of_match_table Henry Shen
2020-02-12  3:06 ` [PATCH v2 1/2] dt-bindings: Add TI LM73 as a trivial device Henry Shen
2020-02-19 15:19   ` Rob Herring
2020-02-12  3:06 ` [PATCH v2 2/2] hwmon: (lm73) Add support for of_match_table Henry Shen

Linux-Hwmon Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-hwmon/0 linux-hwmon/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-hwmon linux-hwmon/ https://lore.kernel.org/linux-hwmon \
		linux-hwmon@vger.kernel.org
	public-inbox-index linux-hwmon

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-hwmon


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git