Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp337422ybv; Fri, 7 Feb 2020 00:07:04 -0800 (PST) X-Google-Smtp-Source: APXvYqwubHCbf+cePV6QQf87GEblloY+Jako8BC8KbXtiCJ1oNFD89N3Qamj188Y65o8SLyw3FOw X-Received: by 2002:a9d:6544:: with SMTP id q4mr1656548otl.269.1581062824272; Fri, 07 Feb 2020 00:07:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581062824; cv=none; d=google.com; s=arc-20160816; b=g6PgtZfUaNFiDJpAgmRru9nCusR/CVD0XxccSiLuIzk+f7Z/kWIgwbai0s3AQVH04m cpgPzv3ujB6m/EBGB84obQmIX2+8eFcTS0YqMUlEE50aZOWICiqsaCOnYWZXr5fQEaWX s03HS9VbRSx3mjjlPVeN6c0wYXamrBgGKJlK5ki8L6PzT+81EzTt6TXWvC4Lnx90uBLQ mtZPDAiI3yaLz5Qz35f6PJC30GYqTwIfRrr70yojQ12eOCnpRgBntjBkqGODuPo2HRIa ojXFaOQWhN2W9Qigl5L7c0IZUAufqVcikjSL/wq5yho3oIEHeQmaBChs5jWIBCT/aVKp bb3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=dGnj5BVv3YXgT4KAcp7MFHmUfLcIVOcjZpQcDTWm9oU=; b=k10rQYxBN+zzQiQg0y9jIki64aFKqf0Ju1ipfKldfpO5nihJluDGa7qy20Qu9E78ni w5SnIG2EweciVJcWuSXJlRa+xxv2lgJOoySi6hM6RS1NxpwTIpnjJ8dvUTQhpXldvzqJ Hybh7LXQkTBxCi5KtW6TmDziseFqqHcFFFnoPb24s/jDpETRzV8kwYmJklBExUa/uAem 9+ct8RcLkhwrl5zERQVx4spXBFY7vYcII3uQe6u3E/H4H2C9EKCTuzlTAsAcIAbxGjMS /U1pr/Uy53hCPkBDXnspIeYTF9jyUO6oCAu1ujv1S15m0E7AExanhjKWAMevJ8CdDPXh 7+LQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x23si3427575oie.50.2020.02.07.00.06.50; Fri, 07 Feb 2020 00:07:04 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726843AbgBGIFx (ORCPT + 99 others); Fri, 7 Feb 2020 03:05:53 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:49640 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726619AbgBGIFx (ORCPT ); Fri, 7 Feb 2020 03:05:53 -0500 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: eballetbo) with ESMTPSA id A9B28292B43 Subject: Re: [PATCH v2] dt-bindings: convert extcon-usbc-cros-ec.txt extcon-usbc-cros-ec.yaml To: Rob Herring Cc: Dafna Hirschfeld , devicetree@vger.kernel.org, myungjoo.ham@samsung.com, cw00.choi@samsung.com, mark.rutland@arm.com, bleung@chromium.org, groeck@chromium.org, linux-kernel@vger.kernel.org, helen.koike@collabora.com, ezequiel@collabora.com, kernel@collabora.com, dafna3@gmail.com References: <20200205110029.3395-1-dafna.hirschfeld@collabora.com> <59ec876a-a77a-9b6d-34dd-272292102ed9@collabora.com> <20200206214005.GA20153@bogus> From: Enric Balletbo i Serra Message-ID: Date: Fri, 7 Feb 2020 09:05:47 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.3.0 MIME-Version: 1.0 In-Reply-To: <20200206214005.GA20153@bogus> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/2/20 22:40, Rob Herring wrote: > On Thu, Feb 06, 2020 at 04:47:59PM +0100, Enric Balletbo i Serra wrote: >> Hi Dafna, >> >> On 5/2/20 12:00, 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 >>> --- >>> 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 >>> >>> .../bindings/extcon/extcon-usbc-cros-ec.txt | 24 ---------- >>> .../bindings/extcon/extcon-usbc-cros-ec.yaml | 45 +++++++++++++++++++ >>> 2 files changed, 45 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..fd95e413d46f >>> --- /dev/null >>> +++ b/Documentation/devicetree/bindings/extcon/extcon-usbc-cros-ec.yaml >>> @@ -0,0 +1,45 @@ >>> +# 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 >>> + - 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: >>> + - | >>> + cros-ec@0 { >>> + compatible = "google,cros-ec-i2c"; >> >> Now that you are here ... could you use compatible = "google,cros-ec-spi" here? >> >> The reason is that the label above, cros-ec@0 is not really correct for an i2c >> device because after the @ you should put the address, cros-ec@1e will have more >> sense here. But cros-ec-i2c is rarely used, so I'd change the compatible to use >> "google,cros-ec-spi" and the entry "cros-ec@0" is fine. >> >>> + extcon { >>> + compatible = "google,extcon-usbc-cros-ec"; >>> + google,usb-port-id = <0>; >>> + }; >> >> And maybe would be useful have a more complete example like this? >> >> cros-ec@0 { >> compatible = "google,cros-ec-spi"; > > There should also be a 'spi' parent node and 'reg' here. > >> >> usbc_extcon0: extcon@0 { > > And no unit-address here as there's no 'reg'. > Thanks for pointing all this, I'll fix current users of this binding, as they are wrong. Thanks, Enric >> compatible = "google,extcon-usbc-cros-ec"; >> google,usb-port-id = <0>; >> }; >> >> >> usbc_extcon1: extcon@1 { >> compatible = "google,extcon-usbc-cros-ec"; >> google,usb-port-id = <1>; >> }; >> };