26 lines
1.1 KiB
Plaintext
26 lines
1.1 KiB
Plaintext
|
# Helios64 persistent hwmon
|
||
|
|
||
|
ACTION=="remove", GOTO="helios64_hwmon_end"
|
||
|
|
||
|
#
|
||
|
KERNELS=="p6-fan", SUBSYSTEMS=="platform", ENV{_HELIOS64_FAN_}="p6", ENV{_IS_HELIOS64_FAN_}="1", ENV{IS_HELIOS64_HWMON}="1"
|
||
|
KERNELS=="p7-fan", SUBSYSTEMS=="platform", ENV{_HELIOS64_FAN_}="p7", ENV{_IS_HELIOS64_FAN_}="1", ENV{IS_HELIOS64_HWMON}="1"
|
||
|
KERNELS=="2-004c", SUBSYSTEMS=="i2c", DRIVERS=="lm75", ENV{IS_HELIOS64_HWMON}="1"
|
||
|
KERNELS=="thermal_zone0", SUBSYSTEMS=="thermal", ENV{IS_HELIOS64_HWMON}="1"
|
||
|
|
||
|
SUBSYSTEM!="hwmon|thermal", GOTO="helios64_hwmon_end"
|
||
|
|
||
|
ENV{HWMON_PATH}="/sys%p"
|
||
|
#
|
||
|
ATTR{type}=="soc-thermal", ENV{HWMON_PATH}="/sys%p/temp", ENV{HELIOS64_SYMLINK}="/dev/thermal-cpu/temp1_input", RUN+="/usr/bin/mkdir /dev/thermal-cpu/"
|
||
|
ATTR{name}=="cpu|cpu_thermal", ENV{IS_HELIOS64_HWMON}="1", ENV{HELIOS64_SYMLINK}="/dev/thermal-cpu"
|
||
|
#
|
||
|
ENV{IS_HELIOS64_HWMON}=="1", ATTR{name}=="lm75", ENV{HELIOS64_SYMLINK}="/dev/thermal-board"
|
||
|
ENV{_IS_HELIOS64_FAN_}=="1", ENV{HELIOS64_SYMLINK}="/dev/fan-$env{_HELIOS64_FAN_}"
|
||
|
|
||
|
#
|
||
|
ENV{IS_HELIOS64_HWMON}=="1", RUN+="/bin/ln -sf $env{HWMON_PATH} $env{HELIOS64_SYMLINK}"
|
||
|
|
||
|
LABEL="helios64_hwmon_end"
|
||
|
|