Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp1095552lqo; Fri, 17 May 2024 10:27:09 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWeInnQ/f/E0QGMchJIqdbZbxJfDKSstwvKIRc3SPfTU8j6dkWWGG4bgU11lGioIM+F1lQE+SYmgLWgFXwzsod1lbRFpbbFqRfQ6wxwjw== X-Google-Smtp-Source: AGHT+IG9NGL9VMNW0UGasZ0/OSu6b7YGUfQe9aviFcHNirdL4fpvUms2anoygAaHN8bjLZLfYIse X-Received: by 2002:aa7:88c6:0:b0:6ea:dfbf:13d4 with SMTP id d2e1a72fcca58-6f4e02cadacmr29192759b3a.18.1715966828863; Fri, 17 May 2024 10:27:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715966828; cv=pass; d=google.com; s=arc-20160816; b=WXCelO9Zizzy0uUiIR5yvTnv+1tzF3Lca7Y73iaRq0+DXd+36mgDENkEgJUTs9Eb2c fd9yy/6NtCtgIppmkghXYma0mOQd3vA4Eq2m6r25wC6q0sxwAaahmqyCuq2jmd+84HqX c36dtq0tIA2fxKmqTYdGi8BPxFDH0Fjd4Cd4assctsys1G6DkCCa2mZdOjqylzDW0Txj EoaM4k2zemkmuLKuY35ReanfFxymHM3E1+qOAegsJxNuLQW7Tx5nYd77qkcvhe/ToQhM w2RyVP308deb9/ZuF+GqafQB9Tyc14RZwp2q0aRykPSYxl3fCfIhQCNK2wuX0LAGpzFG JnqQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :sender:dkim-signature; bh=qFhu6scfik9QCLOAnYYvnpGmGBk6WeZUSPsJrtBRZm0=; fh=ntYZmO1F1wOPw9vpUScKi0Yr70MrC2BscLLZsYzt2eM=; b=cQlIYLwWF+RPpofg955Q4K+Tov63KMVgwHR4NVPw2n1+hTnC+isQPhrkbTtZYvRu1d +BrQCtxMCbKGGxmj6erLRlq2rBzw7Lf6wuYewWZU95rU85RoGF9/q24Y2AU+1poGBwC7 5+gyFDPv+ZjM8Qbc6fYJQmpOO9vHLYGOJGH+Drw8WvZo5WmxOiOzDhZ7LCXLX2MTL7PK W7LGfFc7F31anVgXktmGIi2w1c4FDW+pYOv/dpzdcJrvdHmufdTPnIp8No5OZhZPj/lQ 0Yys1LHptZ6GLEqeouIc5el4LyqHD2Q4WdbcoFy9rW4JaLanNXANGKSNzbd0oNNwh1E7 N8tg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=iYjqRHwg; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-182410-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-182410-linux.lists.archive=gmail.com@vger.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 d2e1a72fcca58-6f4d2a71e34si18769807b3a.60.2024.05.17.10.27.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 May 2024 10:27:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-182410-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=@gmail.com header.s=20230601 header.b=iYjqRHwg; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-182410-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-182410-linux.lists.archive=gmail.com@vger.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 5F984281857 for ; Fri, 17 May 2024 17:27:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 86E1113DDAA; Fri, 17 May 2024 17:26:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="iYjqRHwg" Received: from mail-pl1-f170.google.com (mail-pl1-f170.google.com [209.85.214.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EDACA13DBBF; Fri, 17 May 2024 17:26:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715966800; cv=none; b=NYR+e2uLf4mSCiz6epz65JMlEyQ4PxvbO2jaem/hPLOJars5cthfwANEURFa1F+qr6Tk8wQ88Odoq5EHEutHfWgwja/jKYVglKpsYVstbks+MD31o4E2IUkFfe5lbCxiGRu8oddVmEbNwZKfbviyW3CRawW4ipRE4zRMlVyoKLw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715966800; c=relaxed/simple; bh=7QPuQ1ae4LqF5VK5+rLgE8Kby7AcOaJ1ezGm3DimhtI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Nt6AWDWEWX+wvYqs3YcPUBfmhe7LZZi77APcKOE+4F0qNCg0QpnnpOyqOMndwRQTzh68+rWQmP5tpYIRvBAoEp5HzRvD1khx2NPp325ZnRrBluS/98Uavb7OljqF2JdUq9RmR2B+JOrr03Aw8RhJUHEEAS9jX9x1BAF7yP5cro8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=roeck-us.net; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=iYjqRHwg; arc=none smtp.client-ip=209.85.214.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=roeck-us.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-f170.google.com with SMTP id d9443c01a7336-1ec4dc64c6cso15012845ad.0; Fri, 17 May 2024 10:26:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715966798; x=1716571598; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:sender:from:to:cc:subject:date:message-id:reply-to; bh=qFhu6scfik9QCLOAnYYvnpGmGBk6WeZUSPsJrtBRZm0=; b=iYjqRHwgM4R7absgpuXmNecCCs48s5gt8cYtnXODElvt0OyL282dc5WwbWB7Umx7oS XoNSvnvkRlPKryJSIf5PurWF9acr8RzjFSEHZnFhxwU6X+xznGz6bNm4mpomDKJQhWpB kXa+Nv6RKXfAkNzzCvN/u2wTihbyrzV2MAqNCJ5heO5I1AZ8vV9sfnFmILbR7EFBbxoB i/QHirBNTlQ6QzZUYYOdSLdnFvqlvogoReYcqkZXbOiEMuGXUDPnKAu8qMJsYyfYEzqR 3226ZxbP74smbYyvHhjRbcjZnHaD+KagoWHSVupkFXLceDn1Q7hRJO5PAwd/AOZfp1Ln bGcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715966798; x=1716571598; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:sender:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=qFhu6scfik9QCLOAnYYvnpGmGBk6WeZUSPsJrtBRZm0=; b=MruXX/vphxCsqQjHbVfmtqYTDzA0ak2aJydkLurmWnZt5uL9vHqfRqWa4PBQPxmklq g3tTToigxYUoNbPsTFFK78NoU/0j2ZLnozEo2ZW89QpP+4jhJhc3LBaepYzB/ALS44dq ucPTO+Wumnag1cIHg2u5kbSUI5f7Zz9JI/k8V6XmSxlWp8Igo/jgjtUbADHFuPw2LTRb 1VHidOnoclqwEXVTCXyDwClYDekyBalJMkEAAsRdlY8qc4IYyM3k4hj8TSV3Wp8a3ntL t1pflxvH58GCfHa4tHL4eAFu/Rk+cPSHOTXi3j9jO6YqV+xjs1YqG2XrMlupJcEvmShW grHA== X-Forwarded-Encrypted: i=1; AJvYcCUjtP9xSNWm5x9GFWg2K4gIaPunRPrecmdnetWNJ+chOddoVsFrGiRXDdaaoY6NrLR33dnOx3PjOkHB6+zeAPiVx/1gPxBvZIbyVDKXxeV/kgAssZoxFa0gMUgPFJsEnq1rdJ9tHTljqib3LLyEJwivhQoKQxuFukQvdtyv1sLZUXLvP+Wc X-Gm-Message-State: AOJu0YwP1Y01WdsUFCpNVCbCXGINK2pm8wqSIGxH0EYh9P4vHqSeiO2L OfFMrGStN9RSEfO6XdO8A4PeCm5P6kg0u+Nl+QTr1cyivcG4JvkO X-Received: by 2002:a17:903:40c9:b0:1eb:d70c:e69f with SMTP id d9443c01a7336-1ef44050d93mr280942305ad.63.1715966797987; Fri, 17 May 2024 10:26:37 -0700 (PDT) Received: from ?IPV6:2600:1700:e321:62f0:329c:23ff:fee3:9d7c? ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1ef0b9d385esm162876035ad.38.2024.05.17.10.26.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 17 May 2024 10:26:36 -0700 (PDT) Sender: Guenter Roeck Message-ID: <7d7252b1-50b6-485c-83f0-f4a8fb766e22@roeck-us.net> Date: Fri, 17 May 2024 10:26:35 -0700 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 1/2] dt-bindings: hwmon: Document adt7475 PWM initial duty cycle To: Conor Dooley , Chris Packham Cc: Krzysztof Kozlowski , "jdelvare@suse.com" , "robh@kernel.org" , "krzk+dt@kernel.org" , "conor+dt@kernel.org" , "linux-hwmon@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" References: <20240508215504.300580-1-chris.packham@alliedtelesis.co.nz> <20240508215504.300580-2-chris.packham@alliedtelesis.co.nz> <94c843e2-4415-4786-bfd4-a77fdbbfab07@roeck-us.net> <35361786-ef5f-4d81-83e8-e347f47c83ed@alliedtelesis.co.nz> <58fb36f5-4d4b-495b-a7cd-6129ab1ed454@alliedtelesis.co.nz> <20240517-pointer-cloning-3889f3d6f744@spud> <20240517-pellet-visa-a2d469dc5f34@spud> Content-Language: en-US From: Guenter Roeck Autocrypt: addr=linux@roeck-us.net; keydata= xsFNBE6H1WcBEACu6jIcw5kZ5dGeJ7E7B2uweQR/4FGxH10/H1O1+ApmcQ9i87XdZQiB9cpN RYHA7RCEK2dh6dDccykQk3bC90xXMPg+O3R+C/SkwcnUak1UZaeK/SwQbq/t0tkMzYDRxfJ7 nyFiKxUehbNF3r9qlJgPqONwX5vJy4/GvDHdddSCxV41P/ejsZ8PykxyJs98UWhF54tGRWFl 7i1xvaDB9lN5WTLRKSO7wICuLiSz5WZHXMkyF4d+/O5ll7yz/o/JxK5vO/sduYDIlFTvBZDh gzaEtNf5tQjsjG4io8E0Yq0ViobLkS2RTNZT8ICq/Jmvl0SpbHRvYwa2DhNsK0YjHFQBB0FX IdhdUEzNefcNcYvqigJpdICoP2e4yJSyflHFO4dr0OrdnGLe1Zi/8Xo/2+M1dSSEt196rXaC kwu2KgIgmkRBb3cp2vIBBII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0H nsDLSLElVROxCd9m8CAUuHplgmR3seYCOrT4jriMFBtKNPtj2EE4DNV4s7k0Zy+6iRQ8G8ng QjsSqYJx8iAR8JRB7Gm2rQOMv8lSRdjva++GT0VLXtHULdlzg8VjDnFZ3lfz5PWEOeIMk7Rj trjv82EZtrhLuLjHRCaG50OOm0hwPSk1J64R8O3HjSLdertmw7eyAYOo4RuWJguYMg5DRnBk WkRwrSuCn7UG+qVWZeKEsFKFOkynOs3pVbcbq1pxbhk3TRWCGRU5JolI4ohy/7JV1TVbjiDI HP/aVnm6NC8of26P40Pg8EdAhajZnHHjA7FrJXsy3cyIGqvg9os4rNkUWmrCfLLsZDHD8FnU mDW4+i+XlNFUPUYMrIKi9joBhu18ssf5i5Q= In-Reply-To: <20240517-pellet-visa-a2d469dc5f34@spud> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 5/17/24 10:02, Conor Dooley wrote: > On Fri, May 17, 2024 at 06:00:06PM +0100, Conor Dooley wrote: >>> On that point. How would I explain in the bindings that cell 2 is the >>> duty cycle, cell 3 is the frequency and cell 4 is the flags? >> >> In the pwm-cells property in the pwm provider binding . You might want to >> order it as as usually that's the ordering done >> in most (all?) pwm provider bindings that I have seen. >> The pwm bindings I think are really unhelpful though - they all say "see >> pwm.yaml for info on the cells in #pwm-cells, but then pwm.yaml has no >> information. The information is actually in pwm.text, but the binding >> conversion did s/pwm.text/pwm.yaml/ in pwm controller bindings. >> I'll send a patch that fixes up pwm.yaml. > > Possibly cell 4 should be standardised as the period for all pwm > providers and then all you'd have to do for your provider is set > #pwm-cells: > minItems: 4 The chip (and other chips using pwm outputs to control fans) have additional configuration parameters such as the minimum and maximum permitted pwm duty cycles, or the startup timeout for various pwm outputs. I may be missing something, but I don't see any such bindings in pwm.txt or pwm.yaml. That is probably (likely ?) not needed for Chris' application, but it is an overall concern since presumably similar bindings should be used for other fan controllers. In this context, I think we'll need nested bindings, because the controller also supports temperature and voltage monitoring. Ultimately we'll also need tach-ch because the controller specifically supports controlling multiple fans from a single pwm channel and needs to be configured accordingly, at least for automatic fan control. Thanks, Guenter