The GPIO that controls the FAN is passed as a parameter to the driver.
The driver or an userspace application shall monitor the CPU temperature
The char driver will start the fan as soon as the temperature pass a threshold value (passed as parameter).
In order to implement the driver, the first thing to be done is to create a hardware circuit with transistors for controlling the FAN and for limiting the current. The software implementation can be done in parallel with the electronic part.
In order to implement the driver, the first thing to be done is to create a hardware circuit with transistors for controlling the FAN and for limiting the current. The software implementation can be done in parallel with the electronic part.