[dell-hwmon] Changed variables in psuutil scripts for both Z9100/S6100 platforms (#1305)
* [dell-hwmon] Changes psuutil scripts for Z9100/S6100 platform to use hwmon variables * Updated sumbodule 23c5383780790234da3774155bd521db14d8daa4 - hwmon changes
This commit is contained in:
parent
628ad3da03
commit
a4bcccc9db
@ -20,10 +20,11 @@ class PsuUtil(PsuBase):
|
|||||||
|
|
||||||
# Get a mailbox register
|
# Get a mailbox register
|
||||||
def get_pmc_register(self, reg_name):
|
def get_pmc_register(self, reg_name):
|
||||||
mailbox_dir = "/sys/devices/platform/dell_s6100_lpc"
|
mailbox_dir = "/sys/devices/platform/SMF.512/hwmon/hwmon1"
|
||||||
retval = 'ERR'
|
retval = 'ERR'
|
||||||
mb_reg_file = mailbox_dir+'/' + reg_name
|
mb_reg_file = mailbox_dir+'/' + reg_name
|
||||||
if (not os.path.isfile(mb_reg_file)):
|
if (not os.path.isfile(mb_reg_file)):
|
||||||
|
print mb_reg_file, 'not found !'
|
||||||
return retval
|
return retval
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@ -52,7 +53,7 @@ class PsuUtil(PsuBase):
|
|||||||
faulty
|
faulty
|
||||||
"""
|
"""
|
||||||
status = 0
|
status = 0
|
||||||
psu_status = self.get_pmc_register('psu_'+str(index)+'_status')
|
psu_status = self.get_pmc_register('psu'+str(index)+'_presence')
|
||||||
if (psu_status != 'ERR'):
|
if (psu_status != 'ERR'):
|
||||||
psu_status = int(psu_status, 16)
|
psu_status = int(psu_status, 16)
|
||||||
# Check for PSU statuse
|
# Check for PSU statuse
|
||||||
@ -69,7 +70,7 @@ class PsuUtil(PsuBase):
|
|||||||
:return: Boolean, True if PSU is plugged, False if not
|
:return: Boolean, True if PSU is plugged, False if not
|
||||||
"""
|
"""
|
||||||
status = 0
|
status = 0
|
||||||
psu_presence = self.get_pmc_register('psu_'+str(index)+'_status')
|
psu_presence = self.get_pmc_register('psu'+str(index)+'_presence')
|
||||||
if (psu_presence != 'ERR'):
|
if (psu_presence != 'ERR'):
|
||||||
psu_presence = int(psu_presence, 16)
|
psu_presence = int(psu_presence, 16)
|
||||||
# Check for PSU presence
|
# Check for PSU presence
|
||||||
|
@ -20,10 +20,11 @@ class PsuUtil(PsuBase):
|
|||||||
|
|
||||||
# Get a mailbox register
|
# Get a mailbox register
|
||||||
def get_pmc_register(self, reg_name):
|
def get_pmc_register(self, reg_name):
|
||||||
mailbox_dir = "/sys/devices/platform/dell_mailbox"
|
mailbox_dir = "/sys/devices/platform/SMF.512/hwmon/hwmon1"
|
||||||
retval = 'ERR'
|
retval = 'ERR'
|
||||||
mb_reg_file = mailbox_dir+'/' + reg_name
|
mb_reg_file = mailbox_dir+'/' + reg_name
|
||||||
if (not os.path.isfile(mb_reg_file)):
|
if (not os.path.isfile(mb_reg_file)):
|
||||||
|
print mb_reg_file, 'not found !'
|
||||||
return retval
|
return retval
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@ -52,7 +53,7 @@ class PsuUtil(PsuBase):
|
|||||||
faulty
|
faulty
|
||||||
"""
|
"""
|
||||||
status = 0
|
status = 0
|
||||||
psu_status = self.get_pmc_register('psu_'+str(index)+'_status')
|
psu_status = self.get_pmc_register('psu'+str(index)+'_presence')
|
||||||
if (psu_status != 'ERR'):
|
if (psu_status != 'ERR'):
|
||||||
psu_status = int(psu_status, 16)
|
psu_status = int(psu_status, 16)
|
||||||
# Check for PSU statuse
|
# Check for PSU statuse
|
||||||
@ -69,7 +70,7 @@ class PsuUtil(PsuBase):
|
|||||||
:return: Boolean, True if PSU is plugged, False if not
|
:return: Boolean, True if PSU is plugged, False if not
|
||||||
"""
|
"""
|
||||||
status = 0
|
status = 0
|
||||||
psu_presence = self.get_pmc_register('psu_'+str(index)+'_status')
|
psu_presence = self.get_pmc_register('psu'+str(index)+'_presence')
|
||||||
if (psu_presence != 'ERR'):
|
if (psu_presence != 'ERR'):
|
||||||
psu_presence = int(psu_presence, 16)
|
psu_presence = int(psu_presence, 16)
|
||||||
# Check for PSU presence
|
# Check for PSU presence
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit f0e808fe518f336e4cb97fdaf25e35a752c24d89
|
Subproject commit 23c5383780790234da3774155bd521db14d8daa4
|
Loading…
Reference in New Issue
Block a user