Václav Kubernát | 771b823 | 2021-04-23 14:16:07 +0200 | [diff] [blame] | 1 | [Unit] |
| 2 | Description=Enable fans |
| 3 | ConditionKernelCommandLine=|czechlight=sdn-inline-g2 |
| 4 | ConditionKernelCommandLine=|czechlight=sdn-roadm-add-drop-g2 |
| 5 | ConditionKernelCommandLine=|czechlight=sdn-roadm-coherent-a-d-g2 |
| 6 | ConditionKernelCommandLine=|czechlight=sdn-roadm-hires-add-drop-g2 |
| 7 | ConditionKernelCommandLine=|czechlight=sdn-roadm-line-g2 |
| 8 | ConditionKernelCommandLine=|czechlight=sdn-roadm-hires-add-drop-g2 |
| 9 | |
| 10 | [Service] |
| 11 | Type=oneshot |
| 12 | RemainAfterExit=yes |
Jan Kundrát | a12acd9 | 2022-01-13 12:53:30 +0100 | [diff] [blame^] | 13 | # The driver only supports enabling RPM input when setting RPM mode. It also does not reset the RPM input when switching back to PWM mode. |
| 14 | # So, we first enable RPM mode (2), this sets the TACH_ENABLE bit and then set PWM mode, because RPM mode doesn't work anyway. |
| 15 | ExecStart=/bin/bash -c 'for FAN in /sys/bus/i2c/devices/1-0020/hwmon/hwmon*/pwm{1,2,3,4}_enable; do echo 2 > "$FAN"; echo 1 > "$FAN"; done' |