4d212debc7
* Add new device accton_as5812_54x. Signed-off-by: roy_lee <roy_lee@accton.com> * Rename 5812's config.bcm. Signed-off-by: roy_lee <roy_lee@accton.com> * Change fan module to support lm-sensors. Validate for thermal policy. Signed-off-by: roy_lee <roy_lee@accton.com> * Add bask reset and lpmode control of 6 QSFP ports. Signed-off-by: roy_lee <roy_lee@accton.com> * Get currect duty of fan for comparing. Instead of by stored duty from previous iteration. Signed-off-by: roy_lee <roy_lee@accton.com> * Roll back the mistakes to update mellanox submodules. Signed-off-by: roy_lee <roy_lee@accton.com> * Rollback for misoperation on submodule platform/p4/SAI-P4-BM. Signed-off-by: roy_lee <roy_lee@accton.com> * Change indexes of ports to start from 1, as them on the front panel. Add low-power mode control of the transciever's eeprom, follows SFF-8436. Signed-off-by: roy_lee <roy_lee@accton.com>
25 lines
785 B
Python
25 lines
785 B
Python
#!/usr/bin/env python
|
|
|
|
try:
|
|
import exceptions
|
|
import binascii
|
|
import time
|
|
import optparse
|
|
import warnings
|
|
import os
|
|
import sys
|
|
from sonic_eeprom import eeprom_base
|
|
from sonic_eeprom import eeprom_tlvinfo
|
|
import subprocess
|
|
except ImportError, e:
|
|
raise ImportError (str(e) + "- required module not found")
|
|
|
|
class board(eeprom_tlvinfo.TlvInfoDecoder):
|
|
_TLV_INFO_MAX_LEN = 256
|
|
def __init__(self, name, path, cpld_root, ro):
|
|
self.eeprom_path = "/sys/bus/i2c/devices/1-0057/eeprom"
|
|
#Two i2c buses might get flipped order, check them both.
|
|
if not os.path.exists(self.eeprom_path):
|
|
self.eeprom_path = "/sys/bus/i2c/devices/0-0057/eeprom"
|
|
super(board, self).__init__(self.eeprom_path, 0, '', True)
|