Message ID | 1614922721-1390-3-git-send-email-skakit@codeaurora.org (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | Add support for PMK8350 PON_HLOS PMIC peripheral | expand |
On Fri, 05 Mar 2021 11:08:40 +0530, satya priya wrote: > Convert power key bindings from .txt to .yaml format. > > Signed-off-by: satya priya <skakit@codeaurora.org> > --- > .../bindings/input/qcom,pm8941-pwrkey.txt | 53 --------------- > .../bindings/input/qcom,pm8941-pwrkey.yaml | 76 ++++++++++++++++++++++ > 2 files changed, 76 insertions(+), 53 deletions(-) > delete mode 100644 Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.txt > create mode 100644 Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.yaml > My bot found errors running 'make dt_binding_check' on your patch: yamllint warnings/errors: ./Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.yaml:10:2: [warning] wrong indentation: expected 2 but found 1 (indentation) ./Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.yaml:46:2: [warning] wrong indentation: expected 2 but found 1 (indentation) ./Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.yaml:52:2: [warning] wrong indentation: expected 2 but found 1 (indentation) dtschema/dtc warnings/errors: See https://patchwork.ozlabs.org/patch/1447638 This check can fail if there are any dependencies. The base for a patch series is generally the most recent rc1. If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date: pip3 install dtschema --upgrade Please check and re-submit.
On Fri, Mar 05, 2021 at 11:08:40AM +0530, satya priya wrote: > Convert power key bindings from .txt to .yaml format. > > Signed-off-by: satya priya <skakit@codeaurora.org> > --- > .../bindings/input/qcom,pm8941-pwrkey.txt | 53 --------------- > .../bindings/input/qcom,pm8941-pwrkey.yaml | 76 ++++++++++++++++++++++ > 2 files changed, 76 insertions(+), 53 deletions(-) > delete mode 100644 Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.txt > create mode 100644 Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.yaml You need to convert the main pm8941 binding first if not done already and then reference this binding from it. And let's have 1 complete example instead of fragments. > > diff --git a/Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.txt b/Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.txt > deleted file mode 100644 > index 34ab576..0000000 > --- a/Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.txt > +++ /dev/null > @@ -1,53 +0,0 @@ > -Qualcomm PM8941 PMIC Power Key > - > -PROPERTIES > - > -- compatible: > - Usage: required > - Value type: <string> > - Definition: must be one of: > - "qcom,pm8941-pwrkey" > - "qcom,pm8941-resin" > - > -- reg: > - Usage: required > - Value type: <prop-encoded-array> > - Definition: base address of registers for block > - > -- interrupts: > - Usage: required > - Value type: <prop-encoded-array> > - Definition: key change interrupt; The format of the specifier is > - defined by the binding document describing the node's > - interrupt parent. > - > -- debounce: > - Usage: optional > - Value type: <u32> > - Definition: time in microseconds that key must be pressed or released > - for state change interrupt to trigger. > - > -- bias-pull-up: > - Usage: optional > - Value type: <empty> > - Definition: presence of this property indicates that the KPDPWR_N pin > - should be configured for pull up. > - > -- linux,code: > - Usage: optional > - Value type: <u32> > - Definition: The input key-code associated with the power key. > - Use the linux event codes defined in > - include/dt-bindings/input/linux-event-codes.h > - When property is omitted KEY_POWER is assumed. > - > -EXAMPLE > - > - pwrkey@800 { > - compatible = "qcom,pm8941-pwrkey"; > - reg = <0x800>; > - interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>; > - debounce = <15625>; > - bias-pull-up; > - linux,code = <KEY_POWER>; > - }; > diff --git a/Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.yaml b/Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.yaml > new file mode 100644 > index 0000000..302866d > --- /dev/null > +++ b/Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.yaml > @@ -0,0 +1,76 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/input/qcom,pm8941-pwrkey.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Qualcomm PM8941 PMIC Power Key > + > +maintainers: > + - Courtney Cavin <courtney.cavin@sonymobile.com> > + - Vinod Koul <vkoul@kernel.org> > + > +properties: > + compatible: > + enum: > + - qcom,pm8941-pwrkey > + - qcom,pm8941-resin > + > + interrupts: > + description: | > + Key change interrupt; The format of the specifier is > + defined by the binding document describing the node's > + interrupt parent. > + > + debounce: > + description: | > + Time in microseconds that key must be pressed or > + released for state change interrupt to trigger. > + $ref: /schemas/types.yaml#/definitions/uint32 > + > + bias-pull-up: > + description: | > + Presence of this property indicates that the KPDPWR_N > + pin should be configured for pull up. > + $ref: /schemas/types.yaml#/definitions/flag > + > + linux,code: > + description: | > + The input key-code associated with the power key. > + Use the linux event codes defined in > + include/dt-bindings/input/linux-event-codes.h > + When property is omitted KEY_POWER is assumed. > + $ref: /schemas/types.yaml#/definitions/uint32 Already has a type definition. Need to reference input.yaml. > + > +required: > + - compatible > + - interrupts > + > +additionalProperties: false > + > +examples: > + - | > + #include <dt-bindings/interrupt-controller/irq.h> > + #include <dt-bindings/input/linux-event-codes.h> > + #include <dt-bindings/spmi/spmi.h> > + spmi_bus: spmi@c440000 { > + reg = <0x0c440000 0x1100>; > + #address-cells = <2>; > + #size-cells = <0>; > + pmk8350: pmic@0 { > + reg = <0x0 SPMI_USID>; > + #address-cells = <1>; > + #size-cells = <0>; > + pmk8350_pon: pon_hlos@1300 { > + reg = <0x1300>; > + pwrkey { > + compatible = "qcom,pm8941-pwrkey"; > + interrupts = < 0x0 0x8 0 IRQ_TYPE_EDGE_BOTH >; > + debounce = <15625>; > + bias-pull-up; > + linux,code = <KEY_POWER>; > + }; > + }; > + }; > + }; > +... > -- > QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member > of Code Aurora Forum, hosted by The Linux Foundation >
Hi Rob, On 2021-03-05 20:10, Rob Herring wrote: > On Fri, Mar 05, 2021 at 11:08:40AM +0530, satya priya wrote: >> Convert power key bindings from .txt to .yaml format. >> >> Signed-off-by: satya priya <skakit@codeaurora.org> >> --- >> .../bindings/input/qcom,pm8941-pwrkey.txt | 53 >> --------------- >> .../bindings/input/qcom,pm8941-pwrkey.yaml | 76 >> ++++++++++++++++++++++ >> 2 files changed, 76 insertions(+), 53 deletions(-) >> delete mode 100644 >> Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.txt >> create mode 100644 >> Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.yaml > > You need to convert the main pm8941 binding first if not done already > and then reference this binding from it. > Okay. > And let's have 1 complete example instead of fragments. > Sure. >> >> diff --git >> a/Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.txt >> b/Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.txt >> deleted file mode 100644 >> index 34ab576..0000000 >> --- a/Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.txt >> +++ /dev/null >> @@ -1,53 +0,0 @@ >> -Qualcomm PM8941 PMIC Power Key >> - >> -PROPERTIES >> - >> -- compatible: >> - Usage: required >> - Value type: <string> >> - Definition: must be one of: >> - "qcom,pm8941-pwrkey" >> - "qcom,pm8941-resin" >> - >> -- reg: >> - Usage: required >> - Value type: <prop-encoded-array> >> - Definition: base address of registers for block >> - >> -- interrupts: >> - Usage: required >> - Value type: <prop-encoded-array> >> - Definition: key change interrupt; The format of the specifier is >> - defined by the binding document describing the node's >> - interrupt parent. >> - >> -- debounce: >> - Usage: optional >> - Value type: <u32> >> - Definition: time in microseconds that key must be pressed or >> released >> - for state change interrupt to trigger. >> - >> -- bias-pull-up: >> - Usage: optional >> - Value type: <empty> >> - Definition: presence of this property indicates that the KPDPWR_N >> pin >> - should be configured for pull up. >> - >> -- linux,code: >> - Usage: optional >> - Value type: <u32> >> - Definition: The input key-code associated with the power key. >> - Use the linux event codes defined in >> - include/dt-bindings/input/linux-event-codes.h >> - When property is omitted KEY_POWER is assumed. >> - >> -EXAMPLE >> - >> - pwrkey@800 { >> - compatible = "qcom,pm8941-pwrkey"; >> - reg = <0x800>; >> - interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>; >> - debounce = <15625>; >> - bias-pull-up; >> - linux,code = <KEY_POWER>; >> - }; >> diff --git >> a/Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.yaml >> b/Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.yaml >> new file mode 100644 >> index 0000000..302866d >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.yaml >> @@ -0,0 +1,76 @@ >> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) >> +%YAML 1.2 >> +--- >> +$id: http://devicetree.org/schemas/input/qcom,pm8941-pwrkey.yaml# >> +$schema: http://devicetree.org/meta-schemas/core.yaml# >> + >> +title: Qualcomm PM8941 PMIC Power Key >> + >> +maintainers: >> + - Courtney Cavin <courtney.cavin@sonymobile.com> >> + - Vinod Koul <vkoul@kernel.org> >> + >> +properties: >> + compatible: >> + enum: >> + - qcom,pm8941-pwrkey >> + - qcom,pm8941-resin >> + >> + interrupts: >> + description: | >> + Key change interrupt; The format of the specifier is >> + defined by the binding document describing the node's >> + interrupt parent. >> + >> + debounce: >> + description: | >> + Time in microseconds that key must be pressed or >> + released for state change interrupt to trigger. >> + $ref: /schemas/types.yaml#/definitions/uint32 >> + >> + bias-pull-up: >> + description: | >> + Presence of this property indicates that the KPDPWR_N >> + pin should be configured for pull up. >> + $ref: /schemas/types.yaml#/definitions/flag >> + >> + linux,code: >> + description: | >> + The input key-code associated with the power key. >> + Use the linux event codes defined in >> + include/dt-bindings/input/linux-event-codes.h >> + When property is omitted KEY_POWER is assumed. >> + $ref: /schemas/types.yaml#/definitions/uint32 > > Already has a type definition. Need to reference input.yaml. > Okay. >> + >> +required: >> + - compatible >> + - interrupts >> + >> +additionalProperties: false >> + >> +examples: >> + - | >> + #include <dt-bindings/interrupt-controller/irq.h> >> + #include <dt-bindings/input/linux-event-codes.h> >> + #include <dt-bindings/spmi/spmi.h> >> + spmi_bus: spmi@c440000 { >> + reg = <0x0c440000 0x1100>; >> + #address-cells = <2>; >> + #size-cells = <0>; >> + pmk8350: pmic@0 { >> + reg = <0x0 SPMI_USID>; >> + #address-cells = <1>; >> + #size-cells = <0>; >> + pmk8350_pon: pon_hlos@1300 { >> + reg = <0x1300>; >> + pwrkey { >> + compatible = "qcom,pm8941-pwrkey"; >> + interrupts = < 0x0 0x8 0 IRQ_TYPE_EDGE_BOTH >; >> + debounce = <15625>; >> + bias-pull-up; >> + linux,code = <KEY_POWER>; >> + }; >> + }; >> + }; >> + }; >> +... >> -- >> QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a >> member >> of Code Aurora Forum, hosted by The Linux Foundation >>
diff --git a/Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.txt b/Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.txt deleted file mode 100644 index 34ab576..0000000 --- a/Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.txt +++ /dev/null @@ -1,53 +0,0 @@ -Qualcomm PM8941 PMIC Power Key - -PROPERTIES - -- compatible: - Usage: required - Value type: <string> - Definition: must be one of: - "qcom,pm8941-pwrkey" - "qcom,pm8941-resin" - -- reg: - Usage: required - Value type: <prop-encoded-array> - Definition: base address of registers for block - -- interrupts: - Usage: required - Value type: <prop-encoded-array> - Definition: key change interrupt; The format of the specifier is - defined by the binding document describing the node's - interrupt parent. - -- debounce: - Usage: optional - Value type: <u32> - Definition: time in microseconds that key must be pressed or released - for state change interrupt to trigger. - -- bias-pull-up: - Usage: optional - Value type: <empty> - Definition: presence of this property indicates that the KPDPWR_N pin - should be configured for pull up. - -- linux,code: - Usage: optional - Value type: <u32> - Definition: The input key-code associated with the power key. - Use the linux event codes defined in - include/dt-bindings/input/linux-event-codes.h - When property is omitted KEY_POWER is assumed. - -EXAMPLE - - pwrkey@800 { - compatible = "qcom,pm8941-pwrkey"; - reg = <0x800>; - interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>; - debounce = <15625>; - bias-pull-up; - linux,code = <KEY_POWER>; - }; diff --git a/Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.yaml b/Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.yaml new file mode 100644 index 0000000..302866d --- /dev/null +++ b/Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.yaml @@ -0,0 +1,76 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/input/qcom,pm8941-pwrkey.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm PM8941 PMIC Power Key + +maintainers: + - Courtney Cavin <courtney.cavin@sonymobile.com> + - Vinod Koul <vkoul@kernel.org> + +properties: + compatible: + enum: + - qcom,pm8941-pwrkey + - qcom,pm8941-resin + + interrupts: + description: | + Key change interrupt; The format of the specifier is + defined by the binding document describing the node's + interrupt parent. + + debounce: + description: | + Time in microseconds that key must be pressed or + released for state change interrupt to trigger. + $ref: /schemas/types.yaml#/definitions/uint32 + + bias-pull-up: + description: | + Presence of this property indicates that the KPDPWR_N + pin should be configured for pull up. + $ref: /schemas/types.yaml#/definitions/flag + + linux,code: + description: | + The input key-code associated with the power key. + Use the linux event codes defined in + include/dt-bindings/input/linux-event-codes.h + When property is omitted KEY_POWER is assumed. + $ref: /schemas/types.yaml#/definitions/uint32 + +required: + - compatible + - interrupts + +additionalProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/irq.h> + #include <dt-bindings/input/linux-event-codes.h> + #include <dt-bindings/spmi/spmi.h> + spmi_bus: spmi@c440000 { + reg = <0x0c440000 0x1100>; + #address-cells = <2>; + #size-cells = <0>; + pmk8350: pmic@0 { + reg = <0x0 SPMI_USID>; + #address-cells = <1>; + #size-cells = <0>; + pmk8350_pon: pon_hlos@1300 { + reg = <0x1300>; + pwrkey { + compatible = "qcom,pm8941-pwrkey"; + interrupts = < 0x0 0x8 0 IRQ_TYPE_EDGE_BOTH >; + debounce = <15625>; + bias-pull-up; + linux,code = <KEY_POWER>; + }; + }; + }; + }; +...
Convert power key bindings from .txt to .yaml format. Signed-off-by: satya priya <skakit@codeaurora.org> --- .../bindings/input/qcom,pm8941-pwrkey.txt | 53 --------------- .../bindings/input/qcom,pm8941-pwrkey.yaml | 76 ++++++++++++++++++++++ 2 files changed, 76 insertions(+), 53 deletions(-) delete mode 100644 Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.txt create mode 100644 Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.yaml