linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: convert extcon-usbc-cros-ec.txt extcon-usbc-cros-ec.yaml
@ 2020-01-22 15:13 Dafna Hirschfeld
  2020-02-03 12:18 ` Rob Herring
  0 siblings, 1 reply; 3+ messages in thread
From: Dafna Hirschfeld @ 2020-01-22 15:13 UTC (permalink / raw)
  To: devicetree
  Cc: myungjoo.ham, cw00.choi, robh+dt, mark.rutland, bleung,
	enric.balletbo, groeck, linux-kernel, dafna.hirschfeld,
	helen.koike, ezequiel, kernel, dafna3

convert the binding file extcon-usbc-cros-ec.txt to yaml format
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@collabora.com>
---
 .../bindings/extcon/extcon-usbc-cros-ec.txt   | 24 -----------
 .../bindings/extcon/extcon-usbc-cros-ec.yaml  | 42 +++++++++++++++++++
 2 files changed, 42 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..78779831282a
--- /dev/null
+++ b/Documentation/devicetree/bindings/extcon/extcon-usbc-cros-ec.yaml
@@ -0,0 +1,42 @@
+# SPDX-License-Identifier: GPL-2.0
+%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:
+  - MyungJoo Ham <myungjoo.ham@samsung.com>
+  - Chanwoo Choi <cw00.choi@samsung.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:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description: |
+      the port id
+required:
+  - compatible
+  - google,usb-port-id
+
+additionalProperties: false
+
+examples:
+  - |
+    cros-ec@0 {
+        compatible = "google,cros-ec-i2c";
+        extcon {
+            compatible = "google,extcon-usbc-cros-ec";
+            google,usb-port-id = <0>;
+        };
+    };
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] dt-bindings: convert extcon-usbc-cros-ec.txt extcon-usbc-cros-ec.yaml
  2020-01-22 15:13 [PATCH] dt-bindings: convert extcon-usbc-cros-ec.txt extcon-usbc-cros-ec.yaml Dafna Hirschfeld
@ 2020-02-03 12:18 ` Rob Herring
  2020-02-04 15:38   ` Enric Balletbo i Serra
  0 siblings, 1 reply; 3+ messages in thread
From: Rob Herring @ 2020-02-03 12:18 UTC (permalink / raw)
  To: Dafna Hirschfeld
  Cc: devicetree, myungjoo.ham, cw00.choi, mark.rutland, bleung,
	enric.balletbo, groeck, linux-kernel, helen.koike, ezequiel,
	kernel, dafna3

On Wed, Jan 22, 2020 at 04:13:13PM +0100, Dafna Hirschfeld wrote:
> convert the binding file extcon-usbc-cros-ec.txt to yaml format
> 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@collabora.com>
> ---
>  .../bindings/extcon/extcon-usbc-cros-ec.txt   | 24 -----------
>  .../bindings/extcon/extcon-usbc-cros-ec.yaml  | 42 +++++++++++++++++++
>  2 files changed, 42 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..78779831282a
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/extcon/extcon-usbc-cros-ec.yaml
> @@ -0,0 +1,42 @@
> +# SPDX-License-Identifier: GPL-2.0

Surely Google is the only copyright holder on the old file and would be 
okay with dual licensing here?

> +%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:
> +  - MyungJoo Ham <myungjoo.ham@samsung.com>
> +  - Chanwoo Choi <cw00.choi@samsung.com>

Usually this is someone that knows the h/w, not who applies the patch. 
I'd expect a Google person.

> +
> +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:
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    description: |
> +      the port id

Any range of values allowed? ~0 is okay?

> +required:
> +  - compatible
> +  - google,usb-port-id
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    cros-ec@0 {
> +        compatible = "google,cros-ec-i2c";
> +        extcon {
> +            compatible = "google,extcon-usbc-cros-ec";
> +            google,usb-port-id = <0>;
> +        };
> +    };
> -- 
> 2.17.1
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] dt-bindings: convert extcon-usbc-cros-ec.txt extcon-usbc-cros-ec.yaml
  2020-02-03 12:18 ` Rob Herring
@ 2020-02-04 15:38   ` Enric Balletbo i Serra
  0 siblings, 0 replies; 3+ messages in thread
From: Enric Balletbo i Serra @ 2020-02-04 15:38 UTC (permalink / raw)
  To: Rob Herring, Dafna Hirschfeld
  Cc: devicetree, myungjoo.ham, cw00.choi, mark.rutland, bleung,
	groeck, linux-kernel, helen.koike, ezequiel, kernel, dafna3

Hi Dafna, Rob,

On 3/2/20 13:18, Rob Herring wrote:
> On Wed, Jan 22, 2020 at 04:13:13PM +0100, Dafna Hirschfeld wrote:
>> convert the binding file extcon-usbc-cros-ec.txt to yaml format
>> 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@collabora.com>
>> ---
>>  .../bindings/extcon/extcon-usbc-cros-ec.txt   | 24 -----------
>>  .../bindings/extcon/extcon-usbc-cros-ec.yaml  | 42 +++++++++++++++++++
>>  2 files changed, 42 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..78779831282a
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/extcon/extcon-usbc-cros-ec.yaml
>> @@ -0,0 +1,42 @@
>> +# SPDX-License-Identifier: GPL-2.0
> 
> Surely Google is the only copyright holder on the old file and would be 
> okay with dual licensing here?
> 
>> +%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:
>> +  - MyungJoo Ham <myungjoo.ham@samsung.com>
>> +  - Chanwoo Choi <cw00.choi@samsung.com>
> 
> Usually this is someone that knows the h/w, not who applies the patch. 
> I'd expect a Google person.
> 

I'd say that the driver author should be the maintainer, but if you don't know
who is the maintainer because is not specified you can add Benson and me as
maintainers (as chrome-platform maintainers we take care of this and all cros-ec
related drivers)

Benson Leung <bleung@chromium.org>
Enric Balletbo i Serra <enric.balletbo@collabora.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:
>> +    $ref: /schemas/types.yaml#/definitions/uint32
>> +    description: |
>> +      the port id
> 
> Any range of values allowed? ~0 is okay?
> 

From hardware point of view, the port id, is a number from 0 to 255. The typical
usage is have two ports with port id 0 and port id 1.


>> +required:
>> +  - compatible
>> +  - google,usb-port-id
>> +
>> +additionalProperties: false
>> +
>> +examples:
>> +  - |
>> +    cros-ec@0 {
>> +        compatible = "google,cros-ec-i2c";
>> +        extcon {
>> +            compatible = "google,extcon-usbc-cros-ec";
>> +            google,usb-port-id = <0>;
>> +        };
>> +    };
>> -- 
>> 2.17.1
>>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-02-04 15:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-22 15:13 [PATCH] dt-bindings: convert extcon-usbc-cros-ec.txt extcon-usbc-cros-ec.yaml Dafna Hirschfeld
2020-02-03 12:18 ` Rob Herring
2020-02-04 15:38   ` Enric Balletbo i Serra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).