Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp469296lqb; Wed, 29 May 2024 00:39:14 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVE8QMhYB2ti17FH7HfRqBegIsETVO6hsFclYXnDbPTjL8IZLAuEkJh+dUqMzQrLy453m6DZWW0Vl7QDzKQViptF+0rfoc81GyJHYI8AQ== X-Google-Smtp-Source: AGHT+IHpJpdh+XwuitnclRDuMJLNxZJuv0jDy7Q8vwgcLciMTP8pANhgpTjHJ3Gp6BF6tMY2TjXT X-Received: by 2002:a05:6102:282f:b0:47c:abf:385 with SMTP id ada2fe7eead31-48a3850482emr14185581137.4.1716968354564; Wed, 29 May 2024 00:39:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716968354; cv=pass; d=google.com; s=arc-20160816; b=qz7NRsyL5znt1MHk9bAHkE53JpeVUcnrnVmGnuQqsYvg2+70HaKW64wkfA7rG0VYVV Z9TbwPGMVFji4w5R6CdO5dfX2buuKrC0BVDk0gW4BaxbdYtN03C3kHVOxcqVstRL6I45 r3SGcC13tKuanIrXrX00HYVAfCrz8xiWPRY06uZhjuGPaAt4nvX+S7cgP1Y6ldS1tTFT Bv6i44DwEmODq37vthAxpuhDm1ni4u7y83RudSIQr55HFNioHcqXxEdl1cFhaDyL7Pz+ 7JYaB6Sx/yNyvOny+8QPrJWVsP5gJeNsVHgTTUMJDr3gimsDomvd1DzKpvWUgihwPUJy jr6Q== 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=PMWuHHlXXzv11S4C3a3lZKy9zBxv1Qumk0c7BpqWlWA=; fh=twdhk8gL6OIJiEPJmvYOyyup6uIS4XSvIJoEfpajC4w=; b=SLsXMgyq8laLfiuHilD/PX9hfAbrttvJb0XF+JXPenPuyljCbLQoMotGsdyBU9pR9N X68cSh6EkkYtVOZFWExL8OoNUF0YwsqwX7kGXqcpPpYJFbflK3nhbGeh+C4TCdN6RulC cGQGJrYCTZKK9JVCs7iebFjKPCRx/uh+27pnAk4KTQlqBX1o0mXL1lAyKw1dJq9VFvMd 5pTzduE5OOhcUXa46wOLm+Iil900JlsO6A5foNR4zjCOBX9M7+tyLTMY8p2lSdhHiXsp xL6BLVVMmt8J/+jSB7RgjVD0xUtOhqcT0Na5Hw+97tyiRNsBhN3Yf3IzxWaQdlQSYw9M lClg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=UdK0QMqj; arc=pass (i=1 spf=pass spfdomain=microchip.com dkim=pass dkdomain=microchip.com dmarc=pass fromdomain=microchip.com); spf=pass (google.com: domain of linux-kernel+bounces-193597-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-193597-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microchip.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d75a77b69052e-43fb18d3edcsi133174011cf.711.2024.05.29.00.39.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 May 2024 00:39:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-193597-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=UdK0QMqj; arc=pass (i=1 spf=pass spfdomain=microchip.com dkim=pass dkdomain=microchip.com dmarc=pass fromdomain=microchip.com); spf=pass (google.com: domain of linux-kernel+bounces-193597-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-193597-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microchip.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 3D44D1C211CF for ; Wed, 29 May 2024 07:39:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1C4D1167D8B; Wed, 29 May 2024 07:39:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="UdK0QMqj" Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) (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 0116B1E86E; Wed, 29 May 2024 07:39:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=68.232.153.233 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716968346; cv=none; b=medjl86AbOc8hCpyc7faaPrXeCpE1viqIWrdnDl+aglwiHGjBTaJsUU1pgKu2Q1j1IaT/zNyKJ+JtfyGEavSvYfQIQUcEd44UqQhvpo08DPJKuXT182OXjNKjyqYs2cCB0Fas2T5Ct7tKrouSspxmyanfRGhhJG+qVdXCSGs+Tc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716968346; c=relaxed/simple; bh=jOZf9FxB8Chj+I1FF/6xKPuMzy4ZIWetvg9cXl3DtL4=; h=Date:From:To:CC:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=VEMsA84IybwLt1NoJJ+7F5x72NFicyxBMl6kDTji/hM9z2NbRCD7ld+PBRaW/iNco4NyMYWrbGCdGfjYTIx0MwyWLx/o5ETxcJbsbZ0XFVk7L3ru4dBEiJitBwwRenBDeK2w1f5aXRcRFlWXFbFPkBUY2zkyVMBHDmMIOP99Ca0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com; spf=pass smtp.mailfrom=microchip.com; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b=UdK0QMqj; arc=none smtp.client-ip=68.232.153.233 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=microchip.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1716968344; x=1748504344; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=jOZf9FxB8Chj+I1FF/6xKPuMzy4ZIWetvg9cXl3DtL4=; b=UdK0QMqjLOuWQ4Ty74eJkOwkbFdcQ2tf+Fsq+CucXJ9EHDHBtWcb/hCW w2dnt6mvnKyyP8wBsJMWJ4U4++kgYIJnxUdrIi2TR8zZuOL8dvj829GUB h24ATH6m9eoioKugzYDighJg9BbCrLNjvX1Wiiq59yR9PryofSQOcQC6g VNWFaMe9wzxyI9/sDTGAPBYpj/6/LYMKwaikP22fFCD+jfvlSRZSE/Uqs n7aZHQ+jWHbD17uxTT+9VmkaRoctb6nPS6/fPEeat+KRU3rnkZQVpoKOv mXC/S/MfLCO980ZK3qz2pjWXIyIZ79MERN6azBNqZ3obeOQXTQHq7Xj+9 A==; X-CSE-ConnectionGUID: ozutHQsqTHWSlsdEABSroQ== X-CSE-MsgGUID: DtTm/icsSPe7NZvAEAQ+mw== X-IronPort-AV: E=Sophos;i="6.08,197,1712646000"; d="asc'?scan'208";a="257520481" X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa5.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 29 May 2024 00:39:02 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Wed, 29 May 2024 00:38:59 -0700 Received: from wendy (10.10.85.11) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Wed, 29 May 2024 00:38:57 -0700 Date: Wed, 29 May 2024 08:58:41 +0100 From: Conor Dooley To: Chris Packham CC: , , , , , , , , , Subject: Re: [PATCH v4 1/3] dt-bindings: hwmon: Add adt7475 fan/pwm properties Message-ID: <20240529-faucet-vending-3e330f8eb67b@wendy> References: <20240528225638.1211676-1-chris.packham@alliedtelesis.co.nz> <20240528225638.1211676-2-chris.packham@alliedtelesis.co.nz> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="4wiA+HKJ9TqC3xZp" Content-Disposition: inline In-Reply-To: <20240528225638.1211676-2-chris.packham@alliedtelesis.co.nz> --4wiA+HKJ9TqC3xZp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, May 29, 2024 at 10:56:36AM +1200, Chris Packham wrote: > Add fan child nodes that allow describing the connections for the > ADT7475 to the fans it controls. This also allows setting some > initial values for the pwm duty cycle and frequency. >=20 > Signed-off-by: Chris Packham > --- >=20 > Notes: > I realise there is still some discussion about how to express the > frequency and duty cycle. I have a personal preference for using hertz > for the frequency and 0-255 for the duty cycle but if the consensus is > to express these things some other way I'm fine with doing some math. Probably worth carrying a link to it here: https://lore.kernel.org/all/4de798f3-069e-4028-a5b5-5e6a639277e3@alliedtele= sis.co.nz/ I asked Uwe to take a look & it's on his todo list. Thanks, Conor. > =20 > Changes in v4: > - 0 is not a valid frequency value > Changes in v3: > - Use the pwm provider/consumer bindings > Changes in v2: > - Document 0 as a valid value (leaves hardware as-is) >=20 > .../devicetree/bindings/hwmon/adt7475.yaml | 25 ++++++++++++++++++- > 1 file changed, 24 insertions(+), 1 deletion(-) >=20 > diff --git a/Documentation/devicetree/bindings/hwmon/adt7475.yaml b/Docum= entation/devicetree/bindings/hwmon/adt7475.yaml > index 051c976ab711..bfef4c803bf7 100644 > --- a/Documentation/devicetree/bindings/hwmon/adt7475.yaml > +++ b/Documentation/devicetree/bindings/hwmon/adt7475.yaml > @@ -51,6 +51,15 @@ properties: > enum: [0, 1] > default: 1 > =20 > + "#pwm-cells": > + const: 4 > + description: | > + Number of cells in a PWM specifier. > + - 0: The pwm channel > + - 1: The pwm frequency in hertz - 11, 14, 22, 29, 35, 44, 58, 88, = 22500 > + - 2: PWM flags 0 or PWM_POLARITY_INVERTED > + - 3: The default pwm duty cycle - 0-255 > + > patternProperties: > "^adi,bypass-attenuator-in[0-4]$": > description: | > @@ -81,6 +90,10 @@ patternProperties: > - smbalert# > - gpio > =20 > + "^fan-[0-9]+$": > + $ref: fan-common.yaml# > + unevaluatedProperties: false > + > required: > - compatible > - reg > @@ -89,11 +102,12 @@ additionalProperties: false > =20 > examples: > - | > + #include > i2c { > #address-cells =3D <1>; > #size-cells =3D <0>; > =20 > - hwmon@2e { > + pwm: hwmon@2e { > compatible =3D "adi,adt7476"; > reg =3D <0x2e>; > adi,bypass-attenuator-in0 =3D <1>; > @@ -101,5 +115,14 @@ examples: > adi,pwm-active-state =3D <1 0 1>; > adi,pin10-function =3D "smbalert#"; > adi,pin14-function =3D "tach4"; > + #pwm-cells =3D <4>; > + > + fan-0 { > + pwms =3D <&pwm 0 22500 PWM_POLARITY_INVERTED 255>; > + }; > + > + fan-1 { > + pwms =3D <&pwm 2 22500 PWM_POLARITY_INVERTED 255>; > + }; > }; > }; > --=20 > 2.45.1 >=20 --4wiA+HKJ9TqC3xZp Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZlbgLAAKCRB4tDGHoIJi 0tu6AP4/nFnJfrf121gHJBfzksW6XCKET471Txd1cGwJLuTE8QD+OUN7EKN/Vkag 6uwCY8eQG03BAO5DRYNaweHCiQSzdgQ= =LSol -----END PGP SIGNATURE----- --4wiA+HKJ9TqC3xZp--