Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp2967567ioo; Sun, 29 May 2022 08:40:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyrqLqlmllAItgF0SxpiqxcMcUKJ63PP/vBxFVmnNJioKi316rEWVt1fXWNbDsO32j24WNC X-Received: by 2002:a17:902:ebca:b0:15f:4cc5:f40f with SMTP id p10-20020a170902ebca00b0015f4cc5f40fmr51768661plg.96.1653838791282; Sun, 29 May 2022 08:39:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653838791; cv=none; d=google.com; s=arc-20160816; b=Fkq/z7HkyNnVnqhk4cuT40MxoTYW46OLuDx0Abc66PtJ0UIOP2PHpvCnGiaKcIQt0A 15RYvppz0m1wXFk2sEzIbtNjzGHGCk0zHFkT8mAAyUKcefoj+QZMlULLfWxs6TxyyFy1 TWGH97otDOxWCz3gdkUJh7UnwNXfzAKT/ZZLPWJPzMQkxzsyKsdaPeFqEbIoPrVeaaSq bnPFEmWGlaDLRgiDQQ/lq09vhvvXTQnGIp0JvV1IgHSmZRQwZq5a5bevl7PqVUloUXwr 2NkDaWHjjH7BRpLoRQY7m6dzMQg8XK1i4osQuytMBzy5mLfoV+giCQB54HOAeMCbFmWw H8GA== 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 :message-id:date:subject:cc:to:from; bh=OmVcbUxSNQvrf5FuJttXf/e8a7N0NHdw6+T7KJCubwE=; b=ACWMbpjYCPFoqNtdDWBkcfbZJ9RWa6eyYk2rzM3OAx8zpT3Hu2upIFFyTjutotOALY Ju/kChLCYtA38Creg02WcnI79CLyKWtFo5heqCU8E8m0zp2H1J8w3pLqeXfBJ59Prk29 2T2cI+reAVpiZxGLdSZFfGco0YRa0AFfxK8grdIk4v17w/obyl3TOE0cDkrjk/MMzl6C qKZR4eTI3ZWAPSc0P5IdFfyXJRWSN+WlivftP9BcnyLrmE5kE1b2Nvu6OiDCDew26Yft xT9ym0JDK+Wpj5OdYtD3C2Np98ROdbJUHYLFedcsw/fySP9aKS5lF+ZgdmsxQllrRlAY C8Nw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p34-20020a056a0026e200b0050612d816e7si11221930pfw.104.2022.05.29.08.39.40; Sun, 29 May 2022 08:39:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230265AbiE2Nd0 (ORCPT + 99 others); Sun, 29 May 2022 09:33:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42890 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230090AbiE2NdU (ORCPT ); Sun, 29 May 2022 09:33:20 -0400 X-Greylist: delayed 386 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Sun, 29 May 2022 06:33:18 PDT Received: from hs01.dk-develop.de (hs01.dk-develop.de [173.249.23.66]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6608A46B0C; Sun, 29 May 2022 06:33:18 -0700 (PDT) From: Danilo Krummrich To: krzysztof.kozlowski@canonical.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: [RESEND PATCH v3 1/2] dt-bindings: ps2-gpio: convert binding to json-schema Date: Sun, 29 May 2022 15:26:37 +0200 Message-Id: <20220529132638.13420-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,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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. Reviewed-by: Krzysztof Kozlowski 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..304132fd30c5 --- /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: false + +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.36.1