diff mbox series

[v3,1/5] dt-bindings: mfd: Add ENE KB930 Embedded Controller binding

Message ID 20200906195103.1347-2-digetx@gmail.com
State New
Headers show
Series Introduce Embedded Controller driver for Acer A500 | expand

Commit Message

Dmitry Osipenko Sept. 6, 2020, 7:50 p.m. UTC
Add binding document for the ENE KB930 Embedded Controller.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
---
 .../devicetree/bindings/mfd/ene-kb930.yaml    | 66 +++++++++++++++++++
 1 file changed, 66 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mfd/ene-kb930.yaml

Comments

Rob Herring Sept. 8, 2020, 7:46 p.m. UTC | #1
On Sun, 06 Sep 2020 22:50:59 +0300, Dmitry Osipenko wrote:
> Add binding document for the ENE KB930 Embedded Controller.
> 
> Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
> ---
>  .../devicetree/bindings/mfd/ene-kb930.yaml    | 66 +++++++++++++++++++
>  1 file changed, 66 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/mfd/ene-kb930.yaml
> 

Reviewed-by: Rob Herring <robh@kernel.org>
Sebastian Reichel Oct. 8, 2020, 11 p.m. UTC | #2
Hi,

On Sun, Sep 06, 2020 at 10:50:59PM +0300, Dmitry Osipenko wrote:
> Add binding document for the ENE KB930 Embedded Controller.
> 
> Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
> ---
>  .../devicetree/bindings/mfd/ene-kb930.yaml    | 66 +++++++++++++++++++
>  1 file changed, 66 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/mfd/ene-kb930.yaml
> 
> diff --git a/Documentation/devicetree/bindings/mfd/ene-kb930.yaml b/Documentation/devicetree/bindings/mfd/ene-kb930.yaml
> new file mode 100644
> index 000000000000..635c8966ca22
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mfd/ene-kb930.yaml
> @@ -0,0 +1,66 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/mfd/ene-kb930.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: ENE KB930 Embedded Controller bindings
> +
> +description: |
> +  This binding describes the ENE KB930 Embedded Controller attached to an
> +  I2C bus.
> +
> +maintainers:
> +  - Dmitry Osipenko <digetx@gmail.com>
> +
> +properties:
> +  compatible:
> +    items:
> +      - enum:
> +        - acer,a500-iconia-ec # Acer A500 Iconia tablet device
> +      - enum:
> +        - ene,kb930
> +  reg:
> +    maxItems: 1
> +
> +  monitored-battery: true

^^^ this is not being used by your battery driver. Do you plan
to use it in the future or is it a copy&paste mistake? :)

-- Sebastian

> +  power-supplies: true
> +  system-power-controller: true
> +
> +required:
> +  - compatible
> +  - reg
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    battery: battery-cell {
> +      compatible = "simple-battery";
> +      charge-full-design-microamp-hours = <3260000>;
> +      energy-full-design-microwatt-hours = <24000000>;
> +      operating-range-celsius = <0 40>;
> +    };
> +
> +    mains: ac-adapter {
> +      compatible = "gpio-charger";
> +      charger-type = "mains";
> +      gpios = <&gpio 125 0>;
> +    };
> +
> +    i2c {
> +      #address-cells = <1>;
> +      #size-cells = <0>;
> +
> +      embedded-controller@58 {
> +        compatible = "acer,a500-iconia-ec", "ene,kb930";
> +        reg = <0x58>;
> +
> +        system-power-controller;
> +
> +        monitored-battery = <&battery>;
> +        power-supplies = <&mains>;
> +      };
> +    };
> +
> +...
> -- 
> 2.27.0
>
Dmitry Osipenko Oct. 9, 2020, 8:06 p.m. UTC | #3
09.10.2020 02:00, Sebastian Reichel пишет:
> Hi,
> 
> On Sun, Sep 06, 2020 at 10:50:59PM +0300, Dmitry Osipenko wrote:
>> Add binding document for the ENE KB930 Embedded Controller.
>>
>> Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
>> ---
>>  .../devicetree/bindings/mfd/ene-kb930.yaml    | 66 +++++++++++++++++++
>>  1 file changed, 66 insertions(+)
>>  create mode 100644 Documentation/devicetree/bindings/mfd/ene-kb930.yaml
>>
>> diff --git a/Documentation/devicetree/bindings/mfd/ene-kb930.yaml b/Documentation/devicetree/bindings/mfd/ene-kb930.yaml
>> new file mode 100644
>> index 000000000000..635c8966ca22
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/mfd/ene-kb930.yaml
>> @@ -0,0 +1,66 @@
>> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/mfd/ene-kb930.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: ENE KB930 Embedded Controller bindings
>> +
>> +description: |
>> +  This binding describes the ENE KB930 Embedded Controller attached to an
>> +  I2C bus.
>> +
>> +maintainers:
>> +  - Dmitry Osipenko <digetx@gmail.com>
>> +
>> +properties:
>> +  compatible:
>> +    items:
>> +      - enum:
>> +        - acer,a500-iconia-ec # Acer A500 Iconia tablet device
>> +      - enum:
>> +        - ene,kb930
>> +  reg:
>> +    maxItems: 1
>> +
>> +  monitored-battery: true
> 
> ^^^ this is not being used by your battery driver. Do you plan
> to use it in the future or is it a copy&paste mistake? :)

Hello, this is correct that driver doesn't use monitored-battery info,
but I was thinking that it's good to have anyways in the device-tree
because this completes hardware description + the gauge driver isn't
aware about maximal battery temperature. Hence it may become useful and
it doesn't hurt to have that additional information about battery cell.
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/mfd/ene-kb930.yaml b/Documentation/devicetree/bindings/mfd/ene-kb930.yaml
new file mode 100644
index 000000000000..635c8966ca22
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/ene-kb930.yaml
@@ -0,0 +1,66 @@ 
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mfd/ene-kb930.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: ENE KB930 Embedded Controller bindings
+
+description: |
+  This binding describes the ENE KB930 Embedded Controller attached to an
+  I2C bus.
+
+maintainers:
+  - Dmitry Osipenko <digetx@gmail.com>
+
+properties:
+  compatible:
+    items:
+      - enum:
+        - acer,a500-iconia-ec # Acer A500 Iconia tablet device
+      - enum:
+        - ene,kb930
+  reg:
+    maxItems: 1
+
+  monitored-battery: true
+  power-supplies: true
+  system-power-controller: true
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    battery: battery-cell {
+      compatible = "simple-battery";
+      charge-full-design-microamp-hours = <3260000>;
+      energy-full-design-microwatt-hours = <24000000>;
+      operating-range-celsius = <0 40>;
+    };
+
+    mains: ac-adapter {
+      compatible = "gpio-charger";
+      charger-type = "mains";
+      gpios = <&gpio 125 0>;
+    };
+
+    i2c {
+      #address-cells = <1>;
+      #size-cells = <0>;
+
+      embedded-controller@58 {
+        compatible = "acer,a500-iconia-ec", "ene,kb930";
+        reg = <0x58>;
+
+        system-power-controller;
+
+        monitored-battery = <&battery>;
+        power-supplies = <&mains>;
+      };
+    };
+
+...