Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp477547lqp; Thu, 21 Mar 2024 07:03:47 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXEOjFckNLKO8Vk/O8Ssu0kkVzg/hLy6jPKccKZ8PyidONJZXnT3KiNGQBdQoHLIzQ8qAIi1LUiNS3/de/q/2rpajjoYpe0JM+pu7NHaw== X-Google-Smtp-Source: AGHT+IGR1Id4QzRhwE2XgsLyO8eSQi+SPaJN3+jBw9HBObUGfuTEpTLl83m51MBGgdTslIEHzMDO X-Received: by 2002:a17:902:ea0b:b0:1df:fbc3:d131 with SMTP id s11-20020a170902ea0b00b001dffbc3d131mr2548665plg.27.1711029826690; Thu, 21 Mar 2024 07:03:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711029826; cv=pass; d=google.com; s=arc-20160816; b=t1zBkxsiVkdIcsismBL4Szj7/wTIXt3dieMZH6XKywaMb6jfcuRX9teCmVf01M7TTS kWaHkQu6agM2xmdJT5+N1Glu/8WTNb1tUQu4cYYsPXJ0Mbfu7BEieNsGMc78G/1qi9Al XQ9O0+phK0usa0iFdw+aQriFtQHZumzuFmmx88pZrtzBvwEI6XHAGLO8cUkDXYQStSrg S0rroKn8N/97OJ/Aa4GQIgoguGulf1dSMlJ/NOUZOZzK8a5TM6cw4ECr3gJoniHN4EY/ mIl/MeX/m/mktuYlhGUBl6vjLe2FhcfTWe9fBJFjdV+NspoRuPeqCh5T916Iczzv9uXn AgNg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=zulNk3z/8JTpDYUeDBAVNklffHSTojzkcGkZxh10hvE=; fh=K8Bh892yBFmjxRpOcEOwdj6vmRyRsQPnitGxRUqsFJY=; b=cwwrpeWCrCLY3Zabyo8mjzgebOvfilDdBmluejml0JclcJYcrmaktgUe+Pm/XWy+1G /900QPyysRpzWApgPhmubw0rnGq1bGOgLatZmheFh7vqSnne566ttNCs3l/GzxGtnZQr U11XOmu2AwPpyaQOZxTwqBpuUpvUzCecz0SdtnvFrwwazEjSVu+unZ06ZEMeYuj8zT6e W4ozfb30idiDkCncuDG8fA6KBvyFj449+AYngIIkaTZACniDcehvR3CUnUYmw6ntO9BI n8Gy8d4HwhEb921TAVaJki/KE8QFZhL0WJHdUDQuO9agwg6MwFuzCj5CGa01YlmXRHYf 24KA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mj1mMVIB; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-110120-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-110120-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d22-20020a637356000000b005e43cb66c1asi14613408pgn.329.2024.03.21.07.03.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Mar 2024 07:03:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-110120-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mj1mMVIB; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-110120-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-110120-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 59E0D2831DA for ; Thu, 21 Mar 2024 14:03:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0331684FB7; Thu, 21 Mar 2024 14:03:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="mj1mMVIB" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 208B358AA8; Thu, 21 Mar 2024 14:03:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711029819; cv=none; b=puZIKZ7yqr6YN/wV/3W4is9POsHcELGgfiBtrzfkRR7hDur9dg07CLP6ZtN86hxtaxw6kbKtDMqb8jm1HvZXnKD1GuU7aUPv9PlcGQBv4Znty3hUSRhz+SiMflboFG7iWkZoJHGlDnZCwwCRG4sDz6pRfCWBrCuzJhN77ThGrXs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711029819; c=relaxed/simple; bh=EDTfNG01mNck7oovqk3rbelnkIsr/GyWywA2AJy9N/o=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ZLX8w+acB+WTUFuXhdJxByDMnHLAjHDMdm42tPG3EPlNN9+8VEnnBRuZyrzp5J7fOy40bcQVIU2CefFTMUx+31kAN1luhIFCw8JA/neqHtI+JPDUhXJp2od1QaOZpKKnSw/AmtEOPKayYD/lljelUDW3uIMARvylifZMHxJiatY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=mj1mMVIB; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id B18F5C433F1; Thu, 21 Mar 2024 14:03:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711029818; bh=EDTfNG01mNck7oovqk3rbelnkIsr/GyWywA2AJy9N/o=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=mj1mMVIB5r4PTJkPy0n1SkwglSpgL+22sXDwmi9LAfniig4nTO04AgnY3ykhGyQw3 9MS3Q3UQuO7MZXcMlBo0KvUljxleFvxWcSOTZFO5xZyOCj/YjfDVOwHolqESwN08TB GAjesDKvvZ8ixHOiJ9+9c8AS7fQquIcNvPRygTEAjHUrKy6tA1x9oijKhsPhgcUHjM ZvnwNLPyiM6NzJ1aBQ64iDmws7GaekVGsQ0rjVbqtDQSJ49ph/wkDd7XaoaOPgCi5E GbRzQA2DyQ8s+fLfjpaH3zjerD5/xRhLcgtNNE5SkyLDPddUtRnwdzO9nf+7S14iAz amrCSnkvI+Y4g== Date: Thu, 21 Mar 2024 09:03:36 -0500 From: Rob Herring To: Javier Carrasco Cc: Jean Delvare , Guenter Roeck , Krzysztof Kozlowski , Conor Dooley , peiyu li <579lpy@gmail.com>, linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] dt-bindings: hwmon: max6650: convert to dtschema Message-ID: <20240321140336.GA1648289-robh@kernel.org> References: <20240320-hwmon_yaml-v1-0-a349ca21ccab@gmail.com> <20240320-hwmon_yaml-v1-2-a349ca21ccab@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240320-hwmon_yaml-v1-2-a349ca21ccab@gmail.com> On Wed, Mar 20, 2024 at 06:04:58PM +0100, Javier Carrasco wrote: > Convert existing bindings to dtschema to support validation. > > This is a straightforward conversion with no new properties. Why the indentation? > > Signed-off-by: Javier Carrasco > --- > .../devicetree/bindings/hwmon/max6650.txt | 28 --------- > .../devicetree/bindings/hwmon/maxim,max6650.yaml | 68 ++++++++++++++++++++++ > 2 files changed, 68 insertions(+), 28 deletions(-) > > diff --git a/Documentation/devicetree/bindings/hwmon/max6650.txt b/Documentation/devicetree/bindings/hwmon/max6650.txt > deleted file mode 100644 > index f6bd87d8e284..000000000000 > --- a/Documentation/devicetree/bindings/hwmon/max6650.txt > +++ /dev/null > @@ -1,28 +0,0 @@ > -Bindings for MAX6651 and MAX6650 I2C fan controllers > - > -Reference: > -[1] https://datasheets.maximintegrated.com/en/ds/MAX6650-MAX6651.pdf > - > -Required properties: > -- compatible : One of "maxim,max6650" or "maxim,max6651" > -- reg : I2C address, one of 0x1b, 0x1f, 0x4b, 0x48. > - > -Optional properties, default is to retain the chip's current setting: > -- maxim,fan-microvolt : The supply voltage of the fan, either 5000000 uV or > - 12000000 uV. > -- maxim,fan-prescale : Pre-scaling value, as per datasheet [1]. Lower values > - allow more fine-grained control of slower fans. > - Valid: 1, 2, 4, 8, 16. > -- maxim,fan-target-rpm: Initial requested fan rotation speed. If specified, the > - driver selects closed-loop mode and the requested speed. > - This ensures the fan is already running before userspace > - takes over. > - > -Example: > - fan-max6650: max6650@1b { > - reg = <0x1b>; > - compatible = "maxim,max6650"; > - maxim,fan-microvolt = <12000000>; > - maxim,fan-prescale = <4>; > - maxim,fan-target-rpm = <1200>; > - }; > diff --git a/Documentation/devicetree/bindings/hwmon/maxim,max6650.yaml b/Documentation/devicetree/bindings/hwmon/maxim,max6650.yaml > new file mode 100644 > index 000000000000..1b33b5fb606d > --- /dev/null > +++ b/Documentation/devicetree/bindings/hwmon/maxim,max6650.yaml > @@ -0,0 +1,68 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +%YAML 1.2 > +--- > + > +$id: http://devicetree.org/schemas/hwmon/maxim,max6650.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Maxim MAX6650 and MAX6651 I2C Fan Controllers > + > +maintainers: > + - Javier Carrasco > + > +description: | > + The MAX6650 and MAX6651 regulate and monitor the speed > + of 5VDC/12VDC burshless fans with built-in tachometers. > + > + Datasheets: > + https://datasheets.maximintegrated.com/en/ds/MAX6650-MAX6651.pdf > + > +properties: > + compatible: > + enum: > + - maxim,max6650 > + - maxim,max6651 > + > + reg: > + maxItems: 1 > + > + maxim,fan-microvolt: > + description: > + The supply voltage of the fan, either 5000000 uV or > + 12000000 uV. Looks like constraints. Please add them. > + > + maxim,fan-prescale: > + description: > + Pre-scaling value, as per datasheet. Lower values > + allow more fine-grained control of slower fans. > + $ref: /schemas/types.yaml#/definitions/uint32 > + enum: [1, 2, 4, 8, 16] > + > + maxim,fan-target-rpm: > + description: > + Initial requested fan rotation speed. If specified, the > + driver selects closed-loop mode and the requested speed. > + This ensures the fan is already running before userspace > + takes over. > + $ref: /schemas/types.yaml#/definitions/uint32 Constraints? I'm sure no fan RPM is higher than 10000 and probably much less than that. Rob