0001 Kernel driver g762
0002 ==================
0003
0004 The GMT G762 Fan Speed PWM Controller is connected directly to a fan
0005 and performs closed-loop or open-loop control of the fan speed. Two
0006 modes - PWM or DC - are supported by the device.
0007
0008 For additional information, a detailed datasheet is available at
0009 http://natisbad.org/NAS/ref/GMT_EDS-762_763-080710-0.2.pdf. sysfs
0010 bindings are described in Documentation/hwmon/sysfs-interface.rst.
0011
0012 The following entries are available to the user in a subdirectory of
0013 /sys/bus/i2c/drivers/g762/ to control the operation of the device.
0014 This can be done manually using the following entries but is usually
0015 done via a userland daemon like fancontrol.
0016
0017 Note that those entries do not provide ways to setup the specific
0018 hardware characteristics of the system (reference clock, pulses per
0019 fan revolution, ...); Those can be modified via devicetree bindings
0020 documented in Documentation/devicetree/bindings/hwmon/g762.txt or
0021 using a specific platform_data structure in board initialization
0022 file (see include/linux/platform_data/g762.h).
0023
0024 fan1_target:
0025 set desired fan speed. This only makes sense in closed-loop
0026 fan speed control (i.e. when pwm1_enable is set to 2).
0027
0028 fan1_input:
0029 provide current fan rotation value in RPM as reported by
0030 the fan to the device.
0031
0032 fan1_div:
0033 fan clock divisor. Supported value are 1, 2, 4 and 8.
0034
0035 fan1_pulses:
0036 number of pulses per fan revolution. Supported values
0037 are 2 and 4.
0038
0039 fan1_fault:
0040 reports fan failure, i.e. no transition on fan gear pin for
0041 about 0.7s (if the fan is not voluntarily set off).
0042
0043 fan1_alarm:
0044 in closed-loop control mode, if fan RPM value is 25% out
0045 of the programmed value for over 6 seconds 'fan1_alarm' is
0046 set to 1.
0047
0048 pwm1_enable:
0049 set current fan speed control mode i.e. 1 for manual fan
0050 speed control (open-loop) via pwm1 described below, 2 for
0051 automatic fan speed control (closed-loop) via fan1_target
0052 above.
0053
0054 pwm1_mode:
0055 set or get fan driving mode: 1 for PWM mode, 0 for DC mode.
0056
0057 pwm1:
0058 get or set PWM fan control value in open-loop mode. This is an
0059 integer value between 0 and 255. 0 stops the fan, 255 makes
0060 it run at full speed.
0061
0062 Both in PWM mode ('pwm1_mode' set to 1) and DC mode ('pwm1_mode' set to 0),
0063 when current fan speed control mode is open-loop ('pwm1_enable' set to 1),
0064 the fan speed is programmed by setting a value between 0 and 255 via 'pwm1'
0065 entry (0 stops the fan, 255 makes it run at full speed). In closed-loop mode
0066 ('pwm1_enable' set to 2), the expected rotation speed in RPM can be passed to
0067 the chip via 'fan1_target'. In closed-loop mode, the target speed is compared
0068 with current speed (available via 'fan1_input') by the device and a feedback
0069 is performed to match that target value. The fan speed value is computed
0070 based on the parameters associated with the physical characteristics of the
0071 system: a reference clock source frequency, a number of pulses per fan
0072 revolution, etc.
0073
0074 Note that the driver will update its values at most once per second.