Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp1905745rdb; Sat, 2 Dec 2023 14:36:43 -0800 (PST) X-Google-Smtp-Source: AGHT+IFyxiKMCUazs65w1/R78nF8f/dNe8SrmBeCF1WbbigcAHkz8bOFelm0TWqswKwpiw3xxRhu X-Received: by 2002:a05:6358:60c1:b0:170:17ea:f4d4 with SMTP id i1-20020a05635860c100b0017017eaf4d4mr1980259rwi.33.1701556603334; Sat, 02 Dec 2023 14:36:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701556603; cv=none; d=google.com; s=arc-20160816; b=opQxWGj6bRLvir7IEJbey4Oaob/hUEtE7dbVxmhpilVP9GKnHD4B/x7OZP4caYv8i5 YTD26/RtobEaFfBSwdfk04NHGNsGvelqUsYMbZLd4n2u4wisv7vF2mcC0iqpjMVfCfAC LHZYOrNtRE9jtjMECenpR3Vtcoltob9JEyAnz3PU3j6R65/Wq8IzPu7tJtGFHmJF/GC4 1bbQzgXogAeMjCZ1NJUkBuXY7u2WTlVVIIh0mWTlQoLhkmxGSY3mgWJCFP79yhdEhbZ5 CHQjMxiKwTXgRhbfhlUgDajMHE+vUgq9Q+nwk3IKg9/T0NJElMYY5nVJ0cPIXOsDwOWZ 5OOA== 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:dkim-signature; bh=w8RgVf3eXeZAKem0L618SQ0biYOfByDJvZecPoQGFuc=; fh=li9IDUL17LzT5PjtNUJ4zTvIgPbDTG90kIW7IL3gz0o=; b=l7jTT8ZTb/s4dONIlD3NfSPDop7scKMBkRWm4R3YpCjdXYFGftpTBPtJJ2veO3Rroh 4/nm9nNdjiI7IMrPhn//dc/8DJ9A2jvKfbwgFm5IQqXVwKIhdfA1l0UtEK6JP5H7Z3bD 9L9hQ7d3PbghmeAwrZIkgURocxDU4miEjmRuiEOq53t/q5dVvB9qRH5owM55G19MPcBP W4TLpnbrx6v/+zctv6BP4LmUv1Vvx+oZO5AglzlA85Pzvd7GN5r/ywsZPir+mkwOTg7z DNuyeO1F3rEI4rV9xlx+P+Apbttl6rtC3Fp5bbQ/eY0mtn7RSik3LzYOljQIVUgeW9Ye 92Dg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ixit.cz header.s=dkim header.b=cKXEG7Ps; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=ixit.cz Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id f4-20020a170902ce8400b001cfb52d9bf3si5699288plg.438.2023.12.02.14.36.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 Dec 2023 14:36:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@ixit.cz header.s=dkim header.b=cKXEG7Ps; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=ixit.cz Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 33A7C812E35B; Sat, 2 Dec 2023 14:36:28 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232452AbjLBWgE (ORCPT + 99 others); Sat, 2 Dec 2023 17:36:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41866 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229451AbjLBWgC (ORCPT ); Sat, 2 Dec 2023 17:36:02 -0500 X-Greylist: delayed 364 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Sat, 02 Dec 2023 14:36:06 PST Received: from ixit.cz (ip-89-177-23-149.bb.vodafone.cz [89.177.23.149]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6244C11A; Sat, 2 Dec 2023 14:36:06 -0800 (PST) Received: from newone.lan (unknown [10.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ixit.cz (Postfix) with ESMTPSA id 2D5AD161295; Sat, 2 Dec 2023 23:30:00 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ixit.cz; s=dkim; t=1701556200; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=w8RgVf3eXeZAKem0L618SQ0biYOfByDJvZecPoQGFuc=; b=cKXEG7PsiepHEcQrcXwInsk0YmYc4jFv+gYp+pmE9X0y1h3gZ9JBD5OzGMqM3W/n7N1IFK z/NClr0LGnfsUDRXPryZNHR5bPsmk0IL+nwOGlrJwD89Z927a1zGrEZ3vSemCGc7HRof3d piWBcTAZJjK3MmUjEwxrAJEEINUE9jU= From: David Heidelberg To: Jean Delvare , Guenter Roeck , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: David Heidelberg , Rob Herring , linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 1/5] dt-bindings: arm: hwmon: gpio-fan: Convert txt bindings to yaml Date: Sat, 2 Dec 2023 23:29:00 +0100 Message-ID: <20231202222934.137191-1-david@ixit.cz> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Sat, 02 Dec 2023 14:36:29 -0800 (PST) Convert fan devices connected to GPIOs to the YAML syntax. Signed-off-by: David Heidelberg --- .../devicetree/bindings/hwmon/gpio-fan.txt | 41 ----------- .../devicetree/bindings/hwmon/gpio-fan.yaml | 70 +++++++++++++++++++ 2 files changed, 70 insertions(+), 41 deletions(-) delete mode 100644 Documentation/devicetree/bindings/hwmon/gpio-fan.txt create mode 100644 Documentation/devicetree/bindings/hwmon/gpio-fan.yaml diff --git a/Documentation/devicetree/bindings/hwmon/gpio-fan.txt b/Documentation/devicetree/bindings/hwmon/gpio-fan.txt deleted file mode 100644 index f4cfa350f6a1..000000000000 --- a/Documentation/devicetree/bindings/hwmon/gpio-fan.txt +++ /dev/null @@ -1,41 +0,0 @@ -Bindings for fan connected to GPIO lines - -Required properties: -- compatible : "gpio-fan" - -Optional properties: -- gpios: Specifies the pins that map to bits in the control value, - ordered MSB-->LSB. -- gpio-fan,speed-map: A mapping of possible fan RPM speeds and the - control value that should be set to achieve them. This array - must have the RPM values in ascending order. -- alarm-gpios: This pin going active indicates something is wrong with - the fan, and a udev event will be fired. -- #cooling-cells: If used as a cooling device, must be <2> - Also see: - Documentation/devicetree/bindings/thermal/thermal-cooling-devices.yaml - min and max states are derived from the speed-map of the fan. - -Note: At least one the "gpios" or "alarm-gpios" properties must be set. - -Examples: - - gpio_fan { - compatible = "gpio-fan"; - gpios = <&gpio1 14 1 - &gpio1 13 1>; - gpio-fan,speed-map = <0 0 - 3000 1 - 6000 2>; - alarm-gpios = <&gpio1 15 1>; - }; - gpio_fan_cool: gpio_fan { - compatible = "gpio-fan"; - gpios = <&gpio2 14 1 - &gpio2 13 1>; - gpio-fan,speed-map = <0 0>, - <3000 1>, - <6000 2>; - alarm-gpios = <&gpio2 15 1>; - #cooling-cells = <2>; /* min followed by max */ - }; diff --git a/Documentation/devicetree/bindings/hwmon/gpio-fan.yaml b/Documentation/devicetree/bindings/hwmon/gpio-fan.yaml new file mode 100644 index 000000000000..0e220874bee6 --- /dev/null +++ b/Documentation/devicetree/bindings/hwmon/gpio-fan.yaml @@ -0,0 +1,70 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/hwmon/gpio-fan.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Fan connected to GPIO lines + +maintainers: + - Rob Herring + +properties: + compatible: + const: gpio-fan + + gpios: + description: | + Specifies the pins that map to bits in the control value, + ordered MSB-->LSB. + minItems: 1 + maxItems: 7 + + alarm-gpios: + maxItems: 1 + + gpio-fan,speed-map: + $ref: /schemas/types.yaml#/definitions/uint32-matrix + minItems: 2 + maxItems: 127 + items: + items: + - description: fan speed in RPMs + - description: control value + description: | + A mapping of possible fan RPM speeds and the + control value that should be set to achieve them. This array + must have the RPM values in ascending order. + + '#cooling-cells': + const: 2 + +required: + - compatible + - gpios + - gpio-fan,speed-map + +additionalProperties: false + +examples: + - | + gpio_fan { + compatible = "gpio-fan"; + gpios = <&gpio1 14 1 + &gpio1 13 1>; + gpio-fan,speed-map = < 0 0>, + < 3000 1>, + <36000 2>; + alarm-gpios = <&gpio1 15 1>; + }; + - | + gpio_fan_cool: gpio_fan { + compatible = "gpio-fan"; + gpios = <&gpio2 14 1 + &gpio2 13 1>; + gpio-fan,speed-map = < 0 0>, + <3000 1>, + <6000 2>; + alarm-gpios = <&gpio2 15 1>; + #cooling-cells = <2>; /* min followed by max */ + }; -- 2.42.0