Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2097887pxa; Mon, 17 Aug 2020 00:02:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy9kqjeeHEAjetx9rX2BM6Uwf+yUwLaFejwWSH3hyMO/20ejSjQFT6nyvqmRJNwXHbxAXTo X-Received: by 2002:a17:906:3890:: with SMTP id q16mr13330872ejd.107.1597647742417; Mon, 17 Aug 2020 00:02:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597647742; cv=none; d=google.com; s=arc-20160816; b=tTMyBMg8HFA32+oDUZyvlSvlSRH+qpjwnH5zTns7GXWFOPJz9Ncl0uVxkZsLPIcBde 5t9tji2c3lJK6MB3ksdrt/JAkWT3OETi1Gqnej8gvGKeUXRl+AQl05lFP1PNdSzH9NiF G/a3j8H2C5vYiwdlWJVBbgD69TPeUf7oEUL/zgN15aq9mXtT6IAcQOw4u0aMcCqMWKKa OeHK88QwKSPBxiTFpjrDsNgfQGPgWYzxYhQ8WawtNDG94cNZQE9kyFpkIi5NB6MP9DGt MKKviWHEDQRJEWcAFXIYzrmTuZ0BdbV5Au5B47e3Y0sNZx+Ms1kkh0K0eyGTnsbQkWZ5 CDPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:to:from:dkim-signature; bh=XbqxRlT95Pt8Nw6XbPloEJxS7oUxbL37QbGoTMWgBSw=; b=C9m4RDiZcN19aRwQoXGIYlH51BHGyk9mBGtRY6iR4Sth30CKBtAgLgXUp3MCa9MPkU MvFI2DQJnzN8WIOzLI1mW9BJ/Q8Z+JgYJu5/Cq52NHPgudyy+YZsAz6yJAJO/jKBevDB OUnQZcjTqS1J9bfy8kxpruvoaZudmTnHLxJS4qcaj9GRbFwnhCtWRuVJlaDss47rqEg2 H84ChSW+TVQ8TO/+PJwC11hOuboz1TqVt5Pi8SZbhblKbFUd/9RW+i2ep0nzXYRM1h6a YYlhHt0qwBqgdnP2YcXkEa4lmnTxS7/F3vI6T5D4Emrd4WV6zdPry4eh8ghluAqior0Q lMpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=TmML2OJ6; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h13si10717458ejy.458.2020.08.17.00.01.59; Mon, 17 Aug 2020 00:02:22 -0700 (PDT) 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; dkim=pass header.i=@kernel.org header.s=default header.b=TmML2OJ6; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726650AbgHQHAw (ORCPT + 99 others); Mon, 17 Aug 2020 03:00:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:41280 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726287AbgHQHAV (ORCPT ); Mon, 17 Aug 2020 03:00:21 -0400 Received: from localhost.localdomain (unknown [194.230.155.242]) (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 EEB79207FF; Mon, 17 Aug 2020 07:00:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597647620; bh=CCAMQ1pVhtyjj73AqAvUfMTk4Xwdmos1F+lbGj4gSgU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=TmML2OJ6HAu3ZeiJc8MGPIzM4binTy7d9xjJRNWnfhoYB8T/6U6UYRsCouLqQLjEA s6hIvpr+CFo92Sa4qs+equSLNcjqtxYe9lXy8KFLqhrvZE7qt1djJaUQ7ZLI2uARe1 FoMHK5s8HNlFgXfjnfN9ibOr6c/tx9qtw/PjOmtY= From: Krzysztof Kozlowski To: MyungJoo Ham , Chanwoo Choi , Rob Herring , Krzysztof Kozlowski , Vijai Kumar K , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH v2 01/13] dt-bindings: extcon: ptn5150: Convert binding to DT schema Date: Mon, 17 Aug 2020 08:59:57 +0200 Message-Id: <20200817070009.4631-2-krzk@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200817070009.4631-1-krzk@kernel.org> References: <20200817070009.4631-1-krzk@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Convert the ptn-5150 extcon driver bindings to DT schema format using json-schema. The differences with original bindings document: - Use "gpios" suffix for the "int" and "vbus" gpio, - Skip generic "pinctrl" property as it is not really required. Signed-off-by: Krzysztof Kozlowski --- .../bindings/extcon/extcon-ptn5150.txt | 27 ---------- .../bindings/extcon/extcon-ptn5150.yaml | 53 +++++++++++++++++++ 2 files changed, 53 insertions(+), 27 deletions(-) delete mode 100644 Documentation/devicetree/bindings/extcon/extcon-ptn5150.txt create mode 100644 Documentation/devicetree/bindings/extcon/extcon-ptn5150.yaml diff --git a/Documentation/devicetree/bindings/extcon/extcon-ptn5150.txt b/Documentation/devicetree/bindings/extcon/extcon-ptn5150.txt deleted file mode 100644 index 936fbdf12815..000000000000 --- a/Documentation/devicetree/bindings/extcon/extcon-ptn5150.txt +++ /dev/null @@ -1,27 +0,0 @@ -* PTN5150 CC (Configuration Channel) Logic device - -PTN5150 is a small thin low power CC logic chip supporting the USB Type-C -connector application with CC control logic detection and indication functions. -It is interfaced to the host controller using an I2C interface. - -Required properties: -- compatible: should be "nxp,ptn5150" -- reg: specifies the I2C slave address of the device -- int-gpio: should contain a phandle and GPIO specifier for the GPIO pin - connected to the PTN5150's INTB pin. -- vbus-gpio: should contain a phandle and GPIO specifier for the GPIO pin which - is used to control VBUS. -- pinctrl-names : a pinctrl state named "default" must be defined. -- pinctrl-0 : phandle referencing pin configuration of interrupt and vbus - control. - -Example: - ptn5150@1d { - compatible = "nxp,ptn5150"; - reg = <0x1d>; - int-gpio = <&msmgpio 78 GPIO_ACTIVE_HIGH>; - vbus-gpio = <&msmgpio 148 GPIO_ACTIVE_HIGH>; - pinctrl-names = "default"; - pinctrl-0 = <&ptn5150_default>; - status = "okay"; - }; diff --git a/Documentation/devicetree/bindings/extcon/extcon-ptn5150.yaml b/Documentation/devicetree/bindings/extcon/extcon-ptn5150.yaml new file mode 100644 index 000000000000..f6316f12028b --- /dev/null +++ b/Documentation/devicetree/bindings/extcon/extcon-ptn5150.yaml @@ -0,0 +1,53 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/extcon/extcon-ptn5150.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: PTN5150 CC (Configuration Channel) Logic device + +maintainers: + - Krzysztof Kozlowski + +description: | + PTN5150 is a small thin low power CC logic chip supporting the USB Type-C + connector application with CC control logic detection and indication + functions. It is interfaced to the host controller using an I2C interface. + +properties: + compatible: + const: nxp,ptn5150 + + int-gpios: + description: + GPIO pin (input) connected to the PTN5150's INTB pin. + + reg: + maxItems: 1 + + vbus-gpios: + description: + GPIO pin (output) used to control VBUS. + +required: + - compatible + - int-gpios + - reg + - vbus-gpios + +additionalProperties: false + +examples: + - | + #include + i2c { + #address-cells = <1>; + #size-cells = <0>; + + ptn5150@1d { + compatible = "nxp,ptn5150"; + reg = <0x1d>; + int-gpios = <&msmgpio 78 GPIO_ACTIVE_HIGH>; + vbus-gpios = <&msmgpio 148 GPIO_ACTIVE_HIGH>; + }; + }; -- 2.17.1