From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rob Herring Date: Mon, 2 Oct 2023 10:23:43 -0500 Subject: [PATCH v9 1/3] dt-bindings: hwmon: fan: Add fan binding to schema In-Reply-To: <20230918064111.2221594-2-billy_tsai@aspeedtech.com> References: <20230918064111.2221594-1-billy_tsai@aspeedtech.com> <20230918064111.2221594-2-billy_tsai@aspeedtech.com> Message-ID: <20231002152343.GA1747496-robh@kernel.org> List-Id: To: linux-aspeed@lists.ozlabs.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Mon, Sep 18, 2023 at 02:41:09PM +0800, Billy Tsai wrote: > From: Naresh Solanki > > Add common fan properties bindings to a schema. > > Bindings for fan controllers can reference the common schema for the > fan > > child nodes: > > patternProperties: > "^fan@[0-2]": > type: object > $ref: fan-common.yaml# > unevaluatedProperties: false > > Signed-off-by: Naresh Solanki > Signed-off-by: Billy Tsai > --- > .../devicetree/bindings/hwmon/fan-common.yaml | 78 +++++++++++++++++++ > 1 file changed, 78 insertions(+) > create mode 100644 Documentation/devicetree/bindings/hwmon/fan-common.yaml > > diff --git a/Documentation/devicetree/bindings/hwmon/fan-common.yaml b/Documentation/devicetree/bindings/hwmon/fan-common.yaml > new file mode 100644 > index 000000000000..2bd2f57fc9d9 > --- /dev/null > +++ b/Documentation/devicetree/bindings/hwmon/fan-common.yaml > @@ -0,0 +1,78 @@ > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/hwmon/fan-common.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Common Fan Properties > + > +maintainers: > + - Naresh Solanki > + - Billy Tsai > + > +properties: > + max-rpm: > + description: > + Max RPM supported by fan. > + $ref: /schemas/types.yaml#/definitions/uint32 > + maximum: 100000 > + > + min-rpm: > + description: > + Min RPM supported by fan. > + $ref: /schemas/types.yaml#/definitions/uint32 > + maximum: 1000 > + > + pulses-per-revolution: > + description: > + The number of pulse from fan sensor per revolution. > + $ref: /schemas/types.yaml#/definitions/uint32 > + maximum: 4 > + > + tach-div: > + description: > + Divisor for the tach sampling clock, which determines the sensitivity of the tach pin. > + $ref: /schemas/types.yaml#/definitions/uint32 > + > + target-rpm: > + description: > + The default desired fan speed in RPM. > + $ref: /schemas/types.yaml#/definitions/uint32 > + > + fan-driving-mode: > + description: > + Select the driving mode of the fan.(DC, PWM and so on) > + $ref: /schemas/types.yaml#/definitions/uint32 What value corresponds to what mode? I'd do strings instead. 'dc', 'pwm', etc. > + > + pwms: > + description: > + PWM provider. > + maxItems: 1 > + > + "#cooling-cells": > + const: 2 > + > + cooling-levels: > + description: | Don't need '|' > + The control value which correspond to thermal cooling states. > + $ref: /schemas/types.yaml#/definitions/uint32-array > + > + tach-ch: > + description: > + The tach channel used for the fan. > + $ref: /schemas/types.yaml#/definitions/uint8-array > + > + label: > + description: > + Optional fan label > + > + fan-supply: > + description: > + Power supply for fan. > + > + reg: > + maxItems: 1 > + > +additionalProperties: true > + > +... > -- > 2.25.1 > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E1249E784BC for ; Mon, 2 Oct 2023 15:23:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237676AbjJBPXu (ORCPT ); Mon, 2 Oct 2023 11:23:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50328 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237877AbjJBPXt (ORCPT ); Mon, 2 Oct 2023 11:23:49 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 880E4D8; Mon, 2 Oct 2023 08:23:46 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5D0BCC433C7; Mon, 2 Oct 2023 15:23:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696260226; bh=J31MH8/2r2BMfbJUBh+R459Cp6pdTI0Bsk+3NWVzrsE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=hPStttAfTWc+lyohHbX38wiESvCZgMH8ITKZQzHcHdm8G7UCp7Q5ImGYlldQGDmwi JIh2c8/pTqJ9a5pQ3NhFY5MyAysWRzFmSLK7X6uevHewo8kIHvFqKI3FTqgCgMsYXe tsrNuodOO+IXVlt+OKJEsk+m2tAC3V5suY4SDpR6BRTAfxHVR4q3imCOiGoVS5Lh5G yl9Gr2QCptI3ctd6eYSpy9H/998tREUU18ydMG1t2acp89rKMAtxzSXe5yZ8IFFyMG SK15YA+ffl5SMze3JNikC4t3pYswRTXVrWrQ9z/bqAf/vDpvm3RhKRBW+PJ319123s w4RiwFX/fxsdw== Received: (nullmailer pid 1752918 invoked by uid 1000); Mon, 02 Oct 2023 15:23:43 -0000 Date: Mon, 2 Oct 2023 10:23:43 -0500 From: Rob Herring To: Billy Tsai Cc: jdelvare@suse.com, linux@roeck-us.net, krzysztof.kozlowski+dt@linaro.org, joel@jms.id.au, andrew@aj.id.au, corbet@lwn.net, thierry.reding@gmail.com, u.kleine-koenig@pengutronix.de, p.zabel@pengutronix.de, naresh.solanki@9elements.com, linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-pwm@vger.kernel.org, BMC-SW@aspeedtech.com, patrick@stwcx.xyz Subject: Re: [PATCH v9 1/3] dt-bindings: hwmon: fan: Add fan binding to schema Message-ID: <20231002152343.GA1747496-robh@kernel.org> References: <20230918064111.2221594-1-billy_tsai@aspeedtech.com> <20230918064111.2221594-2-billy_tsai@aspeedtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230918064111.2221594-2-billy_tsai@aspeedtech.com> Precedence: bulk List-ID: X-Mailing-List: linux-doc@vger.kernel.org On Mon, Sep 18, 2023 at 02:41:09PM +0800, Billy Tsai wrote: > From: Naresh Solanki > > Add common fan properties bindings to a schema. > > Bindings for fan controllers can reference the common schema for the > fan > > child nodes: > > patternProperties: > "^fan@[0-2]": > type: object > $ref: fan-common.yaml# > unevaluatedProperties: false > > Signed-off-by: Naresh Solanki > Signed-off-by: Billy Tsai > --- > .../devicetree/bindings/hwmon/fan-common.yaml | 78 +++++++++++++++++++ > 1 file changed, 78 insertions(+) > create mode 100644 Documentation/devicetree/bindings/hwmon/fan-common.yaml > > diff --git a/Documentation/devicetree/bindings/hwmon/fan-common.yaml b/Documentation/devicetree/bindings/hwmon/fan-common.yaml > new file mode 100644 > index 000000000000..2bd2f57fc9d9 > --- /dev/null > +++ b/Documentation/devicetree/bindings/hwmon/fan-common.yaml > @@ -0,0 +1,78 @@ > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/hwmon/fan-common.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Common Fan Properties > + > +maintainers: > + - Naresh Solanki > + - Billy Tsai > + > +properties: > + max-rpm: > + description: > + Max RPM supported by fan. > + $ref: /schemas/types.yaml#/definitions/uint32 > + maximum: 100000 > + > + min-rpm: > + description: > + Min RPM supported by fan. > + $ref: /schemas/types.yaml#/definitions/uint32 > + maximum: 1000 > + > + pulses-per-revolution: > + description: > + The number of pulse from fan sensor per revolution. > + $ref: /schemas/types.yaml#/definitions/uint32 > + maximum: 4 > + > + tach-div: > + description: > + Divisor for the tach sampling clock, which determines the sensitivity of the tach pin. > + $ref: /schemas/types.yaml#/definitions/uint32 > + > + target-rpm: > + description: > + The default desired fan speed in RPM. > + $ref: /schemas/types.yaml#/definitions/uint32 > + > + fan-driving-mode: > + description: > + Select the driving mode of the fan.(DC, PWM and so on) > + $ref: /schemas/types.yaml#/definitions/uint32 What value corresponds to what mode? I'd do strings instead. 'dc', 'pwm', etc. > + > + pwms: > + description: > + PWM provider. > + maxItems: 1 > + > + "#cooling-cells": > + const: 2 > + > + cooling-levels: > + description: | Don't need '|' > + The control value which correspond to thermal cooling states. > + $ref: /schemas/types.yaml#/definitions/uint32-array > + > + tach-ch: > + description: > + The tach channel used for the fan. > + $ref: /schemas/types.yaml#/definitions/uint8-array > + > + label: > + description: > + Optional fan label > + > + fan-supply: > + description: > + Power supply for fan. > + > + reg: > + maxItems: 1 > + > +additionalProperties: true > + > +... > -- > 2.25.1 > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id DD4BAE784BE for ; Mon, 2 Oct 2023 15:24:17 +0000 (UTC) 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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=nRmXCiW/K6xzpdUCoMZCco6xA1v3Yz4VQAtHgiXtcqA=; b=rdSZvGMmOMlG+R kQlikEKv8xCmDuHWHtH62ph4W21mV4xrBoXX4b1oBFp2fdE1R/2Di5TLPyHyobtxK6WrxS0nzQ3ok eD4rjK29IO7XE4mNgdx9pcNxNEIx+D95MH1ewpfay99MVJDg9GldZGt8ayzyq/O8U6BnJdYvDJPO2 5cJ5S/XSadBZPQFRCbEGKdkbYoY4Wy3MnElvLdIDPB+qUeKNAmS8HMS9kaNLxsLJgqNx62jXNKjbK 4Xuedud7ECYpCEE0DWYqVQBLJNtqehrBeWQ91mlaEfDkgGkI9S3n4t9k+tP17YXndYyjnC9zL6aOu BHOdzA1VnSzJ6fY+lNwQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qnKlx-00CyxO-1v; Mon, 02 Oct 2023 15:23:49 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qnKlu-00Cyvy-3C for linux-arm-kernel@lists.infradead.org; Mon, 02 Oct 2023 15:23:48 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 7A7BE60EC6; Mon, 2 Oct 2023 15:23:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5D0BCC433C7; Mon, 2 Oct 2023 15:23:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696260226; bh=J31MH8/2r2BMfbJUBh+R459Cp6pdTI0Bsk+3NWVzrsE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=hPStttAfTWc+lyohHbX38wiESvCZgMH8ITKZQzHcHdm8G7UCp7Q5ImGYlldQGDmwi JIh2c8/pTqJ9a5pQ3NhFY5MyAysWRzFmSLK7X6uevHewo8kIHvFqKI3FTqgCgMsYXe tsrNuodOO+IXVlt+OKJEsk+m2tAC3V5suY4SDpR6BRTAfxHVR4q3imCOiGoVS5Lh5G yl9Gr2QCptI3ctd6eYSpy9H/998tREUU18ydMG1t2acp89rKMAtxzSXe5yZ8IFFyMG SK15YA+ffl5SMze3JNikC4t3pYswRTXVrWrQ9z/bqAf/vDpvm3RhKRBW+PJ319123s w4RiwFX/fxsdw== Received: (nullmailer pid 1752918 invoked by uid 1000); Mon, 02 Oct 2023 15:23:43 -0000 Date: Mon, 2 Oct 2023 10:23:43 -0500 From: Rob Herring To: Billy Tsai Cc: jdelvare@suse.com, linux@roeck-us.net, krzysztof.kozlowski+dt@linaro.org, joel@jms.id.au, andrew@aj.id.au, corbet@lwn.net, thierry.reding@gmail.com, u.kleine-koenig@pengutronix.de, p.zabel@pengutronix.de, naresh.solanki@9elements.com, linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-pwm@vger.kernel.org, BMC-SW@aspeedtech.com, patrick@stwcx.xyz Subject: Re: [PATCH v9 1/3] dt-bindings: hwmon: fan: Add fan binding to schema Message-ID: <20231002152343.GA1747496-robh@kernel.org> References: <20230918064111.2221594-1-billy_tsai@aspeedtech.com> <20230918064111.2221594-2-billy_tsai@aspeedtech.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230918064111.2221594-2-billy_tsai@aspeedtech.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231002_082347_133455_5DF13C15 X-CRM114-Status: GOOD ( 19.06 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Sep 18, 2023 at 02:41:09PM +0800, Billy Tsai wrote: > From: Naresh Solanki > > Add common fan properties bindings to a schema. > > Bindings for fan controllers can reference the common schema for the > fan > > child nodes: > > patternProperties: > "^fan@[0-2]": > type: object > $ref: fan-common.yaml# > unevaluatedProperties: false > > Signed-off-by: Naresh Solanki > Signed-off-by: Billy Tsai > --- > .../devicetree/bindings/hwmon/fan-common.yaml | 78 +++++++++++++++++++ > 1 file changed, 78 insertions(+) > create mode 100644 Documentation/devicetree/bindings/hwmon/fan-common.yaml > > diff --git a/Documentation/devicetree/bindings/hwmon/fan-common.yaml b/Documentation/devicetree/bindings/hwmon/fan-common.yaml > new file mode 100644 > index 000000000000..2bd2f57fc9d9 > --- /dev/null > +++ b/Documentation/devicetree/bindings/hwmon/fan-common.yaml > @@ -0,0 +1,78 @@ > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/hwmon/fan-common.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Common Fan Properties > + > +maintainers: > + - Naresh Solanki > + - Billy Tsai > + > +properties: > + max-rpm: > + description: > + Max RPM supported by fan. > + $ref: /schemas/types.yaml#/definitions/uint32 > + maximum: 100000 > + > + min-rpm: > + description: > + Min RPM supported by fan. > + $ref: /schemas/types.yaml#/definitions/uint32 > + maximum: 1000 > + > + pulses-per-revolution: > + description: > + The number of pulse from fan sensor per revolution. > + $ref: /schemas/types.yaml#/definitions/uint32 > + maximum: 4 > + > + tach-div: > + description: > + Divisor for the tach sampling clock, which determines the sensitivity of the tach pin. > + $ref: /schemas/types.yaml#/definitions/uint32 > + > + target-rpm: > + description: > + The default desired fan speed in RPM. > + $ref: /schemas/types.yaml#/definitions/uint32 > + > + fan-driving-mode: > + description: > + Select the driving mode of the fan.(DC, PWM and so on) > + $ref: /schemas/types.yaml#/definitions/uint32 What value corresponds to what mode? I'd do strings instead. 'dc', 'pwm', etc. > + > + pwms: > + description: > + PWM provider. > + maxItems: 1 > + > + "#cooling-cells": > + const: 2 > + > + cooling-levels: > + description: | Don't need '|' > + The control value which correspond to thermal cooling states. > + $ref: /schemas/types.yaml#/definitions/uint32-array > + > + tach-ch: > + description: > + The tach channel used for the fan. > + $ref: /schemas/types.yaml#/definitions/uint8-array > + > + label: > + description: > + Optional fan label > + > + fan-supply: > + description: > + Power supply for fan. > + > + reg: > + maxItems: 1 > + > +additionalProperties: true > + > +... > -- > 2.25.1 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel