Changes between Version 51 and Version 52 of gsc


Ignore:
Timestamp:
06/23/2020 09:58:32 PM (4 years ago)
Author:
Tim Harvey
Comment:

add fan setpoint config example for modern kernels

Legend:

Unmodified
Added
Removed
Modified
  • gsc

    v51 v52  
    326326
    327327
    328 The fan controller setpoints are supported via the standard linux Hardware Monitor ({{{hwmon}}}) driver in the OpenWrt BSP.  Some examples of configuration are:
    329  * Read temperature set-point 0:
     328The fan controller setpoints are supported via the linux Hardware Monitor ({{{gsc_hwmon}}}) driver.
     329
     330Examples:
     331 * Linux 4.20 and newer kernels:
     332  - Read temperature set-point 0:
    330333{{{#!bash
    331 DIR=$(find /sys/bus/i2c/devices/0-0029/ -name in0_input)
    332 DIR=${DIR%/*}
     334# DEV=$(for i in $(ls /sys/class/hwmon); do [ "gsc_hwmon" = $(cat /sys/class/hwmon/$i/name) ] && echo $i; done)
     335# cat /sys/class/hwmon/$DEV/pwm1_auto_point1_temp
     3363000
     337}}}
     338  - Set temperature set-point 0:
     339{{{#!bash
     340# DEV=$(for i in $(ls /sys/class/hwmon); do [ "gsc_hwmon" = $(cat /sys/class/hwmon/$i/name) ] && echo $i; done)
     341# echo 3000 > /sys/class/hwmon/$DEV/pwm1_auto_point1_temp
     342}}}
     343 * Kernels prior to 4.20:
     344  - Read temperature set-point 0:
     345{{{#!bash
     346# DIR=$(find /sys/bus/i2c/devices/0-0029/ -name in0_input)
     347# DIR=${DIR%/*}
    333348# cat $DIR/fan0_point0 # read set point - default 30C
    334349300
    335350}}}
    336  * Set temperature set-point 0:
     351  - Set temperature set-point 0:
    337352{{{#!bash
    338 DIR=$(find /sys/bus/i2c/devices/0-0029/ -name in0_input)
    339 DIR=${DIR%/*}
    340 echo 350 > $DIR/fan0_point0 # set to 35C
     353# DIR=$(find /sys/bus/i2c/devices/0-0029/ -name in0_input)
     354# DIR=${DIR%/*}
     355# echo 350 > $DIR/fan0_point0 # set to 35C
    341356}}}
    342357