-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Add Inventec D7054 platform support and update D7032 platform support #1052
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 4 commits
83c33d7
715de9c
d575326
3e827d2
829081d
ac5e02d
95e54bd
c18b8ec
aad24b6
35d4397
65b6dbc
d7bf629
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ class SfpUtil(SfpUtilBase): | |
|
||
PORT_START = 0 | ||
PORT_END = 31 | ||
PORTS_IN_BLOCK = 32 | ||
PORTS_IN_BLOCK = 32 | ||
|
||
_port_to_eeprom_mapping = {} | ||
port_to_i2c_mapping = { | ||
|
@@ -51,7 +51,7 @@ class SfpUtil(SfpUtilBase): | |
29: 19, | ||
30: 20, | ||
31: 21 | ||
} | ||
} | ||
|
||
@property | ||
def port_start(self): | ||
|
@@ -91,7 +91,7 @@ def get_presence(self, port_num): | |
reg_value = int(reg_file.readline().rstrip()) | ||
|
||
if reg_value == 0: | ||
return True | ||
return True | ||
|
||
return False | ||
|
||
|
@@ -108,7 +108,7 @@ def get_low_power_mode(self, port_num): | |
reg_value = int(reg_file.readline().rstrip()) | ||
|
||
if reg_value == 0: | ||
return False | ||
return False | ||
|
||
return True | ||
|
||
|
@@ -124,13 +124,13 @@ def set_low_power_mode(self, port_num, lpmode): | |
return False | ||
|
||
reg_value = int(reg_file.readline().rstrip()) | ||
|
||
# LPMode is active high; set or clear the bit accordingly | ||
if lpmode is True: | ||
reg_value = 1 | ||
else: | ||
reg_value = 0 | ||
reg_value = 0 | ||
|
||
reg_file.write(hex(reg_value)) | ||
reg_file.close() | ||
|
||
|
@@ -167,4 +167,4 @@ def reset(self, port_num): | |
reg_file.close() | ||
|
||
return True | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Instead of removing the extra trailing newline, it appears you added spaces? Please remove this line altogether. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -123,7 +123,7 @@ def get_presence(self, port_num): | |
reg_value = int(reg_file.readline().rstrip()) | ||
|
||
if reg_value == 0: | ||
return True | ||
return True | ||
|
||
return False | ||
|
||
|
@@ -142,7 +142,7 @@ def get_low_power_mode(self, port_num): | |
reg_value = int(reg_file.readline().rstrip()) | ||
|
||
if reg_value == 0: | ||
return False | ||
return False | ||
|
||
return True | ||
|
||
|
@@ -161,13 +161,13 @@ def set_low_power_mode(self, port_num, lpmode): | |
return False | ||
|
||
reg_value = int(reg_file.readline().rstrip()) | ||
|
||
# LPMode is active high; set or clear the bit accordingly | ||
if lpmode is True: | ||
reg_value = 1 | ||
else: | ||
reg_value = 0 | ||
reg_value = 0 | ||
|
||
reg_file.write(hex(reg_value)) | ||
reg_file.close() | ||
|
||
|
@@ -207,4 +207,4 @@ def reset(self, port_num): | |
reg_file.close() | ||
|
||
return True | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Instead of removing the extra trailing newline, it appears you added spaces? Please remove this line altogether. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trailing whitespace remains. Please remove.