Re: [RFC PATCH 3/6] dt-bindings: axi-fan-control: add tacho properties
From: Guenter Roeck <linux@roeck-us.net>
Date: 2021-07-16 15:03:54
Also in:
linux-hwmon
On 7/16/21 12:44 AM, Sa, Nuno wrote: [ ... ]
quoted
Are you sure you can ever get this stable ? Each fan has its own properties and tolerances. If you replace a fan in a given system, you might get different RPM numbers. The RPM will differ widely from system to system and from fan to fan. Anything that assumes a specific RPM in devicetree data seems to be quite vulnerable to failures. I have experienced that recently with a different chip which also tries to correlate RPM and PWM and fails quite miserably. In my experience, anything other than minimum fan speed is really a recipe for instability and sporadic false failures. Even setting a minimum fan speed is tricky because it depends a lot on the fan.I see what you mean. So, I had to go through this process when testing this changes because the fan I'm using is different from the default one used to develop and stablish the default values in the IP core. The core
Exactly my point.
provides you with a register which contains the tacho measurements in clock cycles. You can read that for all the PWM points of interest (with devmem2 for example) and make your own "calibration". I assume that people have to go through this process before putting some values in the devicetree. I'm aware this is not the neatest process but I guess it's acceptable...
Do you really expect everyone using a system with this chip to go through this process and update its devicetree configuration, and then repeat it whenever a fan is changed ? Given how dynamic this is, I really wonder if that information should be in devicetree in the first place. Guenter