Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1989346ybv; Thu, 6 Feb 2020 13:42:14 -0800 (PST) X-Google-Smtp-Source: APXvYqzMxce0HIblBXGRys6x6P1heHiJ/IkU/3O/2I6Uyj0ovs0LQsXfcmciy/MhIEqMOc1rwDOM X-Received: by 2002:a9d:750b:: with SMTP id r11mr150646otk.310.1581025333977; Thu, 06 Feb 2020 13:42:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581025333; cv=none; d=google.com; s=arc-20160816; b=ZrS06B/fjT5sMNOLLTKHgtHtJJx5no0+adlQrdBVHpkvL6in3n4sTclHcrd02nJMzV bub4X4hVUzAmQEgZfuURN+h4HNsGoCGNRXArbAvDhpsCmw/VPOBhWFdGAe5FesTOQsXT kFykf6gcOD/zPVobWacQ5YCpOlX1zzdWn/xRBMmpUG7KTgzRflUHbOg5Qlb8TAwb4e25 zPwk7KYlsleskx5FMSQRpbXfs+5dBJK3LByWe5keF3aXQTzI47bMzATQnYAJz5Ejm9ns 5i2tJFi7LbcYbuiLNGVbEhvUQBR9C0sWSAYyPt1/Z/8H7b3wd26hFvmP/EcSQDH9LY/U u/eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=5vvIq67JV+Oxp9NKbdutNRvJz8PnZ+ipDgXIat3s/IM=; b=FsoesrfCC5PQwgYRiDNgL0KMahLLvV17sFQ3Rwv46IeHspdcj/hZqSHGitfmq99nTN j/U1hwnm8mVTPcVJgu/7KEqjnaA1VaqkQN4TjE5rpESuawQYhlRIpek+eb+RjgyHrYZE 1RJR75OBafp1ZhDVMR/MHmJCGtu7kSShOo98kRbEE2BDaFToL3Mv7QHOt42nOplw5Ksu tk6w+eUk/4+YZW8T+9DmT9xHdABwFWAROcueQkuf3JRSFkYTkdZefcoY1pOTJ26UpOSO qDYkdaJ5rEdkMSwpUatVMbkhvfrrdGWnaNxNJelSFFYCBpapNNCzlIuq+2+V/Q9/UElD 0nhQ== 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l26si473993oti.152.2020.02.06.13.42.02; Thu, 06 Feb 2020 13:42:13 -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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727524AbgBFVkJ (ORCPT + 99 others); Thu, 6 Feb 2020 16:40:09 -0500 Received: from mail-pl1-f193.google.com ([209.85.214.193]:36504 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727450AbgBFVkJ (ORCPT ); Thu, 6 Feb 2020 16:40:09 -0500 Received: by mail-pl1-f193.google.com with SMTP id a6so98845plm.3; Thu, 06 Feb 2020 13:40:08 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=5vvIq67JV+Oxp9NKbdutNRvJz8PnZ+ipDgXIat3s/IM=; b=Oi1pgWOYemZXbgqg32b3O1nImywT+pcyhhlTRA+3upt44XAK/6TqB7ULYqzOgL8app RxTYqil60rk8tRBJxLcv0Gd4ZUQNK02XZZ6KusH6Fggc6uKBAq8ZGaJj/mD5MT6ZNuNt Ni+LLa9VWGWgpDLxMWEUYFjrSMnZ72aRibfEyHEJN3d+pkrv40YPXLSJXetLvHzLgIwC Fn/UDSmhAvxdg2bzpD8ijshmMBBrJyaJ/oB0vkvVpAIXNv34GAgMGqe90gZAjknPa/zv 975CQsS+h5dI3w4R4A+y6tcLGGuR3326QmkTGrr7qvRFDmCrDIv7JWJ3NbaewjZkmTPh u/TQ== X-Gm-Message-State: APjAAAWNIX98WzToDznBGvlP+Gcdnm1w/HywvbBTGfEJNsTmf16eFBV5 DCqckrJ37oRSTkNloyWazg== X-Received: by 2002:a17:90b:3109:: with SMTP id gc9mr7013106pjb.30.1581025207964; Thu, 06 Feb 2020 13:40:07 -0800 (PST) Received: from rob-hp-laptop (63-158-47-182.dia.static.qwest.net. [63.158.47.182]) by smtp.gmail.com with ESMTPSA id g13sm322250pfo.169.2020.02.06.13.40.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Feb 2020 13:40:06 -0800 (PST) Received: (nullmailer pid 23807 invoked by uid 1000); Thu, 06 Feb 2020 21:40:05 -0000 Date: Thu, 6 Feb 2020 14:40:05 -0700 From: Rob Herring To: Enric Balletbo i Serra 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 Subject: Re: [PATCH v2] dt-bindings: convert extcon-usbc-cros-ec.txt extcon-usbc-cros-ec.yaml Message-ID: <20200206214005.GA20153@bogus> References: <20200205110029.3395-1-dafna.hirschfeld@collabora.com> <59ec876a-a77a-9b6d-34dd-272292102ed9@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <59ec876a-a77a-9b6d-34dd-272292102ed9@collabora.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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'. > 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>; > }; > };