Hello.
I am using a ROCK 4C+.
$ uname -a Linux rock-4c-plus 5.10.110-1-rockchip #0a544b8c7 SMP Sun Mar 12 14:04:06 UTC 2023 aarch64 GNU/Linux
A cooling fan is connected to the fan connector near the USB 2.0 socket.
The fan works when power is connected to the USB Type-C port.
But, the fan stops working when the OS is booted.
When the OS is shutdown, the fan starts working again.
I tried to control the fan by referring to the following URL.
https://wiki.radxa.com/Rock4/Debian#Fan
But the first command failed with an error “echo: write error: Device or resource busy” and I could not activate pwm0.
How can I solve this problem?
$ sudo su - # cd /sys/class/pwm/pwmchip0/ # ls -la total 0 drwxr-xr-x 3 root root 0 Jun 10 03:48 . drwxr-xr-x 3 root root 0 Jun 10 03:48 .. lrwxrwxrwx 1 root root 0 Jun 10 04:16 device -> ../../../ff420030.pwm --w------- 1 root root 4096 Jun 10 04:16 export -r--r--r-- 1 root root 4096 Jun 10 04:16 npwm drwxr-xr-x 2 root root 0 Jun 10 04:16 power lrwxrwxrwx 1 root root 0 Jun 10 03:48 subsystem -> ../../../../../class/pwm -rw-r--r-- 1 root root 4096 Jun 10 03:48 uevent --w------- 1 root root 4096 Jun 10 04:16 unexport # echo 0 > /sys/class/pwm/pwmchip0/export -bash: echo: write error: Device or resource busy