OpenNetworkLinux
OpenNetworkLinux copied to clipboard
[AS5835-54x] Support psu_fan_dir sysfs for YM-1401A PSU
Signed-off-by: Jostar Yang [email protected]
Because YM-1401A doesn't support psu_fan_dir from pmbus. Read from command = 0xC3 in pmbus that will always get "F2B". But YM-10401A has F2B and B2F PSU. So read PSU fan dir from psu eerpm and add psu_fan_dir sysfs. YM-1401ABR is F2B and YM-1401ACR is B2B.
Test log as below, (YM-1401ABR) cat /sys/bus/i2c/devices/12-0053/psu_fan_dir F2B onlpdump log as below, ............. { Description: PSU 2 - Fan 1 Status: 0x00000009 [ PRESENT,F2B ] Caps: 0x00000038 [ SET_PERCENTAGE,GET_RPM,GET_PERCENTAGE ] RPM: 3200 Per: 14 Model: NULL SN: NULL
( YM-1401ACR) /sys/bus/i2c/devices/12-0053/psu_fan_dir B2F onlpdump log as below, Description: PSU-1 Model: YM-1401ACR SN: SA040W261837000030 Status: 0x00000001 [ PRESENT ] Caps: 0x00000151 [ AC,VOUT,IOUT,POUT ] Vin: 0 Vout: 11841 Iin: 0 Iout: 3972 Pin: 0 Pout: 44000 fan @ 6 = { Description: PSU 1 - Fan 1 Status: 0x00000005 [ PRESENT,B2F ] ..............
With these changes, onlpdump now shows the expected output for the PSU fan direction.