Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp86080ybv; Tue, 18 Feb 2020 18:21:44 -0800 (PST) X-Google-Smtp-Source: APXvYqwxOaF8zmM0ULFVazzIRpUGjPCFdU3kC1G3VDGs+ZhsM+BPyu2Z9Iqy+EVj8aX91Qf7rhDl X-Received: by 2002:aca:b7c5:: with SMTP id h188mr3272404oif.100.1582078904559; Tue, 18 Feb 2020 18:21:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582078904; cv=none; d=google.com; s=arc-20160816; b=ZzJFHwgUDSHNrVt5FbZowmKz54User+3zwuqjjkw2LwE1VH9Ak5dbOmvi3y6UHB4oR 8Eae88FBxfR9bWlRCmn5u9RSWbRsL7ZMvMxs+RpPbRlYDlXcjw4C58MIwCBjfVrNKsmI Wx9CYzc4HqwYB/tDpN+nnDj/e37RC4wXo+3D0QsnuRclcDycWC7LNBKo5t1lAG3nM+HN ZabD+CNOEvT2eLbioG500Tq13rpODtybOrpDHlcQgdrGkbVdtZt2MbsV/lR4wXAQWCOA YFoIa4VCP3iMmL2vxgLQ6lF0/8nX1xfrZTHaHzZrJgywUx8MFxIHPBknb80SZFcgLkmN 64jQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=bolHDojD99T1+N1njFL1pEMnGJDXERdQZnl3NzRKXQo=; b=D6fEV6hBbl17k3qN7H6Ly82nBDc4QMEQVTHV92hjwLNv+j/fKVfu87c4fKJL9HTEIH 5Ef3thkQdseMrzOSHDWrb7rshjTjdli5WYpeHrhFNbfGT5K0Gz50oLjovhhDXBWgUzCE jmP7X9eLajTIhyLXttorszdWvSSNZqwofjiaZ5GFpKxC3O9/ujPXWSoef7clUc0j59bC //feVXuk9+CnvGz1j2+hkRTQAL86daVF/A1SPb+EW9rX38ziUqIvFjchzgT2f9PnVw/R +oBuWhlXNcYz/Eg4WIvSW4E9qWBf3hY07UwTwZEc60HDATE4nA/Hd+nE4tigm6CBpvAm k7LA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=J4lXXwO4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c5si456544ots.233.2020.02.18.18.21.32; Tue, 18 Feb 2020 18:21:44 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=J4lXXwO4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727933AbgBSCUf (ORCPT + 99 others); Tue, 18 Feb 2020 21:20:35 -0500 Received: from mail.kernel.org ([198.145.29.99]:50486 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726768AbgBSCUf (ORCPT ); Tue, 18 Feb 2020 21:20:35 -0500 Received: from mail-qv1-f50.google.com (mail-qv1-f50.google.com [209.85.219.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 068C624656; Wed, 19 Feb 2020 02:20:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582078834; bh=PukdpJhhjgYuAnS+LZqnItKFXpPSM7F0J1SE58D5GOU=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=J4lXXwO4SG3sg/Vjn3QtQ8n6He791ZtltltY8C9Epz8Ev7O+ItEwRyZoilVbAkbVI ZuEC0tJX6L3mi9N7G5Yif6uwcbZC+mPeNJEOEg4Y1rAdYE70I1qXIVko6LiJ7E+11B 1sTqa+CltotDgvP+ukaB1tlX38y4z5pWwb8JVHVg= Received: by mail-qv1-f50.google.com with SMTP id g6so10155202qvy.5; Tue, 18 Feb 2020 18:20:33 -0800 (PST) X-Gm-Message-State: APjAAAWtdNnwruCTYajSY7faAXD4TA+lITKrh0+dY7T1/prj5+MQnRC1 ZxHfxZPqQxfhDe4Lh+iN6lzkgFHkGV0YyF8HPg== X-Received: by 2002:ad4:450a:: with SMTP id k10mr17987010qvu.136.1582078833043; Tue, 18 Feb 2020 18:20:33 -0800 (PST) MIME-Version: 1.0 References: <20200213123934.10841-1-dafna.hirschfeld@collabora.com> In-Reply-To: From: Rob Herring Date: Tue, 18 Feb 2020 20:20:22 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v4] dt-bindings: extcon: usbc-cros-ec: convert extcon-usbc-cros-ec.txt to yaml format To: Chanwoo Choi Cc: Dafna Hirschfeld , devicetree@vger.kernel.org, MyungJoo Ham , Mark Rutland , Benson Leung , Enric Balletbo i Serra , Guenter Roeck , "linux-kernel@vger.kernel.org" , Helen Koike , Ezequiel Garcia , Collabora Kernel ML , dafna3@gmail.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 17, 2020 at 4:30 AM Chanwoo Choi wrote: > > On 2/13/20 9:39 PM, 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 > > Reviewed-by: Enric Balletbo i Serra > > --- > > 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'. > > > > Changes since v3: > > in the example, changing the node isp1 to spi0 > > > > .../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..9c5849b341ea > > --- /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: https://protect2.fireeye.com/url?k=d3c63a24-8e5dc647-d3c7b16b-0cc47a31cdbc-e8d8e2b7806aed8e&u=http://devicetree.org/schemas/extcon/extcon-usbc-cros-ec.yaml# > > +$schema: https://protect2.fireeye.com/url?k=04f78247-596c7e24-04f60908-0cc47a31cdbc-1b9a3937c161a4b6&u=http://devicetree.org/meta-schemas/core.yaml# ^^^ > > + > > +title: ChromeOS EC USB Type-C cable and accessories detection > > + > > +maintainers: > > + - Benson Leung > > + - Enric Balletbo i Serra > > + > > +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: > > + - | > > + spi0 { > > + #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>; > > + }; > > + }; > > + }; > > > > Applied it. Thanks. And once again corrupted it when applying it: Documentation/devicetree/bindings/Makefile:12: recipe for target 'Documentation/devicetree/bindings/extcon/extcon-usbc-cros-ec.example.dts' failed Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/jsonschema/validators.py", line 774, in resolve_from_url document = self.store[url] File "/usr/local/lib/python3.6/dist-packages/jsonschema/_utils.py", line 22, in __getitem__ return self.store[self.normalize(uri)] KeyError: 'https://protect2.fireeye.com/url?k=04f78247-596c7e24-04f60908-0cc47a31cdbc-1b9a3937c161a4b6&u=http://devicetree.org/meta-schemas/core.yaml'