lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210409185044.GA3946207@robh.at.kernel.org>
Date:   Fri, 9 Apr 2021 13:50:44 -0500
From:   Rob Herring <robh@...nel.org>
To:     satya priya <skakit@...eaurora.org>
Cc:     Dmitry Torokhov <dmitry.torokhov@...il.com>,
        Andy Gross <agross@...nel.org>,
        Bjorn Andersson <bjorn.andersson@...aro.org>,
        Sebastian Reichel <sre@...nel.org>,
        David Collins <collinsd@...eaurora.org>, kgunda@...eaurora.org,
        Vinod Koul <vkoul@...nel.org>,
        Courtney Cavin <courtney.cavin@...ymobile.com>,
        linux-input@...r.kernel.org, linux-kernel@...r.kernel.org,
        devicetree@...r.kernel.org, linux-arm-msm@...r.kernel.org,
        linux-pm@...r.kernel.org
Subject: Re: [PATCH V2 4/4] dt-bindings: input: pm8941-pwrkey: Convert pm8941
 power key binding to yaml

On Thu, Apr 08, 2021 at 05:01:09PM +0530, satya priya wrote:
> Convert qcom pm8941 power key binding from .txt to .yaml format.
> 
> Signed-off-by: satya priya <skakit@...eaurora.org>
> ---
> Changes in V2:
>  - Fixed bot errors, took reference from input.yaml for "linux,code"
>  - Added one complete example for powerkey and resin, and referenced it
>    in main PON binding.
>  - Moved this patch to the end of the series.
> 
>  .../bindings/input/qcom,pm8941-pwrkey.txt          | 55 --------------
>  .../bindings/input/qcom,pm8941-pwrkey.yaml         | 88 ++++++++++++++++++++++
>  2 files changed, 88 insertions(+), 55 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.txt
>  create mode 100644 Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.yaml


> 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..fb6cbe8
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.yaml
> @@ -0,0 +1,88 @@
> +# 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@...ymobile.com>
> +  - Vinod Koul <vkoul@...nel.org>
> +
> +properties:
> +  compatible:
> +    enum:
> +      - qcom,pm8941-pwrkey
> +      - qcom,pm8941-resin
> +      - qcom,pmk8350-pwrkey
> +      - qcom,pmk8350-resin
> +
> +  interrupts:

How many?

> +    description: |
> +          Key change interrupt; The format of the specifier is
> +          defined by the binding document describing the node's
> +          interrupt parent.

The 2nd sentence is every 'interrupts' property. Drop.

> +
> +  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: "input.yaml#"

You've just defined that 'linux,code' is a node with properties defined 
in input.yaml. Need to move this up to the top level.

> +
> +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@...0000 {
> +     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@...0 {
> +         reg = <0x1300>;
> +         compatible = "qcom,pm8998-pon";
> +
> +         pwrkey {
> +            compatible = "qcom,pm8941-pwrkey";
> +            interrupts = < 0x0 0x8 0 IRQ_TYPE_EDGE_BOTH >;
> +            debounce = <15625>;
> +            bias-pull-up;
> +            linux,code = <KEY_POWER>;
> +         };
> +
> +         resin {
> +            compatible = "qcom,pm8941-resin";
> +            interrupts = <0x0 0x8 1 IRQ_TYPE_EDGE_BOTH>;
> +            debounce = <15625>;
> +            bias-pull-up;
> +            linux,code = <KEY_VOLUMEDOWN>;
> +         };
> +       };
> +     };
> +   };
> +...
> -- 
> QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member 
> of Code Aurora Forum, hosted by The Linux Foundation
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ