Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1275372rdb; Wed, 6 Dec 2023 13:50:48 -0800 (PST) X-Google-Smtp-Source: AGHT+IFFK+SNi+hErGemzkRVv56Ln1udZmTXDanTXSqLjhVoD1dEvYg9pdpqPzv6kxLzhsbm2tox X-Received: by 2002:a05:6a20:42a6:b0:18b:8b4:2dde with SMTP id o38-20020a056a2042a600b0018b08b42ddemr1797531pzj.61.1701899448429; Wed, 06 Dec 2023 13:50:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701899448; cv=none; d=google.com; s=arc-20160816; b=vTMEGIBfCXc6Yb80cHaa3oEoykwJzSYLH+Ck7LJGSdwlcBLnC/wkSKxs5EPklju44i zVvNCo1QPD6Ui0znLREs9BCb0w0XCa6myLupKVoPhB25ndW0VBWhC9eDK5qpMFEgvthP bF8W4Nfhgh2wzJuXz0902cvYCv7i2r6S3qdl/MzAn+VvvMK8g7xF2ojt63KurHHBXVBy ZShI9TrnZ85LUbKYwPAHHZEPyPxdCHHbvSZdNEw4ExHzsyJjJ01gQRzIRbGgYdZT94Go ACBhiu12dciyMNjuqmhPsze4uaq6ZyFq7wvjaLqPt644k1dJ9KgHQNVSuLeVlx3ji+Tu 7Q3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=aEnrg1KlYR6vf/zDP0yzao4X3UI09Y6k9tq3wxu2Hyk=; fh=bf5qPRsm6uUCDthCn1KUVDXvO9n3KOpUFdfYOUmH0Sk=; b=YIEsrNFKC1TxrPuWVicjCxVx1Kkvd3IGHqtuD/qorr+EjgQN1LEB3HFuyETNnxl6rd 2YNhZKkAhF+BzKyfEvg9wGxZTKFk7MRnb/x/KO9WDLZAIIy2J0U6XOCEvDl1KYfz4X7A GvWTJlUfVlKHOL3SGm9XOKHYn0djEGSxisc8WalYqZIYbmpOrfnxKt0H/cASCxiNX4WJ iTGqI38q8EdDgOPN1E1DbKub3fRW+BrrkPVYn4jX46okIwVhEPfyokp5cxlSTzzIh8OY 5MNXVmfmcDfou/F2+EZ3ROubzk+a1objBpm7kHUA5nDUBR7vBP2MHyJj3e+fpvY48Srs RqbQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id t189-20020a6381c6000000b005bdfb77e552si481580pgd.439.2023.12.06.13.50.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 13:50:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 4E657808D294; Wed, 6 Dec 2023 13:50:34 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377252AbjLFVuO (ORCPT + 99 others); Wed, 6 Dec 2023 16:50:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59788 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230383AbjLFVuN (ORCPT ); Wed, 6 Dec 2023 16:50:13 -0500 Received: from mail-oi1-f171.google.com (mail-oi1-f171.google.com [209.85.167.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D869E8F; Wed, 6 Dec 2023 13:50:18 -0800 (PST) Received: by mail-oi1-f171.google.com with SMTP id 5614622812f47-3b9d2b8c3c6so202925b6e.1; Wed, 06 Dec 2023 13:50:18 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701899418; x=1702504218; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=aEnrg1KlYR6vf/zDP0yzao4X3UI09Y6k9tq3wxu2Hyk=; b=jQ39/hVKGkpq7jOKtOB/YLWL7yjPN/spVP3CjlPoPpeTdCo6ZLY8iKhTx3p7bJzD6I ma+dOp8xa8x6J+pRergvvj5HjqnL0Sj9VMLUVbn3eSdcGVqY45R5F+2R0XX4/VmJXNN3 YzL/bJMPnlLB02g+9hJjSzkkTepFyxRxM/rhmhdEZdYPPnGRhQBGOmkW6PXgzSiHJakZ Bi+XnCNt66qZdhizuwirpDMsl6CnCwc0fV8KKp+gqU8A1O8ACpl6e+mbRlb4dy8Vd/SX cHUFUBQjUC5zaccgUGV6MD36YF37V1RnT2oJUPCiTbsn6s51Qoq97Rwl3mb2tEZNE5CI tUTQ== X-Gm-Message-State: AOJu0YyQONmZ2shU3q/s7eKZotzohhz2TKbKTM963Ump2S7KUB2Jsu9+ 9e2xkLHNJR+MhcRaG7ta6Q== X-Received: by 2002:a05:6808:209d:b0:3b8:b063:8247 with SMTP id s29-20020a056808209d00b003b8b0638247mr1940169oiw.73.1701899418101; Wed, 06 Dec 2023 13:50:18 -0800 (PST) Received: from herring.priv (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id n22-20020a9d6f16000000b006d87f95566bsm119111otq.51.2023.12.06.13.50.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 13:50:17 -0800 (PST) Received: (nullmailer pid 3384012 invoked by uid 1000); Wed, 06 Dec 2023 21:50:16 -0000 Date: Wed, 6 Dec 2023 15:50:16 -0600 From: Rob Herring To: David Heidelberg Cc: Jean Delvare , Guenter Roeck , Krzysztof Kozlowski , Conor Dooley , linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 1/5] dt-bindings: arm: hwmon: gpio-fan: Convert txt bindings to yaml Message-ID: <20231206215016.GA3379159-robh@kernel.org> References: <20231202222934.137191-1-david@ixit.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231202222934.137191-1-david@ixit.cz> X-Spam-Status: No, score=-1.0 required=5.0 tests=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 groat.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 (groat.vger.email [0.0.0.0]); Wed, 06 Dec 2023 13:50:34 -0800 (PST) On Sat, Dec 02, 2023 at 11:29:00PM +0100, David Heidelberg wrote: > 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 { Drop unused labels. > + 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 */ > + }; Not really much difference in the 2 examples. Drop the first one (having fewer properties). Rob