Linux-Hwmon Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH v2] dt-bindings: hwmon: adm1272: add analog-temperature1-enable binding
@ 2020-07-20 20:14 Chu Lin
  2020-07-20 23:42 ` Guenter Roeck
  0 siblings, 1 reply; 2+ messages in thread
From: Chu Lin @ 2020-07-20 20:14 UTC (permalink / raw)
  To: linux, robh+dt, jdelvare
  Cc: =belgaied, jasonling, linchuyuan, linux-hwmon, linux-kernel, zhongqil

Problem:
	adm1272 and adm1278 supports temperature sampling. The
current way of enabling it requires the user manually unbind the device
from the driver, flip the temperature sampling control bit and then bind
the device back to the driver. It would be nice if we can control this in a
better way by reading the dt.

Solution:
	Introducing device tree binding analog-temperature1-enable. If the
flag is set, flip the temp1_en control bit on probing.

Testing:
make dt_binding_check

Signed-off-by: Chu Lin <linchuyuan@google.com>
---
ChangeLog v1->v2:
  - Rename adm1272-adm1278-temp1-en to analog-temperature1-enable

 Documentation/devicetree/bindings/hwmon/adm1275.txt | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Documentation/devicetree/bindings/hwmon/adm1275.txt b/Documentation/devicetree/bindings/hwmon/adm1275.txt
index 1ecd03f3da4d..7a345c7794a2 100644
--- a/Documentation/devicetree/bindings/hwmon/adm1275.txt
+++ b/Documentation/devicetree/bindings/hwmon/adm1275.txt
@@ -15,6 +15,8 @@ Optional properties:
 
 - shunt-resistor-micro-ohms
 	Shunt resistor value in micro-Ohm
+- analog-temperature1-enable
+	Enable temperature sampling. This is supported on adm1272 and adm1278
 
 Example:
 
@@ -22,4 +24,5 @@ adm1272@10 {
 	compatible = "adi,adm1272";
 	reg = <0x10>;
 	shunt-resistor-micro-ohms = <500>;
+	analog-temperature1-enable;
 };
-- 
2.28.0.rc0.105.gf9edc3c819-goog


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

* Re: [PATCH v2] dt-bindings: hwmon: adm1272: add analog-temperature1-enable binding
  2020-07-20 20:14 [PATCH v2] dt-bindings: hwmon: adm1272: add analog-temperature1-enable binding Chu Lin
@ 2020-07-20 23:42 ` Guenter Roeck
  0 siblings, 0 replies; 2+ messages in thread
From: Guenter Roeck @ 2020-07-20 23:42 UTC (permalink / raw)
  To: Chu Lin
  Cc: robh+dt, jdelvare, =belgaied, jasonling, linux-hwmon,
	linux-kernel, zhongqil

On Mon, Jul 20, 2020 at 08:14:22PM +0000, Chu Lin wrote:
> Problem:
> 	adm1272 and adm1278 supports temperature sampling. The
> current way of enabling it requires the user manually unbind the device
> from the driver, flip the temperature sampling control bit and then bind
> the device back to the driver. It would be nice if we can control this in a
> better way by reading the dt.
> 
> Solution:
> 	Introducing device tree binding analog-temperature1-enable. If the
> flag is set, flip the temp1_en control bit on probing.
> 
> Testing:
> make dt_binding_check
> 
> Signed-off-by: Chu Lin <linchuyuan@google.com>
> ---
> ChangeLog v1->v2:
>   - Rename adm1272-adm1278-temp1-en to analog-temperature1-enable

This needs to be either analog,temperature1-enable or analog,temp1-enable
(comma instead of '-').

Thanks,
Guenter

> 
>  Documentation/devicetree/bindings/hwmon/adm1275.txt | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/hwmon/adm1275.txt b/Documentation/devicetree/bindings/hwmon/adm1275.txt
> index 1ecd03f3da4d..7a345c7794a2 100644
> --- a/Documentation/devicetree/bindings/hwmon/adm1275.txt
> +++ b/Documentation/devicetree/bindings/hwmon/adm1275.txt
> @@ -15,6 +15,8 @@ Optional properties:
>  
>  - shunt-resistor-micro-ohms
>  	Shunt resistor value in micro-Ohm
> +- analog-temperature1-enable
> +	Enable temperature sampling. This is supported on adm1272 and adm1278
>  
>  Example:
>  
> @@ -22,4 +24,5 @@ adm1272@10 {
>  	compatible = "adi,adm1272";
>  	reg = <0x10>;
>  	shunt-resistor-micro-ohms = <500>;
> +	analog-temperature1-enable;
>  };
> -- 
> 2.28.0.rc0.105.gf9edc3c819-goog
> 

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

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-20 20:14 [PATCH v2] dt-bindings: hwmon: adm1272: add analog-temperature1-enable binding Chu Lin
2020-07-20 23:42 ` Guenter Roeck

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