Skip to content

Commit c1eedc0

Browse files
authored
Revert "[Dell S6100, Z9100] psusutil sysfs attribute changes for hwmon (#1264)"
This reverts commit 1ceb07a.
1 parent 1ceb07a commit c1eedc0

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

device/dell/x86_64-dell_s6100_c2538-r0/plugins/psuutil.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,10 @@ def __init__(self):
2020

2121
# Get a mailbox register
2222
def get_pmc_register(self, reg_name):
23-
mailbox_dir = "/sys/devices/platform/SMF.512/hwmon/hwmon1"
23+
mailbox_dir = "/sys/devices/platform/dell_s6100_lpc"
2424
retval = 'ERR'
2525
mb_reg_file = mailbox_dir+'/' + reg_name
2626
if (not os.path.isfile(mb_reg_file)):
27-
print mb_reg_file, 'not found !'
2827
return retval
2928

3029
try:
@@ -53,7 +52,7 @@ def get_psu_status(self, index):
5352
faulty
5453
"""
5554
status = 0
56-
psu_status = self.get_pmc_register('psu'+str(index)+'_presence')
55+
psu_status = self.get_pmc_register('psu_'+str(index)+'_status')
5756
if (psu_status != 'ERR'):
5857
psu_status = int(psu_status, 16)
5958
# Check for PSU statuse
@@ -70,7 +69,7 @@ def get_psu_presence(self, index):
7069
:return: Boolean, True if PSU is plugged, False if not
7170
"""
7271
status = 0
73-
psu_presence = self.get_pmc_register('psu'+str(index)+'_presence')
72+
psu_presence = self.get_pmc_register('psu_'+str(index)+'_status')
7473
if (psu_presence != 'ERR'):
7574
psu_presence = int(psu_presence, 16)
7675
# Check for PSU presence

device/dell/x86_64-dell_z9100_c2538-r0/plugins/psuutil.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,10 @@ def __init__(self):
2020

2121
# Get a mailbox register
2222
def get_pmc_register(self, reg_name):
23-
mailbox_dir = "/sys/devices/platform/SMF.512/hwmon/hwmon1"
23+
mailbox_dir = "/sys/devices/platform/dell_mailbox"
2424
retval = 'ERR'
2525
mb_reg_file = mailbox_dir+'/' + reg_name
2626
if (not os.path.isfile(mb_reg_file)):
27-
print mb_reg_file, 'not found !'
2827
return retval
2928

3029
try:
@@ -53,7 +52,7 @@ def get_psu_status(self, index):
5352
faulty
5453
"""
5554
status = 0
56-
psu_status = self.get_pmc_register('psu'+str(index)+'_presence')
55+
psu_status = self.get_pmc_register('psu_'+str(index)+'_status')
5756
if (psu_status != 'ERR'):
5857
psu_status = int(psu_status, 16)
5958
# Check for PSU statuse
@@ -70,7 +69,7 @@ def get_psu_presence(self, index):
7069
:return: Boolean, True if PSU is plugged, False if not
7170
"""
7271
status = 0
73-
psu_presence = self.get_pmc_register('psu'+str(index)+'_presence')
72+
psu_presence = self.get_pmc_register('psu_'+str(index)+'_status')
7473
if (psu_presence != 'ERR'):
7574
psu_presence = int(psu_presence, 16)
7675
# Check for PSU presence

0 commit comments

Comments
 (0)