Linux-Hwmon Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] dt-bindings: hwmon: adm1272: add adm1272-adm1275-temp1-en binding
@ 2020-07-10  0:42 Chu Lin
  2020-07-13 19:24 ` Chu Lin
  2020-07-19 22:22 ` Guenter Roeck
  0 siblings, 2 replies; 6+ messages in thread
From: Chu Lin @ 2020-07-10  0:42 UTC (permalink / raw)
  To: linux
  Cc: belgaied, jasonling, jdelvare, linchuyuan, linux-hwmon,
	devicetree, 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 adm1272-adm1278-temp1-en. 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>
---
 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..4403fe30f005 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
+- adm1272-adm1278-temp1-en
+	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>;
+	adm1272-adm1278-temp1-en;
 };
-- 
2.27.0.383.g050319c2ae-goog


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

* Re: [PATCH] dt-bindings: hwmon: adm1272: add adm1272-adm1275-temp1-en binding
  2020-07-10  0:42 [PATCH] dt-bindings: hwmon: adm1272: add adm1272-adm1275-temp1-en binding Chu Lin
@ 2020-07-13 19:24 ` Chu Lin
  2020-07-14 14:03   ` Guenter Roeck
  2020-07-19 22:22 ` Guenter Roeck
  1 sibling, 1 reply; 6+ messages in thread
From: Chu Lin @ 2020-07-13 19:24 UTC (permalink / raw)
  To: Guenter Roeck, robh+dt
  Cc: Kais Belgaied, Jason Ling, jdelvare, linux-hwmon, devicetree,
	linux-kernel, Zhongqi Li

Adding Rob to the review list.

On Thu, Jul 9, 2020 at 5:43 PM Chu Lin <linchuyuan@google.com> 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 adm1272-adm1278-temp1-en. 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>
> ---
>  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..4403fe30f005 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
> +- adm1272-adm1278-temp1-en
> +       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>;
> +       adm1272-adm1278-temp1-en;
>  };
> --
> 2.27.0.383.g050319c2ae-goog
>

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

* Re: [PATCH] dt-bindings: hwmon: adm1272: add adm1272-adm1275-temp1-en binding
  2020-07-13 19:24 ` Chu Lin
@ 2020-07-14 14:03   ` Guenter Roeck
  0 siblings, 0 replies; 6+ messages in thread
From: Guenter Roeck @ 2020-07-14 14:03 UTC (permalink / raw)
  To: Chu Lin, robh+dt
  Cc: Kais Belgaied, Jason Ling, jdelvare, linux-hwmon, devicetree,
	linux-kernel, Zhongqi Li

On 7/13/20 12:24 PM, Chu Lin wrote:
> Adding Rob to the review list.
> 

Rob is running a robot on DT bindings patches. Adding him like this
very likely won't trigger the robot.

Guenter

> On Thu, Jul 9, 2020 at 5:43 PM Chu Lin <linchuyuan@google.com> 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 adm1272-adm1278-temp1-en. 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>
>> ---
>>  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..4403fe30f005 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
>> +- adm1272-adm1278-temp1-en
>> +       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>;
>> +       adm1272-adm1278-temp1-en;
>>  };
>> --
>> 2.27.0.383.g050319c2ae-goog
>>


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

* Re: [PATCH] dt-bindings: hwmon: adm1272: add adm1272-adm1275-temp1-en binding
  2020-07-10  0:42 [PATCH] dt-bindings: hwmon: adm1272: add adm1272-adm1275-temp1-en binding Chu Lin
  2020-07-13 19:24 ` Chu Lin
@ 2020-07-19 22:22 ` Guenter Roeck
  2020-07-20  3:12   ` Chu Lin
  2020-07-20 22:27   ` Rob Herring
  1 sibling, 2 replies; 6+ messages in thread
From: Guenter Roeck @ 2020-07-19 22:22 UTC (permalink / raw)
  To: Chu Lin
  Cc: belgaied, jasonling, jdelvare, linux-hwmon, devicetree,
	linux-kernel, zhongqil

On Fri, Jul 10, 2020 at 12:42:58AM +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 adm1272-adm1278-temp1-en. 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>
> ---
>  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..4403fe30f005 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
> +- adm1272-adm1278-temp1-en
> +	Enable temperature sampling. This is supported on adm1272 and adm1278

I suspect this should be something like "analog,temp1-enable". Either case,
I would suggest to resend the series and copy DT maintainers at least on
this patch.

Thanks,
Guenter

>  
>  Example:
>  
> @@ -22,4 +24,5 @@ adm1272@10 {
>  	compatible = "adi,adm1272";
>  	reg = <0x10>;
>  	shunt-resistor-micro-ohms = <500>;
> +	adm1272-adm1278-temp1-en;
>  };

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

* Re: [PATCH] dt-bindings: hwmon: adm1272: add adm1272-adm1275-temp1-en binding
  2020-07-19 22:22 ` Guenter Roeck
@ 2020-07-20  3:12   ` Chu Lin
  2020-07-20 22:27   ` Rob Herring
  1 sibling, 0 replies; 6+ messages in thread
From: Chu Lin @ 2020-07-20  3:12 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Kais Belgaied, Jason Ling, jdelvare, linux-hwmon, devicetree,
	linux-kernel, Zhongqi Li

On Sun, Jul 19, 2020 at 3:22 PM Guenter Roeck <linux@roeck-us.net> wrote:
>
> On Fri, Jul 10, 2020 at 12:42:58AM +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 adm1272-adm1278-temp1-en. 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>
> > ---
> >  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..4403fe30f005 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
> > +- adm1272-adm1278-temp1-en
> > +     Enable temperature sampling. This is supported on adm1272 and adm1278
>
> I suspect this should be something like "analog,temp1-enable". Either case,
> I would suggest to resend the series and copy DT maintainers at least on
> this patch.

Thanks for the heads up. I will send another review with a fix.

Thanks,
Chu

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

* Re: [PATCH] dt-bindings: hwmon: adm1272: add adm1272-adm1275-temp1-en binding
  2020-07-19 22:22 ` Guenter Roeck
  2020-07-20  3:12   ` Chu Lin
@ 2020-07-20 22:27   ` Rob Herring
  1 sibling, 0 replies; 6+ messages in thread
From: Rob Herring @ 2020-07-20 22:27 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Chu Lin, belgaied, jasonling, jdelvare, linux-hwmon, devicetree,
	linux-kernel, zhongqil

On Sun, Jul 19, 2020 at 03:22:22PM -0700, Guenter Roeck wrote:
> On Fri, Jul 10, 2020 at 12:42:58AM +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 adm1272-adm1278-temp1-en. 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>
> > ---
> >  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..4403fe30f005 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
> > +- adm1272-adm1278-temp1-en
> > +	Enable temperature sampling. This is supported on adm1272 and adm1278
> 
> I suspect this should be something like "analog,temp1-enable". 

Yes.

> Either case,
> I would suggest to resend the series and copy DT maintainers at least on
> this patch.

Only the DT list matters.

Rob

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

end of thread, back to index

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-10  0:42 [PATCH] dt-bindings: hwmon: adm1272: add adm1272-adm1275-temp1-en binding Chu Lin
2020-07-13 19:24 ` Chu Lin
2020-07-14 14:03   ` Guenter Roeck
2020-07-19 22:22 ` Guenter Roeck
2020-07-20  3:12   ` Chu Lin
2020-07-20 22:27   ` Rob Herring

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