diff mbox series

[1/2] dt-bindings: hwmon: merge max1619 into trivial devices

Message ID 20210819182544.224121-1-krzysztof.kozlowski@canonical.com
State Accepted
Commit 785b66427ee173609670876ea9c9d3eb35d8f3dc
Headers show
Series [1/2] dt-bindings: hwmon: merge max1619 into trivial devices | expand

Commit Message

Krzysztof Kozlowski Aug. 19, 2021, 6:25 p.m. UTC
Ther Maxim max1619 bindings are trivial, so simply merge it into
trivial-devices.yaml.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
---
 Documentation/devicetree/bindings/hwmon/max1619.txt  | 12 ------------
 .../devicetree/bindings/trivial-devices.yaml         |  2 ++
 2 files changed, 2 insertions(+), 12 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/hwmon/max1619.txt

Comments

Guenter Roeck Aug. 20, 2021, 2:23 p.m. UTC | #1
On 8/19/21 11:25 AM, Krzysztof Kozlowski wrote:
> Ther Maxim max31785 bindings are trivial, so simply merge it into

> trivial-devices.yaml.

> 

> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>

> ---

>   .../devicetree/bindings/hwmon/max31785.txt    | 22 -------------------


Not sure if that is a good idea. It would make more sense to standardize the
properties needed by the driver/chip instead (see existing dts files in the kernel).

Guenter
Guenter Roeck Aug. 20, 2021, 2:26 p.m. UTC | #2
On 8/19/21 11:25 AM, Krzysztof Kozlowski wrote:
> Ther Maxim max1619 bindings are trivial, so simply merge it into

> trivial-devices.yaml.

> 

> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>


Do we have a general guideline on how to handle such trivial bindings ?
I normally leave it up to the driver author to decide one way or another.

Guenter

> ---

>   Documentation/devicetree/bindings/hwmon/max1619.txt  | 12 ------------

>   .../devicetree/bindings/trivial-devices.yaml         |  2 ++

>   2 files changed, 2 insertions(+), 12 deletions(-)

>   delete mode 100644 Documentation/devicetree/bindings/hwmon/max1619.txt

> 

> diff --git a/Documentation/devicetree/bindings/hwmon/max1619.txt b/Documentation/devicetree/bindings/hwmon/max1619.txt

> deleted file mode 100644

> index c70dbbe1e56f..000000000000

> --- a/Documentation/devicetree/bindings/hwmon/max1619.txt

> +++ /dev/null

> @@ -1,12 +0,0 @@

> -Bindings for MAX1619 Temperature Sensor

> -

> -Required properties:

> -- compatible : "maxim,max1619"

> -- reg        : I2C address, one of 0x18, 0x19, 0x1a, 0x29, 0x2a, 0x2b, 0x4c, or

> -               0x4d, 0x4e

> -

> -Example:

> -	temp@4c {

> -		compatible = "maxim,max1619";

> -		reg = <0x4c>;

> -	};

> diff --git a/Documentation/devicetree/bindings/trivial-devices.yaml b/Documentation/devicetree/bindings/trivial-devices.yaml

> index fb03febc6616..1e4b3464d734 100644

> --- a/Documentation/devicetree/bindings/trivial-devices.yaml

> +++ b/Documentation/devicetree/bindings/trivial-devices.yaml

> @@ -147,6 +147,8 @@ properties:

>             - maxim,ds1803-100

>               # Low-Power, 4-/12-Channel, 2-Wire Serial, 12-Bit ADCs

>             - maxim,max1237

> +            # Temperature Sensor, I2C interface

> +          - maxim,max1619

>               # 10-bit 10 kOhm linear programable voltage divider

>             - maxim,max5481

>               # 10-bit 50 kOhm linear programable voltage divider

>
Rob Herring Aug. 23, 2021, 9:12 p.m. UTC | #3
On Fri, Aug 20, 2021 at 9:23 AM Guenter Roeck <linux@roeck-us.net> wrote:
>

> On 8/19/21 11:25 AM, Krzysztof Kozlowski wrote:

> > Ther Maxim max31785 bindings are trivial, so simply merge it into

> > trivial-devices.yaml.

> >

> > Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>

> > ---

> >   .../devicetree/bindings/hwmon/max31785.txt    | 22 -------------------

>

> Not sure if that is a good idea. It would make more sense to standardize the

> properties needed by the driver/chip instead (see existing dts files in the kernel).


This device is certainly not trivial, the binding is just incomplete.

Device specific fan controller bindings are something I'm just going
to reject until someone comes up with something common.

Rob
Rob Herring Aug. 23, 2021, 9:19 p.m. UTC | #4
On Fri, Aug 20, 2021 at 9:26 AM Guenter Roeck <linux@roeck-us.net> wrote:
>

> On 8/19/21 11:25 AM, Krzysztof Kozlowski wrote:

> > Ther Maxim max1619 bindings are trivial, so simply merge it into

> > trivial-devices.yaml.

> >

> > Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>

>

> Do we have a general guideline on how to handle such trivial bindings ?


Not really. I debate (with myself) just getting rid of it as I suspect
lots of bindings are just incomplete. Like should supplies be
required? But it's convenient to have and not duplicate a bunch of
boilerplate.

> I normally leave it up to the driver author to decide one way or another.


Me too.

This one looks simple enough to be in trivial-devices, so I'll take
having a schema over not.

Rob
Rob Herring Aug. 31, 2021, 3:21 p.m. UTC | #5
On Thu, 19 Aug 2021 20:25:43 +0200, Krzysztof Kozlowski wrote:
> Ther Maxim max1619 bindings are trivial, so simply merge it into

> trivial-devices.yaml.

> 

> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>

> ---

>  Documentation/devicetree/bindings/hwmon/max1619.txt  | 12 ------------

>  .../devicetree/bindings/trivial-devices.yaml         |  2 ++

>  2 files changed, 2 insertions(+), 12 deletions(-)

>  delete mode 100644 Documentation/devicetree/bindings/hwmon/max1619.txt

> 


Applied, thanks!
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/hwmon/max1619.txt b/Documentation/devicetree/bindings/hwmon/max1619.txt
deleted file mode 100644
index c70dbbe1e56f..000000000000
--- a/Documentation/devicetree/bindings/hwmon/max1619.txt
+++ /dev/null
@@ -1,12 +0,0 @@ 
-Bindings for MAX1619 Temperature Sensor
-
-Required properties:
-- compatible : "maxim,max1619"
-- reg        : I2C address, one of 0x18, 0x19, 0x1a, 0x29, 0x2a, 0x2b, 0x4c, or
-               0x4d, 0x4e
-
-Example:
-	temp@4c {
-		compatible = "maxim,max1619";
-		reg = <0x4c>;
-	};
diff --git a/Documentation/devicetree/bindings/trivial-devices.yaml b/Documentation/devicetree/bindings/trivial-devices.yaml
index fb03febc6616..1e4b3464d734 100644
--- a/Documentation/devicetree/bindings/trivial-devices.yaml
+++ b/Documentation/devicetree/bindings/trivial-devices.yaml
@@ -147,6 +147,8 @@  properties:
           - maxim,ds1803-100
             # Low-Power, 4-/12-Channel, 2-Wire Serial, 12-Bit ADCs
           - maxim,max1237
+            # Temperature Sensor, I2C interface
+          - maxim,max1619
             # 10-bit 10 kOhm linear programable voltage divider
           - maxim,max5481
             # 10-bit 50 kOhm linear programable voltage divider