Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp586643pxb; Tue, 15 Feb 2022 22:59:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJyjVnf6darvpHO2rSYbMhMNxowNgXuYq2ZiOKa88+3HMoUfyfipFyeVGkrajz0/ELCjiRTa X-Received: by 2002:a63:2223:0:b0:373:3d5d:1163 with SMTP id i35-20020a632223000000b003733d5d1163mr1150460pgi.443.1644994741537; Tue, 15 Feb 2022 22:59:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644994741; cv=none; d=google.com; s=arc-20160816; b=uVWBRhbkLxuG/181vY1kBqtQh8/72DBw5ypIuk7Cdf6Pw7tcZV8UWxO/p3SqQ1OdYG CkNmBkBFRPYGcAtO04DVCjYp4dTvx2YdbFEwIQpQKStQUY/qE13KHJFwCLQofcovrzSw PHZQcx+8dRolAXEKwJKYbVhCm3L5oLfo6R7eGirb8ThMYPDAppe3oagNgOigJNZkz783 X8m47VUQLoga3WBLht44wsDIJpXKgEYuxKw6uudGXYKHYPx4pwXMTGPxSfwzAVS0J19x 62TEWcVJhcfq2tWOqekh1JsGJNFDrEGXnDyVJTCNPo969ibJ5XNauE+rsFPvb/lqO+a8 7NPQ== 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=iStcXRyYnp0RvDZBlRhnXDPQNeIFUk3WYvBibaaLehg=; b=yW6+LFYuLQPCwwZZBzb4bRQQYOz5pib56itR4JFSFezdKw7nqtPWZZy/o/jPYwozlm pHzdhqERc8wR69UJAnagp4rv4vjiE0pzqzL2J/MB0KFltmAI8hrlMGfU2s6NLewsAXMb ea8qp+QXgM82n6qH8k1cxmzuj0OFL8sUBhjt6ns4NQwQPhwziCl7RJFN0hjFSRtZ+EnS obUyqX9nVu8+z0tF3u1l3CkQZcoWDIh8aTfO2DTbHrdrpzixfQOSQ8/1DxEqbhJ6wtq6 hXN9qDnJBJpH8MSNGHmiNz+UFv5H9aDpQFfQo9mAVYou3ZJEQV37GXWzwnsaFXaSjwl5 rA8w== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id d7si1901865pfu.143.2022.02.15.22.59.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 22:59:01 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E1CE2243A01; Tue, 15 Feb 2022 22:41:01 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241878AbiBOQvc (ORCPT + 99 others); Tue, 15 Feb 2022 11:51:32 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:54630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241873AbiBOQv3 (ORCPT ); Tue, 15 Feb 2022 11:51:29 -0500 Received: from hs01.dk-develop.de (hs01.dk-develop.de [IPv6:2a02:c207:3002:6234::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 945EA1070AC; Tue, 15 Feb 2022 08:51:19 -0800 (PST) From: Danilo Krummrich To: krzysztof.kozlowski@canonical.com, dmitry.torokhov@gmail.com, robh+dt@kernel.org, devicetree@vger.kernel.org, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Cc: linus.walleij@linaro.org, Danilo Krummrich Subject: [PATCH 1/2] dt-bindings: ps2-gpio: convert binding to json-schema Date: Tue, 15 Feb 2022 17:51:12 +0100 Message-Id: <20220215165113.52659-2-danilokrummrich@dk-develop.de> In-Reply-To: <20220215165113.52659-1-danilokrummrich@dk-develop.de> References: <20220215165113.52659-1-danilokrummrich@dk-develop.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Convert the ps2-gpio dt-binding documentation to DT schema format using the json-schema. Signed-off-by: Danilo Krummrich --- .../devicetree/bindings/serio/ps2-gpio.txt | 23 -------- .../devicetree/bindings/serio/ps2-gpio.yaml | 58 +++++++++++++++++++ 2 files changed, 58 insertions(+), 23 deletions(-) delete mode 100644 Documentation/devicetree/bindings/serio/ps2-gpio.txt create mode 100644 Documentation/devicetree/bindings/serio/ps2-gpio.yaml diff --git a/Documentation/devicetree/bindings/serio/ps2-gpio.txt b/Documentation/devicetree/bindings/serio/ps2-gpio.txt deleted file mode 100644 index 7b7bc9cdf986..000000000000 --- a/Documentation/devicetree/bindings/serio/ps2-gpio.txt +++ /dev/null @@ -1,23 +0,0 @@ -Device-Tree binding for ps/2 gpio device - -Required properties: - - compatible = "ps2-gpio" - - data-gpios: the data pin - - clk-gpios: the clock pin - - interrupts: Should trigger on the falling edge of the clock line. - -Optional properties: - - write-enable: Indicates whether write function is provided - to serio device. Possibly providing the write fn will not work, because - of the tough timing requirements. - -Example nodes: - -ps2@0 { - compatible = "ps2-gpio"; - interrupt-parent = <&gpio>; - interrupts = <23 IRQ_TYPE_EDGE_FALLING>; - data-gpios = <&gpio 24 GPIO_ACTIVE_HIGH>; - clk-gpios = <&gpio 23 GPIO_ACTIVE_HIGH>; - write-enable; -}; diff --git a/Documentation/devicetree/bindings/serio/ps2-gpio.yaml b/Documentation/devicetree/bindings/serio/ps2-gpio.yaml new file mode 100644 index 000000000000..41e43d797651 --- /dev/null +++ b/Documentation/devicetree/bindings/serio/ps2-gpio.yaml @@ -0,0 +1,58 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/serio/ps2-gpio.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Bindings for GPIO based PS/2 + +maintainers: + - Danilo Krummrich + +properties: + compatible: + const: ps2-gpio + + data-gpios: + description: + the gpio used for the data signal + maxItems: 1 + + clk-gpios: + description: + the gpio used for the clock signal + maxItems: 1 + + interrupts: + description: + The given interrupt should trigger on the falling edge of the clock line. + maxItems: 1 + + write-enable: + type: boolean + description: + Indicates whether write function is provided to serio device. Possibly + providing the write function will not work, because of the tough timing + requirements. + +required: + - compatible + - data-gpios + - clk-gpios + - interrupts + +additionalProperties: true + +examples: + - | + #include + #include + + ps2 { + compatible = "ps2-gpio"; + interrupt-parent = <&gpio>; + interrupts = <23 IRQ_TYPE_EDGE_FALLING>; + data-gpios = <&gpio 24 GPIO_ACTIVE_HIGH>; + clk-gpios = <&gpio 23 GPIO_ACTIVE_HIGH>; + write-enable; + }; -- 2.35.1