Skip to content

Commit

Permalink
[AS7315-27XB] fix i2c bus num for fan driver
Browse files Browse the repository at this point in the history
Signed-off-by: Sean Wu <[email protected]>
  • Loading branch information
seanwu-ec committed Jan 7, 2022
1 parent a12248e commit b49c3d7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ class FanUtil(object):
#FAN_NODE_DUTY_IDX_OF_MAP = 4
#FANR_NODE_FAULT_IDX_OF_MAP = 5

BASE_VAL_PATH = '/sys/bus/i2c/devices/50-0066/{0}'
FAN_DUTY_PATH = '/sys/bus/i2c/devices/50-0066/fan{0}_pwm'
BASE_VAL_PATH = '/sys/bus/i2c/devices/9-0066/{0}'
FAN_DUTY_PATH = '/sys/bus/i2c/devices/9-0066/fan{0}_pwm'

#logfile = ''
#loglevel = self.logger.INFO
Expand Down Expand Up @@ -84,7 +84,7 @@ def _get_fan_node_val(self, fan_num, node_num):
return None

try:
val_file.close()
val_file.close()
except:
self.logger.debug('GET. unable to close file. device_path:%s', device_path)
return None
Expand Down Expand Up @@ -115,7 +115,7 @@ def _set_fan_node_val(self, fan_num, node_num, val):
val_file.write(content)

try:
val_file.close()
val_file.close()
except:
self.logger.debug('GET. unable to close file. device_path:%s', device_path)
return None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ def driver_uninstall():
'echo ym2401 0x58 > /sys/bus/i2c/devices/i2c-12/new_device',
'echo as7315_27xb_psu1 0x53 > /sys/bus/i2c/devices/i2c-13/new_device',
'echo ym2401 0x5b > /sys/bus/i2c/devices/i2c-13/new_device',
'echo as7315_fan 0x66 > /sys/bus/i2c/devices/i2c-50/new_device',
'echo as7315_fan 0x66 > /sys/bus/i2c/devices/i2c-9/new_device',
'echo lm75 0x49 > /sys/bus/i2c/devices/i2c-51/new_device',
'echo lm75 0x4a > /sys/bus/i2c/devices/i2c-52/new_device',
'echo lm75 0x4c > /sys/bus/i2c/devices/i2c-53/new_device',
Expand Down

0 comments on commit b49c3d7

Please sign in to comment.