Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp1208249lqd; Thu, 25 Apr 2024 08:46:31 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUH7u+kK/54G2QbCLIZmwGMBPcqEOx3fYc5Z36YgPHYRthrnbHwDANDGSoCYztP3C98JZuXva+QcjA8QmEy6zS1svWQij2dwCtzRX8Y4g== X-Google-Smtp-Source: AGHT+IFVIAaEnQO7jE5/A/HAfkhMlEN0XqXb1S0zlIwepRzy6CBqnqteRh09W6dnmbqx0H2Oo2qj X-Received: by 2002:a17:906:40d4:b0:a58:873e:a058 with SMTP id a20-20020a17090640d400b00a58873ea058mr95784ejk.27.1714059990927; Thu, 25 Apr 2024 08:46:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714059990; cv=pass; d=google.com; s=arc-20160816; b=LL5AL2gnkZb7pgAigXg9ms1YOoBhwVOjyoHaWu3brYg+1dnUfoM9hGpnv4wc1B69j3 1K85fIbV0iTX7MaG7cxvIinklab/3bW60zeZhNPnQmesoWnnWHsSJkHXqP3FzsPXN2jn 7kkvL0q73iwoSJNPHOa3VYtiZZdoEo2dg7Jw39aUPLioV0R8HOGE29EOoRJVL+qlCBFt RaJNLhuUDI1pRV5aLjc6AbdZ75iUEI5Gr5dUOzyiT/N+lBX56mY8AZGUBZb/O2RrwHHB ESlfEai5a2L7xu1b8IH0smhPU/WkHMl6J6yrZPj3zgwqg4Gca1Mom8LjEjZqVBLXU/Kr iWkA== 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:content-language :from:references:cc:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=wCdxJ+q4o3pPwabMdF8nZZpueZWNvS6ScA7rit1v9g4=; fh=lLCQ6d0gZXS7KIMXvgHeWcP41bDsqB2975IXOCu8lZs=; b=wf2vn1Hdp5hXKFyVMf7Y+aozOWcx3egGys7Yu4HvFV7aCRQUSNhilBWhEIFdusW7tS 99wrrR6jh61TVnwJDL87cV7pz7NsC7qNjIYrTTjNt3FMIHtnsX+0Ut8/wNBNm7bBI7ms uilOUh7AxOfjKh8w5SUo9FsupiB3ecFrkGWOoLyRWj18qgpSMmpMFTnNr9X5A5D5Zdy5 LP6eHLysct/PyHFnAPLhne3uPb/wU7Alw9hGVjbftczO1/gpVkQACL67xJkKAxnBQQIv Aw1sBwv/6elr0nKPF1tjXLCs34SogFf7OM7x2a91L8NvL80tQTVfrhBaoc56Xy6uF7lE Pi5w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yXP2Ic6W; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-158835-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-158835-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id b8-20020a17090691c800b00a55adce78a1si6129031ejx.279.2024.04.25.08.46.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Apr 2024 08:46:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-158835-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yXP2Ic6W; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-158835-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-158835-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 522C71F2150C for ; Thu, 25 Apr 2024 15:46:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 53C7214C5BD; Thu, 25 Apr 2024 15:46:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="yXP2Ic6W" Received: from mail-ed1-f53.google.com (mail-ed1-f53.google.com [209.85.208.53]) (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 9D5AC14C5A1 for ; Thu, 25 Apr 2024 15:46:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714059968; cv=none; b=tLeCwd9KC1Z4j/rRUHr+Fj45sS2TnbKCTPKpV2i5QebntY92FVDWtBgGj6Hha1YXXbUkdYK+MmXzb1v21+sO+YamwleHDkuf1zGP0OBCjg/euGi1B7lzR+sBPfc9iKalcjcYun7Le5qPE6dP60BCA4lMrPvKkqbmTf0uhYE+u98= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714059968; c=relaxed/simple; bh=ARPhOPhDgTEQgJncPtrsgbR8sVcAO1VcNK+RH2Rvv7E=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=hZm7Ff8a3Lufj3cxmLNC4sXt2JFCJPSVZE1GYu6m5hJlo3K00Zvg5+y+pqrnaV8C6hBcgEsRsyAk0aINrpFzshOt5SKxwoZEAKu/Tvki46H9l5VTnbZLWuCNDoTjOMLma2DPUYhNgnw6hJ1iCtuXIKSCPmG/w3XB1OYgWSoxIHQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=yXP2Ic6W; arc=none smtp.client-ip=209.85.208.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-ed1-f53.google.com with SMTP id 4fb4d7f45d1cf-5724e69780bso278973a12.0 for ; Thu, 25 Apr 2024 08:46:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714059965; x=1714664765; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :from:references:cc:to:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=wCdxJ+q4o3pPwabMdF8nZZpueZWNvS6ScA7rit1v9g4=; b=yXP2Ic6Wim+7n8MwPWojLInIF7f+vLFEv1td5ZrUzAT4WQeiqfzxriEoWPdihzaNDt 2VGTXp3x6ap8HyC+TbM5qRZVAwafwT/F6F428bYaEA8t+BbG1OXQ673A9MDs5izSSJ7t CU/PVttdVqZc1ayqGPx4czgQN2q6PDXqpAeWaEyZSs6iAwTSbXDY7yIYKdEPXrXOZXV+ DMoa2fwc0+TTvIII1rCKl48t8FNJKjya9IASn4h75qKgL+pw3CuMI9IHHD9Vgbr5FV/e ZmLUcg5NygOyAre8/nPEBVAwZFq1+h2WXYwuixBxMsGGj8DNv5hZf1wjEfbYs2TU2NBf DWOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714059965; x=1714664765; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :from:references:cc:to:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=wCdxJ+q4o3pPwabMdF8nZZpueZWNvS6ScA7rit1v9g4=; b=IWeNjsB5QndNOutnWvQIIuRh7DZFSm67kvpEhdHPn8+kpllfzuzNSjw6S9seP+TaEz fO7p+WE4PKLluJ1hUpnlpFJ7hr/wk8B5nv9thCR2SBQIkrTeZHxVBCYEYKBRDZdDGsL8 44f64BuKdUjvLld3M+muqEhDL1+13Ozz8FVHsAO5QR9QNYHpyzADJHCTWIbuXaONzj0K ePG5tAHrljBZHmbTzsjS5OV45UfEXiggN9xWnNjL3xU2H1BXkW6kEYHvwt/xTU2+Uz2d 3UpS0EqWnfeRU3jb1EYpRLZBndhq7Z65uscdua/nP1wjPPqXdPMFFnkTIuwYnX0w32D8 qQBg== X-Forwarded-Encrypted: i=1; AJvYcCV8V/BkUMHZyB4FwaTjWKx+YHWc0IKI7kD2TsYfTZWH4KosfRPm8ZZNpilzWZwi+KKpia7rEOLD48wK0EmTWT6kJ55ySUNdLM3Hpt1A X-Gm-Message-State: AOJu0Yw/XGB5WV3Fm77FkRw8Njf0ddjlhJ6R68XUpP8FAYi7hZbIiEgz VlWQPHcV/oTaiPXI4AoPicKeMTxnIkboQ8a5taMvn4UZaRSLB/YF6WKGzvNaZuN9xqT4XzwGQ5O S1c0= X-Received: by 2002:a50:d4d2:0:b0:56d:e6f6:f73c with SMTP id e18-20020a50d4d2000000b0056de6f6f73cmr3670436edj.42.1714059965005; Thu, 25 Apr 2024 08:46:05 -0700 (PDT) Received: from [192.168.1.20] ([178.197.223.16]) by smtp.gmail.com with ESMTPSA id i19-20020a50fc13000000b0056fed8e7817sm8916217edr.20.2024.04.25.08.46.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 Apr 2024 08:46:04 -0700 (PDT) Message-ID: Date: Thu, 25 Apr 2024 17:46:02 +0200 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 3/3] dt-bindings: hwmon: max31790: Add maxim,pwmout-pin-as-tach-input property To: Guenter Roeck , Chanh Nguyen , Conor Dooley Cc: Chanh Nguyen , Jean Delvare , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Justin Ledford , devicetree@vger.kernel.org, linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org, OpenBMC Maillist , Open Source Submission , Phong Vo , Thang Nguyen , Quan Nguyen References: <20240414042246.8681-1-chanh@os.amperecomputing.com> <20240414042246.8681-4-chanh@os.amperecomputing.com> <13b195e6-cbbd-4f74-a6fa-d874cb4aaa45@linaro.org> <065243cc-09cf-4087-8842-bd4394fb324f@amperemail.onmicrosoft.com> <20240423-gallantly-slurp-24adbfbd6f09@spud> <396b47f5-9604-44ab-881f-94d0664bcab8@roeck-us.net> From: Krzysztof Kozlowski Content-Language: en-US Autocrypt: addr=krzysztof.kozlowski@linaro.org; keydata= xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79 cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeYJtjUH0ZX6ndJ33FJYf5V3yXqqjcZ30FgHzJCFUu JMp7PSyMPzpUXfU12yfcRYVEMQrmplNZssmYhiTeVicuOOypWugZKVLGNm0IweVCaZ/DJDIH gNbpvVwjcKYrx85m9cBVEBUGaQP6AT7qlVCkrf50v8bofSIyVa2xmubbAwwFA1oxoOusjPIE J3iadrwpFvsZjF5uHAKS+7wHLoW9hVzOnLbX6ajk5Hf8Pb1m+VH/E8bPBNNYKkfTtypTDUCj NYcd27tjnXfG+SDs/EXNUAIRefCyvaRG7oRYF3Ec+2RgQDRnmmjCjoQNbFr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TAbSUlzgjiyyjuXhcwM qf3lzsm02y7Ooq+ERVKiJzlvLd9tSe4jRx6Z6LMXhB21fa5DGs/tHAcUF35hSJrvMJzPT/+u /oVmYDFZkbLlqs2XpWaVCo2jv8+iHxZZ9FL7F6AHFzqEFdqGnJQqmEApiRqH6b4jRBOgJ+cY qc+rJggwMQcJL9F+oDm3wX47nr6jIsEB5ZftdybIzpMZ5V9v45lUwmdnMrSzZVgC4jRGXzsU EViBQt2CopXtHtYfPAO5nAkIvKSNp3jmGxZw4aTc5xoAZBLo0OV+Ezo71pg3AYvq0a3/oGRG KQ06ztUMRrj8eVtpImjsWCd0bDWRaaR4vqhCHvAG9iWXZu4qh3ipie2Y0oSJygcZT7H3UZxq fyYKiqEmRuqsvv6dcbblD8ZLkz1EVZL6djImH5zc5x8qpVxlA0A0i23v5QvN00m6G9NFF0Le D2GYIS41Kv4Isx2dEFh+/Q== In-Reply-To: <396b47f5-9604-44ab-881f-94d0664bcab8@roeck-us.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 25/04/2024 16:05, Guenter Roeck wrote: > On 4/25/24 03:33, Chanh Nguyen wrote: >> >> >> On 24/04/2024 00:02, Conor Dooley wrote: >>> [EXTERNAL EMAIL NOTICE: This email originated from an external sender. Please be mindful of safe email handling and proprietary information protection practices.] >>> >> > > The quote doesn't make much sense. > >> Sorry Conor, there may be confusion here. I mean the mapping of the PWM output to the TACH input, which is on the MAX31790, and it is not sure a common feature on all fan controllers. >> > > I think the term "mapping" is a bit confusing here. > > tach-ch, as I understand it, is supposed to associate a tachometer input > with a pwm output, meaning the fan speed measured with the tachometer input > is expected to change if the pwm output changes. > > On MAX31790, it is possible to configure a pwm output pin as tachometer input pin. > That is something completely different. Also, the association is fixed. > If the first pwm channel is used as tachometer channel, it would show up as 7th > tachometer channel. If the 6th pwm channel is configured to be used as tachometer > input, it would show up as 12th tachometer channel. > > Overall, the total number of channels on MAX31790 is always 12. 6 of them > are always tachometer inputs, the others can be configured to either be a > pwm output or a tachometer input. > > pwm outputs on MAX31790 are always tied to the matching tachometer inputs > (pwm1 <--> tach1 etc) and can not be reconfigured, meaning tach-ch for > channel X would always be X. > >> I would like to open a discussion about whether we should use the tach-ch property on the fan-common.yaml >> >> I'm looking forward to hearing comments from everyone. For me, both tach-ch and vendor property are good. >> > > I am not even sure how to define tach-ch to mean "use the pwm output pin > associated with this tachometer input channel not as pwm output > but as tachometer input". That would be a boolean, not a number. Thanks for explanation. So this is basically pin controller function choice - kind of output or input, although not in terms of GPIO. Shouldn't we have then fan children which will be consumers of PWMs? Having a consumer makes pin PWM output. Then tach-ch says which pins are tachometer for given fan? Just like aspeed,g6-pwm-tach.yaml has? Best regards, Krzysztof