From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ed1-f52.google.com (mail-ed1-f52.google.com [209.85.208.52]) (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 AB3E114BF86 for ; Thu, 25 Apr 2024 15:46:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714059968; cv=none; b=jJuSjS+E34PRqSWfrKBY/4wFOxlJgc9/pAcmVkJHOw3kHZQlPOz6AXjTNpqNYb7LqoRbadbqihYS611Tv6jgNW+zbZxhjfRMemcrRGcrE/sSKvzPQBI3qld0CpwsxnQx7ZtiVUPtfd92J1OAf4ZfAkJNLfBMFUdME7xRs7BQmJU= 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.52 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="yXP2Ic6W" Received: by mail-ed1-f52.google.com with SMTP id 4fb4d7f45d1cf-57225322312so1551166a12.1 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=liBg3sK+m/zeHyj20qf1yJTYxn097Mg9OgmuAru/DN02PabrHeeY4orUjT2mbMpbnD eCyduYaXOhoUwDTFpl1+wnt1fPX05ujMBNBn6kCpMxX8rqV9FoQFwQz/z7jPwGgb7zSt xjYJuYDUQYFtxERD70hbXUnemar1hvdeA9VVMeKj7jGx3LG4YMfROoPNhHxFhW6H7YnF l8Ovc8M37H3abu9srxDkaXuLfywSaZiJg6QRfrf0Dh8k7Gre18unH//MW8ypEtfvmqw4 vgGOuCvO7doKEfOH95dNAC9xTWHdliRE85r8mN0pBMXfclhQ9+ZIslEcQfKRv/qDbmLt HfBg== X-Forwarded-Encrypted: i=1; AJvYcCXKtaj9A1DxUGyvebcj3gCD/LFoDttPWXMcmxkiFKMG3E7Vlg1cuS96OOPBoat9DLd343/T2U6VD97CqArnL0aGu9ot2wdQuFP5Dg== X-Gm-Message-State: AOJu0YxadpyfRGURdd3OrTUrrgaIinQiMU4upEUaAennUUIb1fOjO1YE NI/P0lhZ+ITRX6WI/LRl7K56W9qiRD1SiFjoqx8i6YqmhS7Nsg7nrsJiLsI8Mz8= X-Google-Smtp-Source: AGHT+IGjb9BIma2IPdK9VWrOvvIht6IG4eG7JsAANZbuKMobxKYONjCipGocbaFdCGFyQRQnFZaCew== 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: devicetree@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+2RgQDRnmmjCjoQNbFrJvJkFHlPeHaeS BosGY+XWKydnmsfY7SSnjAzLUGAFhLd/XDVpb1Een2XucPpKvt9ORF+48gy12FA5GduRLhQU vK4tU7ojoem/G23PcowM1CwPurC8sAVsQb9KmwTGh7rVz3ks3w/zfGBy3+WmLg++C2Wct6nM Pd8/6CBVjEWqD06/RjI2AnjIq5fSEH/BIfXXfC68nMp9BZoy3So4ZsbOlBmtAPvMYX6U8VwD TNeBxJu5Ex0Izf1NV9CzC3nNaFUYOY8KfN01X5SExAoVTr09ewARAQABzTRLc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AZBLo0OV+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