Skip to content

Commit

Permalink
[devices]: Dell SMF driver hwmon number reorder fix for Dell S6100/Z9…
Browse files Browse the repository at this point in the history
…100 (#2542)
  • Loading branch information
paavaanan authored and lguohan committed Feb 9, 2019
1 parent e26043a commit e77a7b1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion device/dell/x86_64-dell_s6100_c2538-r0/plugins/psuutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
except ImportError as e:
raise ImportError(str(e) + "- required module not found")

HWMON_DIR = "/sys/devices/platform/SMF.512/hwmon/"
HWMON_NODE = ', '.join(os.listdir(HWMON_DIR))

class PsuUtil(PsuBase):
"""Platform-specific PSUutil class"""
Expand All @@ -20,7 +22,7 @@ def __init__(self):

# Get a mailbox register
def get_pmc_register(self, reg_name):
mailbox_dir = "/sys/devices/platform/SMF.512/hwmon/hwmon1"
mailbox_dir = HWMON_DIR + HWMON_NODE
retval = 'ERR'
mb_reg_file = mailbox_dir+'/' + reg_name
if (not os.path.isfile(mb_reg_file)):
Expand Down
4 changes: 3 additions & 1 deletion device/dell/x86_64-dell_z9100_c2538-r0/plugins/psuutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
except ImportError as e:
raise ImportError(str(e) + "- required module not found")

HWMON_DIR = "/sys/devices/platform/SMF.512/hwmon/"
HWMON_NODE = ', '.join(os.listdir(HWMON_DIR))

class PsuUtil(PsuBase):
"""Platform-specific PSUutil class"""
Expand All @@ -20,7 +22,7 @@ def __init__(self):

# Get a mailbox register
def get_pmc_register(self, reg_name):
mailbox_dir = "/sys/devices/platform/SMF.512/hwmon/hwmon1"
mailbox_dir = HWMON_DIR + HWMON_NODE
retval = 'ERR'
mb_reg_file = mailbox_dir+'/' + reg_name
if (not os.path.isfile(mb_reg_file)):
Expand Down

0 comments on commit e77a7b1

Please sign in to comment.