Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1274243pxu; Sat, 5 Dec 2020 09:45:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJxRv7iqskrn6/4Rq5pACS66qVdue9ple4Qwvfa5IvEyN695gRCUe32zAcXSvGWumqxLr0jr X-Received: by 2002:a17:906:adcb:: with SMTP id lb11mr10202341ejb.346.1607190345313; Sat, 05 Dec 2020 09:45:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607190345; cv=none; d=google.com; s=arc-20160816; b=MculHMIpDd7r86ngffyeBlMVGnNJDgQ2CTORm0BzOPynlrgYswyseez5xxK1iPscr3 3pHkHHZbSjPbN/iap/NLGXW2k6oy9uaTXyFpG7okigyrApyew+ZFeAgXD9mLNoMv1qaA Qq6pYN9NObS4qlHYMvu0UHRcyZEePCMg9eC1HfWNa/wFGlekqxaKoFHfra5Ha5MTWXgW PvvTrah0Eb+An6g0Sf7aMdMVWW1VELzjI03nqMdcN5FfREVjYZtqgFa9pXGe3NYG4Qqi JEokzSnf0haXLpvxpR8PaTvImKvlpCMI+NSU+uZYSpDjcTaTLsnIfiRKbRlTIVV6S61W Etdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=ciihzKym8RzRbn2cyyDA3anoP/m2xXopgZC7xqYr72g=; b=oBSzhwApJNgY9/etOzuGjFSUleL2kKPB7r/UXjpJ9QlUQ27hjFNiWbapdeyDqu446m 5UM9ncOKQA07wPDJ17Pr5SwWhs+8SuxOfa09LOP/6b/ngB8QircczlO06HHDLRdLYgKr nQ2bvmaulRXTRbAt927S55wDLuHsyqoDnySnk2xKlm8ghV1rMBYCLUwnm6ebyfzJ/UYW rVSoQy+QRGEzShMBoGX1lFtjOAlyua6B5o64BITMoZHm1voxQnfrXLsMARPRJ/0Xjaog FAXmSwgtWTFZ1erE1u5L7AhTOo2wJhcTA3rhtGj/q5D//9EF4kGaYRrhYu+ak/5rW2dw W4KA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a18si3644386edx.342.2020.12.05.09.45.05; Sat, 05 Dec 2020 09:45:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727522AbgLERTt (ORCPT + 99 others); Sat, 5 Dec 2020 12:19:49 -0500 Received: from mx.baikalchip.ru ([94.125.187.42]:53198 "EHLO mail.baikalelectronics.ru" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726225AbgLEQzw (ORCPT ); Sat, 5 Dec 2020 11:55:52 -0500 From: Serge Semin To: Mathias Nyman , Felipe Balbi , Krzysztof Kozlowski , Greg Kroah-Hartman , Rob Herring , Chunfeng Yun CC: Serge Semin , Serge Semin , Alexey Malahov , Pavel Parkhomenko , Andy Gross , Bjorn Andersson , Manu Gautam , Roger Quadros , Lad Prabhakar , Yoshihiro Shimoda , Neil Armstrong , Kevin Hilman , Martin Blumenstingl , Ahmad Zainie , , , , , , , Subject: [PATCH v5 01/19] dt-bindings: usb: usb-hcd: Detach generic USB controller properties Date: Sat, 5 Dec 2020 18:24:08 +0300 Message-ID: <20201205152427.29537-2-Sergey.Semin@baikalelectronics.ru> In-Reply-To: <20201205152427.29537-1-Sergey.Semin@baikalelectronics.ru> References: <20201205152427.29537-1-Sergey.Semin@baikalelectronics.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-ClientProxiedBy: MAIL.baikal.int (192.168.51.25) To mail (192.168.51.25) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There can be three distinctive types of the USB controllers: USB hosts, USB peripherals/gadgets and USB OTG, which can switch from one role to another. In order to have that hierarchy handled in the DT binding files, we need to collect common properties in a common DT schema and specific properties in dedicated schemas. Seeing the usb-hcd.yaml DT schema is dedicated for the USB host controllers only, let's move some common properties from there into the usb.yaml schema. So the later would be available to evaluate all currently supported types of the USB controllers. While at it add an explicit "additionalProperties: true" into the usb-hcd.yaml as setting the additionalProperties/unevaluateProperties properties is going to be get mandatory soon. Signed-off-by: Serge Semin --- Changelog v4: - This is a new patch created as a result of the comment left by Chunfeng Yun in v3 Changelog v5: - Discard duplicated additionalProperties property definition. --- .../devicetree/bindings/usb/usb-hcd.yaml | 14 ++------- .../devicetree/bindings/usb/usb.yaml | 29 +++++++++++++++++++ 2 files changed, 31 insertions(+), 12 deletions(-) create mode 100644 Documentation/devicetree/bindings/usb/usb.yaml diff --git a/Documentation/devicetree/bindings/usb/usb-hcd.yaml b/Documentation/devicetree/bindings/usb/usb-hcd.yaml index b545b087b342..81f3ad1419d8 100644 --- a/Documentation/devicetree/bindings/usb/usb-hcd.yaml +++ b/Documentation/devicetree/bindings/usb/usb-hcd.yaml @@ -9,18 +9,8 @@ title: Generic USB Host Controller Device Tree Bindings maintainers: - Greg Kroah-Hartman -properties: - $nodename: - pattern: "^usb(@.*)?" - - phys: - $ref: /schemas/types.yaml#/definitions/phandle-array - description: - List of all the USB PHYs on this HCD - - phy-names: - description: - Name specifier for the USB PHY +allOf: + - $ref: usb.yaml# additionalProperties: true diff --git a/Documentation/devicetree/bindings/usb/usb.yaml b/Documentation/devicetree/bindings/usb/usb.yaml new file mode 100644 index 000000000000..941ad59fbac5 --- /dev/null +++ b/Documentation/devicetree/bindings/usb/usb.yaml @@ -0,0 +1,29 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/usb/usb.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Generic USB Controller Device Tree Bindings + +maintainers: + - Greg Kroah-Hartman + +select: false + +properties: + $nodename: + pattern: "^usb(@.*)?" + + phys: + $ref: /schemas/types.yaml#/definitions/phandle-array + description: + List of all the USB PHYs on this HCD + + phy-names: + description: + Name specifier for the USB PHY + +additionalProperties: true + +... -- 2.29.2