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: <f01756ae-d66b-f7e1-2aaf-b554426dd6c1@collabora.com>
Date:   Wed, 12 Feb 2020 17:55:51 +0100
From:   Enric Balletbo i Serra <enric.balletbo@...labora.com>
To:     Dafna Hirschfeld <dafna.hirschfeld@...labora.com>,
        devicetree@...r.kernel.org
Cc:     myungjoo.ham@...sung.com, cw00.choi@...sung.com,
        robh+dt@...nel.org, mark.rutland@....com, bleung@...omium.org,
        groeck@...omium.org, linux-kernel@...r.kernel.org,
        helen.koike@...labora.com, ezequiel@...labora.com,
        kernel@...labora.com, dafna3@...il.com
Subject: Re: [PATCH v3] dt-bindings: extcon: usbc-cros-ec: convert
 extcon-usbc-cros-ec.txt to yaml format

Hi Dafna,

On 12/2/20 16:51, Dafna Hirschfeld wrote:
> convert the binding file extcon-usbc-cros-ec.txt to
> yaml format extcon-usbc-cros-ec.yaml
> 
> This was tested and verified on ARM with:
> make dt_binding_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/extcon/extcon-usbc-cros-ec.yaml
> make dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/extcon/extcon-usbc-cros-ec.yaml
> 
> Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@...labora.com>
> ---
> Changes since v1:
> 1 - changing the license to (GPL-2.0-only OR BSD-2-Clause)
> 2 - changing the maintainers
> 3 - changing the google,usb-port-id property to have minimum 0 and maximum 255
> 
> Changes since v2:
> 1 - Changing the patch subject to start with "dt-bindings: extcon: usbc-cros-ec:"
> 2 - In the example, adding a parent isp node, a reg field to cros-ec@0
> and adding nodes 'extcon0/1' instead of one node 'extcon'.
> 
>  .../bindings/extcon/extcon-usbc-cros-ec.txt   | 24 --------
>  .../bindings/extcon/extcon-usbc-cros-ec.yaml  | 56 +++++++++++++++++++
>  2 files changed, 56 insertions(+), 24 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/extcon/extcon-usbc-cros-ec.txt
>  create mode 100644 Documentation/devicetree/bindings/extcon/extcon-usbc-cros-ec.yaml
> 
> diff --git a/Documentation/devicetree/bindings/extcon/extcon-usbc-cros-ec.txt b/Documentation/devicetree/bindings/extcon/extcon-usbc-cros-ec.txt
> deleted file mode 100644
> index 8e8625c00dfa..000000000000
> --- a/Documentation/devicetree/bindings/extcon/extcon-usbc-cros-ec.txt
> +++ /dev/null
> @@ -1,24 +0,0 @@
> -ChromeOS EC USB Type-C cable and accessories detection
> -
> -On ChromeOS systems with USB Type C ports, the ChromeOS Embedded Controller is
> -able to detect the state of external accessories such as display adapters
> -or USB devices when said accessories are attached or detached.
> -
> -The node for this device must be under a cros-ec node like google,cros-ec-spi
> -or google,cros-ec-i2c.
> -
> -Required properties:
> -- compatible:		Should be "google,extcon-usbc-cros-ec".
> -- google,usb-port-id:	Specifies the USB port ID to use.
> -
> -Example:
> -	cros-ec@0 {
> -		compatible = "google,cros-ec-i2c";
> -
> -		...
> -
> -		extcon {
> -			compatible = "google,extcon-usbc-cros-ec";
> -			google,usb-port-id = <0>;
> -		};
> -	}
> diff --git a/Documentation/devicetree/bindings/extcon/extcon-usbc-cros-ec.yaml b/Documentation/devicetree/bindings/extcon/extcon-usbc-cros-ec.yaml
> new file mode 100644
> index 000000000000..d7a2fc544c4d
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/extcon/extcon-usbc-cros-ec.yaml
> @@ -0,0 +1,56 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/extcon/extcon-usbc-cros-ec.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: ChromeOS EC USB Type-C cable and accessories detection
> +
> +maintainers:
> +  - Benson Leung <bleung@...omium.org>
> +  - Enric Balletbo i Serra <enric.balletbo@...labora.com>
> +
> +description: |
> +  On ChromeOS systems with USB Type C ports, the ChromeOS Embedded Controller is
> +  able to detect the state of external accessories such as display adapters
> +  or USB devices when said accessories are attached or detached.
> +  The node for this device must be under a cros-ec node like google,cros-ec-spi
> +  or google,cros-ec-i2c.
> +
> +properties:
> +  compatible:
> +    const: google,extcon-usbc-cros-ec
> +
> +  google,usb-port-id:
> +    allOf:
> +      - $ref: /schemas/types.yaml#/definitions/uint32
> +    description: the port id
> +    minimum: 0
> +    maximum: 255
> +
> +required:
> +  - compatible
> +  - google,usb-port-id
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    isp1 {

I think you mean 'spi' here ( spi0 or spi1 )?

With that fixed,

Reviewed-by: Enric Balletbo i Serra <enric.balletbo@...labora.com>

> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +        cros-ec@0 {
> +            compatible = "google,cros-ec-spi";
> +            reg = <0>;
> +
> +            usbc_extcon0: extcon0 {
> +                compatible = "google,extcon-usbc-cros-ec";
> +                google,usb-port-id = <0>;
> +            };
> +
> +            usbc_extcon1: extcon1 {
> +                compatible = "google,extcon-usbc-cros-ec";
> +                google,usb-port-id = <1>;
> +            };
> +        };
> +    };
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ