diff mbox series

[v4,3/4] hwmon: lm75: Add ti,lm75 to of_match list

Message ID 20210206095121.20625-4-matwey@sai.msu.ru (mailing list archive)
State New
Headers show
Series hwmon: lm75: Handle broken device nodes gracefully | expand

Commit Message

Matwey V. Kornilov Feb. 6, 2021, 9:51 a.m. UTC
Currently, armada-388-helios4.dts and nuvoton-npcm730-kudo.dts use
"ti,lm75" compatible string.

TI LM75A/B are compatible with original LM75A

https://www.ti.com/lit/ds/symlink/lm75a.pdf
https://www.ti.com/lit/ds/symlink/lm75b.pdf

Signed-off-by: Matwey V. Kornilov <matwey@sai.msu.ru>
---
 Documentation/devicetree/bindings/hwmon/lm75.yaml | 1 +
 drivers/hwmon/lm75.c                              | 4 ++++
 2 files changed, 5 insertions(+)

Comments

Guenter Roeck Feb. 6, 2021, 4:54 p.m. UTC | #1
On 2/6/21 1:51 AM, Matwey V. Kornilov wrote:
> Currently, armada-388-helios4.dts and nuvoton-npcm730-kudo.dts use
> "ti,lm75" compatible string.
> 
> TI LM75A/B are compatible with original LM75A
> 
> https://www.ti.com/lit/ds/symlink/lm75a.pdf
> https://www.ti.com/lit/ds/symlink/lm75b.pdf
> 
> Signed-off-by: Matwey V. Kornilov <matwey@sai.msu.ru>
> ---
>  Documentation/devicetree/bindings/hwmon/lm75.yaml | 1 +
>  drivers/hwmon/lm75.c                              | 4 ++++
>  2 files changed, 5 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/hwmon/lm75.yaml b/Documentation/devicetree/bindings/hwmon/lm75.yaml
> index 8c3848f4c277..721e77ce4390 100644
> --- a/Documentation/devicetree/bindings/hwmon/lm75.yaml
> +++ b/Documentation/devicetree/bindings/hwmon/lm75.yaml
> @@ -32,6 +32,7 @@ properties:
>        - st,stds75
>        - st,stlm75
>        - microchip,tcn75
> +      - ti,lm75
>        - ti,tmp100
>        - ti,tmp101
>        - ti,tmp105
> diff --git a/drivers/hwmon/lm75.c b/drivers/hwmon/lm75.c
> index 9c54c7d86771..3e4374aa2f99 100644
> --- a/drivers/hwmon/lm75.c
> +++ b/drivers/hwmon/lm75.c
> @@ -750,6 +750,10 @@ static const struct of_device_id __maybe_unused lm75_of_match[] = {
>  		.compatible = "microchip,tcn75",
>  		.data = (void *)tcn75
>  	},
> +	{
> +		.compatible = "ti,lm75",
> +		.data = (void *)lm75a
> +	},

I think that would be better aligned with lm75, not with lm75a.

Thanks,
Guenter

>  	{
>  		.compatible = "ti,tmp100",
>  		.data = (void *)tmp100
>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/hwmon/lm75.yaml b/Documentation/devicetree/bindings/hwmon/lm75.yaml
index 8c3848f4c277..721e77ce4390 100644
--- a/Documentation/devicetree/bindings/hwmon/lm75.yaml
+++ b/Documentation/devicetree/bindings/hwmon/lm75.yaml
@@ -32,6 +32,7 @@  properties:
       - st,stds75
       - st,stlm75
       - microchip,tcn75
+      - ti,lm75
       - ti,tmp100
       - ti,tmp101
       - ti,tmp105
diff --git a/drivers/hwmon/lm75.c b/drivers/hwmon/lm75.c
index 9c54c7d86771..3e4374aa2f99 100644
--- a/drivers/hwmon/lm75.c
+++ b/drivers/hwmon/lm75.c
@@ -750,6 +750,10 @@  static const struct of_device_id __maybe_unused lm75_of_match[] = {
 		.compatible = "microchip,tcn75",
 		.data = (void *)tcn75
 	},
+	{
+		.compatible = "ti,lm75",
+		.data = (void *)lm75a
+	},
 	{
 		.compatible = "ti,tmp100",
 		.data = (void *)tmp100