diff mbox series

[4/4] dt-bindings: hwmon: ti,ina238: add ti,ina237

Message ID 20231025-ina237-v1-4-a0196119720c@linux.dev (mailing list archive)
State Superseded
Headers show
Series hwmon: add ti,ina237 support to ina238 driver | expand

Commit Message

Richard Leitner Oct. 25, 2023, 10:34 a.m. UTC
Add ti,ina237 binding to ti,ina238 as they share the same driver.

Signed-off-by: Richard Leitner <richard.leitner@linux.dev>
---
 Documentation/devicetree/bindings/hwmon/ti,ina238.yaml | 1 +
 1 file changed, 1 insertion(+)

Comments

Conor Dooley Oct. 25, 2023, 1:58 p.m. UTC | #1
On Wed, Oct 25, 2023 at 10:34:14AM +0000, Richard Leitner wrote:
> Add ti,ina237 binding to ti,ina238 as they share the same driver.
> 
> Signed-off-by: Richard Leitner <richard.leitner@linux.dev>
> ---
>  Documentation/devicetree/bindings/hwmon/ti,ina238.yaml | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Documentation/devicetree/bindings/hwmon/ti,ina238.yaml b/Documentation/devicetree/bindings/hwmon/ti,ina238.yaml
> index aba89e5f34b3..17408076696c 100644
> --- a/Documentation/devicetree/bindings/hwmon/ti,ina238.yaml
> +++ b/Documentation/devicetree/bindings/hwmon/ti,ina238.yaml
> @@ -22,6 +22,7 @@ description: |
>  properties:
>    compatible:
>      enum:
> +      - ti,ina237

The driver patch you have done implies no difference between the
programming model for both of these devices. It'd seem to make more sense
for the ina237 to fall back to the ina238, thereby requiring no change in
the driver to support it.

Cheers,
Conor.

>        - ti,ina238
>  
>    reg:
> 
> -- 
> 2.40.1
>
Richard Leitner Oct. 25, 2023, 2:13 p.m. UTC | #2
On Wed, Oct 25, 2023 at 02:58:44PM +0100, Conor Dooley wrote:
> On Wed, Oct 25, 2023 at 10:34:14AM +0000, Richard Leitner wrote:
> > Add ti,ina237 binding to ti,ina238 as they share the same driver.
> > 
> > Signed-off-by: Richard Leitner <richard.leitner@linux.dev>
> > ---
> >  Documentation/devicetree/bindings/hwmon/ti,ina238.yaml | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/Documentation/devicetree/bindings/hwmon/ti,ina238.yaml b/Documentation/devicetree/bindings/hwmon/ti,ina238.yaml
> > index aba89e5f34b3..17408076696c 100644
> > --- a/Documentation/devicetree/bindings/hwmon/ti,ina238.yaml
> > +++ b/Documentation/devicetree/bindings/hwmon/ti,ina238.yaml
> > @@ -22,6 +22,7 @@ description: |
> >  properties:
> >    compatible:
> >      enum:
> > +      - ti,ina237
> 
> The driver patch you have done implies no difference between the
> programming model for both of these devices. It'd seem to make more sense
> for the ina237 to fall back to the ina238, thereby requiring no change in
> the driver to support it.

Thanks for the quick feedback, Conor.

I first thought of just mentioning the ina237 in the documentation as
"compatible" to the ina238. But IMHO it is better understandable if it's
listed as compatible.

And I would strongly encourage mentioning it somewhere (documentation or
compatible). So other people using the ina237 are able to find it and
don't have to compare the datasheets by themselves to find the right
driver.

> 
> Cheers,
> Conor.
> 
> >        - ti,ina238
> >  
> >    reg:
> > 
> > -- 
> > 2.40.1
> >
Krzysztof Kozlowski Oct. 25, 2023, 2:22 p.m. UTC | #3
On 25/10/2023 16:13, Richard Leitner wrote:
> On Wed, Oct 25, 2023 at 02:58:44PM +0100, Conor Dooley wrote:
>> On Wed, Oct 25, 2023 at 10:34:14AM +0000, Richard Leitner wrote:
>>> Add ti,ina237 binding to ti,ina238 as they share the same driver.
>>>
>>> Signed-off-by: Richard Leitner <richard.leitner@linux.dev>
>>> ---
>>>  Documentation/devicetree/bindings/hwmon/ti,ina238.yaml | 1 +
>>>  1 file changed, 1 insertion(+)
>>>
>>> diff --git a/Documentation/devicetree/bindings/hwmon/ti,ina238.yaml b/Documentation/devicetree/bindings/hwmon/ti,ina238.yaml
>>> index aba89e5f34b3..17408076696c 100644
>>> --- a/Documentation/devicetree/bindings/hwmon/ti,ina238.yaml
>>> +++ b/Documentation/devicetree/bindings/hwmon/ti,ina238.yaml
>>> @@ -22,6 +22,7 @@ description: |
>>>  properties:
>>>    compatible:
>>>      enum:
>>> +      - ti,ina237
>>
>> The driver patch you have done implies no difference between the
>> programming model for both of these devices. It'd seem to make more sense
>> for the ina237 to fall back to the ina238, thereby requiring no change in
>> the driver to support it.
> 
> Thanks for the quick feedback, Conor.
> 
> I first thought of just mentioning the ina237 in the documentation as
> "compatible" to the ina238. But IMHO it is better understandable if it's
> listed as compatible.

Conor did not oppose listing it. The point is to use fall-back.

> 
> And I would strongly encourage mentioning it somewhere (documentation or
> compatible). So other people using the ina237 are able to find it and
> don't have to compare the datasheets by themselves to find the right
> driver.

Sure, there is plenty of space in the driver code (.c or Kconfig) to
document whatever you wish. We focus here on the bindings, though.

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/hwmon/ti,ina238.yaml b/Documentation/devicetree/bindings/hwmon/ti,ina238.yaml
index aba89e5f34b3..17408076696c 100644
--- a/Documentation/devicetree/bindings/hwmon/ti,ina238.yaml
+++ b/Documentation/devicetree/bindings/hwmon/ti,ina238.yaml
@@ -22,6 +22,7 @@  description: |
 properties:
   compatible:
     enum:
+      - ti,ina237
       - ti,ina238
 
   reg: