lkml.org 
[lkml]   [2021]   [Mar]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCHv2 10/38] dt-bindings: power: supply: sbs-charger: Convert to DT schema format
    Date
    Convert the binding to DT schema format.

    Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
    ---
    .../power/supply/sbs,sbs-charger.yaml | 55 +++++++++++++++++++
    .../bindings/power/supply/sbs_sbs-charger.txt | 21 -------
    2 files changed, 55 insertions(+), 21 deletions(-)
    create mode 100644 Documentation/devicetree/bindings/power/supply/sbs,sbs-charger.yaml
    delete mode 100644 Documentation/devicetree/bindings/power/supply/sbs_sbs-charger.txt

    diff --git a/Documentation/devicetree/bindings/power/supply/sbs,sbs-charger.yaml b/Documentation/devicetree/bindings/power/supply/sbs,sbs-charger.yaml
    new file mode 100644
    index 000000000000..cb73ffa4778e
    --- /dev/null
    +++ b/Documentation/devicetree/bindings/power/supply/sbs,sbs-charger.yaml
    @@ -0,0 +1,55 @@
    +# SPDX-License-Identifier: GPL-2.0
    +%YAML 1.2
    +---
    +$id: http://devicetree.org/schemas/power/supply/sbs,sbs-charger.yaml#
    +$schema: http://devicetree.org/meta-schemas/core.yaml#
    +
    +title: SBS compliant charger
    +
    +maintainers:
    + - Sebastian Reichel <sre@kernel.org>
    +
    +description: |
    + Charger compatible with the smart battery system specifications
    +
    +allOf:
    + - $ref: power-supply.yaml#
    +
    +properties:
    + compatible:
    + oneOf:
    + - items:
    + - enum:
    + - lltc,ltc4100
    + - enum:
    + - sbs,sbs-charger
    + - items:
    + - const: sbs,sbs-charger
    +
    + reg:
    + maxItems: 1
    +
    + interrupts:
    + maxItems: 1
    +
    +required:
    + - compatible
    + - reg
    +
    +additionalProperties: false
    +
    +examples:
    + - |
    + #include <dt-bindings/interrupt-controller/irq.h>
    +
    + i2c {
    + #address-cells = <1>;
    + #size-cells = <0>;
    +
    + charger@9 {
    + compatible = "lltc,ltc4100", "sbs,sbs-charger";
    + reg = <0x9>;
    + interrupt-parent = <&gpio6>;
    + interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
    + };
    + };
    diff --git a/Documentation/devicetree/bindings/power/supply/sbs_sbs-charger.txt b/Documentation/devicetree/bindings/power/supply/sbs_sbs-charger.txt
    deleted file mode 100644
    index 84e74151eef2..000000000000
    --- a/Documentation/devicetree/bindings/power/supply/sbs_sbs-charger.txt
    +++ /dev/null
    @@ -1,21 +0,0 @@
    -SBS sbs-charger
    -~~~~~~~~~~
    -
    -Required properties:
    - - compatible: "<vendor>,<part-number>", "sbs,sbs-charger" as fallback. The part
    - number compatible string might be used in order to take care of vendor
    - specific registers.
    -
    -Optional properties:
    -- interrupts: Interrupt mapping for GPIO IRQ. Use in conjunction with
    - "interrupt-parent". If an interrupt is not provided the driver will switch
    - automatically to polling.
    -
    -Example:
    -
    - ltc4100@9 {
    - compatible = "lltc,ltc4100", "sbs,sbs-charger";
    - reg = <0x9>;
    - interrupt-parent = <&gpio6>;
    - interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
    - };
    --
    2.30.2
    \
     
     \ /
      Last update: 2021-03-17 14:52    [W:4.618 / U:0.648 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site