Message ID | 1600859910-15855-1-git-send-email-gene.chen.richtek@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/2] dt-bindings: power: Add bindings document for Charger support on MT6360 PMIC | expand |
On Wed, Sep 23, 2020 at 07:18:29PM +0800, Gene Chen wrote: > From: Gene Chen <gene_chen@richtek.com> > > Add bindings document for Charger support on MT6360 PMIC > > Signed-off-by: Gene Chen <gene_chen@richtek.com> > --- > .../bindings/power/supply/mt6360_charger.yaml | 44 ++++++++++++++++++++++ > 1 file changed, 44 insertions(+) > create mode 100644 Documentation/devicetree/bindings/power/supply/mt6360_charger.yaml > > diff --git a/Documentation/devicetree/bindings/power/supply/mt6360_charger.yaml b/Documentation/devicetree/bindings/power/supply/mt6360_charger.yaml > new file mode 100644 > index 0000000..711fc19 > --- /dev/null > +++ b/Documentation/devicetree/bindings/power/supply/mt6360_charger.yaml > @@ -0,0 +1,44 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/power/supply/mt6360_charger.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Battery charger driver for MT6360 PMIC from MediaTek Integrated. > + > +maintainers: > + - Gene Chen <gene_chen@richtek.com> > + > +description: | > + This module is part of the MT6360 MFD device. > + Provides Battery Charger, Boost for OTG devices and BC1.2 detection. > + > +properties: > + compatible: > + const: mediatek,mt6360-chg > + > + vinovp: > + description: > + Maximum CHGIN regulation voltage. 1. You need to describe the type. 2. Use proper unit suffix (see property-units.txt). 3. Is this a custom property? If yes, it misses vendor prefix. If not, most likely there is already such property. Reuse. > + > + usb-otg-vbus: > + $ref: /schemas/regulator/regulator.yaml# 1. Wrong indentation. 2. Name should be more or less generic, so maybe "usb-otg-vbus-regulator". > + > +required: > + - compatible No address/reg? How does it bind? > + > +additionalProperties: false > + > +examples: > + - | > + mt6360_chg: chg { s/chg/charger/ > + compatible = "mediatek,mt6360-chg"; > + vinovp = <14500000>; Empty line break Best regards, Krzysztof
Krzysztof Kozlowski <krzk@kernel.org> 於 2020年10月16日 週五 下午11:38寫道: > > On Wed, Sep 23, 2020 at 07:18:29PM +0800, Gene Chen wrote: > > From: Gene Chen <gene_chen@richtek.com> > > > > Add bindings document for Charger support on MT6360 PMIC > > > > Signed-off-by: Gene Chen <gene_chen@richtek.com> > > --- > > .../bindings/power/supply/mt6360_charger.yaml | 44 ++++++++++++++++++++++ > > 1 file changed, 44 insertions(+) > > create mode 100644 Documentation/devicetree/bindings/power/supply/mt6360_charger.yaml > > > > diff --git a/Documentation/devicetree/bindings/power/supply/mt6360_charger.yaml b/Documentation/devicetree/bindings/power/supply/mt6360_charger.yaml > > new file mode 100644 > > index 0000000..711fc19 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/power/supply/mt6360_charger.yaml > > @@ -0,0 +1,44 @@ > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > +%YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/power/supply/mt6360_charger.yaml# > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: Battery charger driver for MT6360 PMIC from MediaTek Integrated. > > + > > +maintainers: > > + - Gene Chen <gene_chen@richtek.com> > > + > > +description: | > > + This module is part of the MT6360 MFD device. > > + Provides Battery Charger, Boost for OTG devices and BC1.2 detection. > > + > > +properties: > > + compatible: > > + const: mediatek,mt6360-chg > > + > > + vinovp: > > + description: > > + Maximum CHGIN regulation voltage. > > 1. You need to describe the type. > 2. Use proper unit suffix (see property-units.txt). > 3. Is this a custom property? If yes, it misses vendor prefix. If not, > most likely there is already such property. Reuse. > ACK > > + > > + usb-otg-vbus: > > + $ref: /schemas/regulator/regulator.yaml# > > 1. Wrong indentation. > 2. Name should be more or less generic, so maybe > "usb-otg-vbus-regulator". > ACK > > + > > +required: > > + - compatible > > No address/reg? How does it bind? > This module is part of the MT6360 MFD device. see Documentation/devicetree/bindings/mfd/mt6360.yaml, which is reviewing by MFD reviewer. Should I add this to description? > > + > > +additionalProperties: false > > + > > +examples: > > + - | > > + mt6360_chg: chg { > > s/chg/charger/ > ACK > > + compatible = "mediatek,mt6360-chg"; > > + vinovp = <14500000>; > > Empty line break > ACK > Best regards, > Krzysztof
diff --git a/Documentation/devicetree/bindings/power/supply/mt6360_charger.yaml b/Documentation/devicetree/bindings/power/supply/mt6360_charger.yaml new file mode 100644 index 0000000..711fc19 --- /dev/null +++ b/Documentation/devicetree/bindings/power/supply/mt6360_charger.yaml @@ -0,0 +1,44 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/power/supply/mt6360_charger.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Battery charger driver for MT6360 PMIC from MediaTek Integrated. + +maintainers: + - Gene Chen <gene_chen@richtek.com> + +description: | + This module is part of the MT6360 MFD device. + Provides Battery Charger, Boost for OTG devices and BC1.2 detection. + +properties: + compatible: + const: mediatek,mt6360-chg + + vinovp: + description: + Maximum CHGIN regulation voltage. + + usb-otg-vbus: + $ref: /schemas/regulator/regulator.yaml# + +required: + - compatible + +additionalProperties: false + +examples: + - | + mt6360_chg: chg { + compatible = "mediatek,mt6360-chg"; + vinovp = <14500000>; + otg_vbus: usb-otg-vbus { + regulator-compatible = "usb-otg-vbus"; + regulator-name = "usb-otg-vbus"; + regulator-min-microvolt = <4425000>; + regulator-max-microvolt = <5825000>; + }; + }; +...