From patchwork Wed Jul 21 14:03:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 12391143 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 91307C636C9 for ; Wed, 21 Jul 2021 14:23:29 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5C54A6120C for ; Wed, 21 Jul 2021 14:23:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5C54A6120C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=cerno.tech Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=BzjZmC8KYXw49h2aDN1frwr4CyJaDVuRYxdJ8ypfQoM=; b=EJnHhlbffH0U98 NkDtYeTFZH4aceNRkapxphABJkVVngMiJhDktn2Lv1MlbLfmbX6tud/eIw4bTEVc1CIDKVnQvzADk npiISmSZYOUujtiVm1bXKD608PvgHC8MJ8URXXFvjueQmbsxYbtMHCEXeYDFMbj7AeX1a2gUyBjh7 ba1BDfsZFVXX8UMoNXVq5TONA/z4lZGH6tq/izaf702fAJOQfCDBScF/VAbmmRtnwJ8jsvuTiMHJ3 TFFctYPlyCllzQLtTqeW8SOdgqRP4JiiYQ5YlNHYO/lgCKezWwO+anHgl5zq0NxvdjY3waHJUzfu5 Ljp31nKgNRxU4K3CWjWQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m6D5c-00Fvd9-LA; Wed, 21 Jul 2021 14:20:53 +0000 Received: from new4-smtp.messagingengine.com ([66.111.4.230]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m6CqS-00Fq2N-C7 for linux-arm-kernel@lists.infradead.org; Wed, 21 Jul 2021 14:05:11 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailnew.nyi.internal (Postfix) with ESMTP id 96AFC5809C2; Wed, 21 Jul 2021 10:05:07 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Wed, 21 Jul 2021 10:05:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm3; bh=X1X2+qYvDkQAa 133g2cfXkjossTVwdp97+1vx5XvOdw=; b=pYFhuLzVy3cAV3Kt6dVo/2dW/y3c3 nBZ3Tgf5DPLFK9bvUsIpRukaswYrOjgSNlDiZjdNsRkxKCNrz4g6/MIlQDd07Zr1 h/4xzdkirdq9j5wl7u/QLXBQ53RlLaMq986ad9pZn5oxLuv2z2cgTBVN8eQQKh6H Yc/Isx7FYLFBHLHAg+RWgLN72I86OHlBdgtCD/4eS9oGssSwjdAvHxTs630t/xFu a/IMmleM2p/1KmGQbAmcKmSNxwOzsF9lP4G1soHRLvHOY7OmoN2Nlq830vogV/4K tPz/zsVOgNoPw0KcQcEq3i5GWx6jStAbjltSFfYyrx6EmZZCjRbOSUN+Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=X1X2+qYvDkQAa133g2cfXkjossTVwdp97+1vx5XvOdw=; b=bE5HVXNI tWD24/bPMsPvi1cBAjEfgy56TTXCNYTzxWGSUmRx17L+45EcYvEwivZzxLBCC6x8 Mp1kv9AQd8JkFVDNDV0GkbRm8lFoN6X19KuPnzWxe8z6Xq/pfEWxvN0BzstMQQJ9 3GfazLHTWVnazo0g2tE+nwl8VJPXi5mnYR+gWiGOGlgEAnP6pe7YsMOu8Iq75rOH hRzmpi2K9XS1ZUKghAk2pEsNd1v44OUPw18bg1sRFxPQ9vAxtEilnIlkx78/p+Fd KmgGz9oOd3J7Q0IYVHd3OqgYoHB8rIBpd+FATPnQ16IY3m26daTHftk5pm4excWX IP1dSkto1eqdpg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrfeeggdeijecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenog evohgrshhtrghlqdfhgeduvddqtddvucdludehtddmnecujfgurhephffvufffkffojghf ggfgsedtkeertdertddtnecuhfhrohhmpeforgigihhmvgcutfhiphgrrhguuceomhgrgi himhgvsegtvghrnhhordhtvggthheqnecuggftrfgrthhtvghrnhepveejieejtdevgfff gfejuefggfeutdelteekgeetueeftddutddtgfffhffgueffnecuffhomhgrihhnpeguvg hvihgtvghtrhgvvgdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhep mhgrihhlfhhrohhmpehmrgigihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 21 Jul 2021 10:05:06 -0400 (EDT) From: Maxime Ripard To: Chen-Yu Tsai , Maxime Ripard , Jernej Skrabec , devicetree@vger.kernel.org, Rob Herring , Frank Rowand Cc: linux-arm-kernel@lists.infradead.org, linux-sunxi@googlegroups.com, Dmitry Torokhov , Jaewon Kim , linux-input@vger.kernel.org Subject: [PATCH 18/54] dt-bindings: input: Convert Regulator Haptic binding to a schema Date: Wed, 21 Jul 2021 16:03:48 +0200 Message-Id: <20210721140424.725744-19-maxime@cerno.tech> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210721140424.725744-1-maxime@cerno.tech> References: <20210721140424.725744-1-maxime@cerno.tech> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210721_070508_560136_21CC2DBB X-CRM114-Status: GOOD ( 17.27 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The Haptic feedback based on a regulator is supported by Linux thanks to its device tree binding. Now that we have the DT validation in place, let's convert the device tree bindings for that driver over to a YAML schema. Cc: Dmitry Torokhov Cc: Jaewon Kim Cc: linux-input@vger.kernel.org Signed-off-by: Maxime Ripard Reviewed-by: Rob Herring --- .../bindings/input/regulator-haptic.txt | 21 --------- .../bindings/input/regulator-haptic.yaml | 43 +++++++++++++++++++ 2 files changed, 43 insertions(+), 21 deletions(-) delete mode 100644 Documentation/devicetree/bindings/input/regulator-haptic.txt create mode 100644 Documentation/devicetree/bindings/input/regulator-haptic.yaml diff --git a/Documentation/devicetree/bindings/input/regulator-haptic.txt b/Documentation/devicetree/bindings/input/regulator-haptic.txt deleted file mode 100644 index 3ed1c7eb2f97..000000000000 --- a/Documentation/devicetree/bindings/input/regulator-haptic.txt +++ /dev/null @@ -1,21 +0,0 @@ -* Regulator Haptic Device Tree Bindings - -Required Properties: - - compatible : Should be "regulator-haptic" - - haptic-supply : Power supply to the haptic motor. - [*] refer Documentation/devicetree/bindings/regulator/regulator.txt - - - max-microvolt : The maximum voltage value supplied to the haptic motor. - [The unit of the voltage is a micro] - - - min-microvolt : The minimum voltage value supplied to the haptic motor. - [The unit of the voltage is a micro] - -Example: - - haptics { - compatible = "regulator-haptic"; - haptic-supply = <&motor_regulator>; - max-microvolt = <2700000>; - min-microvolt = <1100000>; - }; diff --git a/Documentation/devicetree/bindings/input/regulator-haptic.yaml b/Documentation/devicetree/bindings/input/regulator-haptic.yaml new file mode 100644 index 000000000000..b1ae72f9cd2d --- /dev/null +++ b/Documentation/devicetree/bindings/input/regulator-haptic.yaml @@ -0,0 +1,43 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/input/regulator-haptic.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: Regulator Haptic Device Tree Bindings + +maintainers: + - Jaewon Kim + +properties: + compatible: + const: regulator-haptic + + haptic-supply: + description: > + Power supply to the haptic motor + + max-microvolt: + description: > + The maximum voltage value supplied to the haptic motor + + min-microvolt: + description: > + The minimum voltage value supplied to the haptic motor + +required: + - compatible + - haptic-supply + - max-microvolt + - min-microvolt + +additionalProperties: false + +examples: + - | + haptics { + compatible = "regulator-haptic"; + haptic-supply = <&motor_regulator>; + max-microvolt = <2700000>; + min-microvolt = <1100000>; + };