Properly map fan speed against gpios#18
Properly map fan speed against gpios#18thatguyatgithub wants to merge 1 commit intorogers0:masterfrom
Conversation
|
Fan GPIO controls used to work properly until late 2018 or early 2019. I am not sure what triggered the regression because apparently no changes were made to LinkStation DTS files during that period of time. I first ran into the reverse order issue after upgrading my LS-WVL to the latest trunk version in March 2019. That upgrade broke the fan-control script. Since then I wrote a new script for monitoring disk temperature and controlling fan speed. I am willing to share my new script, but not as a new PR, because applying this PR would probably be a more straightforward way to solve the issue. IMO there is no need to create another PR. |
|
I ran into the same thing for the armada-370 linkstations at about the same time. I think something might have changed in the driver/binding. I ended up dealing with it by just reversing them in my DTS files. I never got around to digging into what actually changed as it was one of a handful of bugs I was dealing with at the time. If this affecting the kirkwood devices we should probably submit a PR to the kernel fixing the device trees, probably after figuring out what changed and why there weren't changes to all the other devices too (unless there have been since I last looked) |
|
@1000001101000 : good, so I am not alone then. I tried looking into the kernel code to see if I can identify the change the triggered the reverse order, and came to the conclusion that it would take me more time than I can possibly afford. So, unfortunately, I have given up for now. |
|
you could always reverse them for your own dtb. on a long enough timeline I will probably fix this though when or how I don't really know. lately I've been working on adding support for devices that weren't covered by this project, eventually I may get around to making some updates to these as well. |
|
I researched this a little further and discovered that up till a certain version the kernel driver assumed all fan GPIOs were ACTIVE-HIGH regardless of what the device tree set. Unfortunately it seems most of the Buffalo Devices had them set as ACTIVE-LOW in the device trees even though they should be ACTIVE-HIGH. I went ahead and generated corrected trees for most affected buffalo devices, they can be found here: |
It appears that fan speed is mapped on a reverse order.
This also affects pwm'ing, since the logic is inverted and a pwm of 0 is
full speedand255fan off.As a consequence,
fancontroldoes not work either.I've tested this on a LS-WVL and works as expected: