Closed NeonDaniel closed 1 year ago
Thank you for initiating the PR. Below is some additional information for future reference:
This PR currently is intended for Rev 10 boards and supports co-existence of the NeoPixel LED array connected to Pin 12 with the PWM Fan connected to Pin 13 of the board. The PWM Fan shall be controlled via a the pwm_fan
kernel driver using hardware-generated PWM signal. The specific issue being resolved is:
This creates the following problems:
pwm_fan
kernel driver starts up first, configuring the shared PWM clock divider and PWM1 range to values which the rpi_ws281x
lib does not expect while performing its PWM signal generation with DMA. The HwPwmAwareLed
class attempts to fix these issues by:
So far, this code has only been tested in the sj201 reset-led
CLI scenario. Using it as a part of PHAL with no explicit process exit may require future adjustments.
Thanks for the detailed explanation. I will plan on implementing your kernel driver when I find time to revisit the Neon images; it looks like the "correct" solution to fan control for the Mark2 since that really should happen at a kernel level.
Description
Adds compatibility for operation with a dtoverlay controlling the PWM fan
Issues
Other Notes