Skip to content

Commit

Permalink
1) GPL license disclaimer inclusion 2) Removal of commented code, as …
Browse files Browse the repository at this point in the history
…per the latest review comments
  • Loading branch information
FuzailBrcm committed Dec 7, 2019
1 parent f0b4dc2 commit 8e8cf2f
Show file tree
Hide file tree
Showing 33 changed files with 340 additions and 90 deletions.
14 changes: 0 additions & 14 deletions device/common/pddf/plugins/fanutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,6 @@ def set_speed(self, val):
except IOError:
return False

#time.sleep(5)
#print "Done changing the speed of all the fans ... Reading the speed to crossscheck\n"
return True

def dump_sysfs(self):
Expand All @@ -200,15 +198,3 @@ def get_change_event(self):
raise NotImplementedError



#if __name__== "__main__":
#obj=FanUtil()
##for i in range(0,6):
##obj.get_fan_present(i)

#obj.get_direction()
##print(obj.get_direction())
#print(obj.get_speed())
#obj.set_speed(100)
#print "Chaning the speed back to 50%\n"
#obj.set_speed(50)
22 changes: 0 additions & 22 deletions device/common/pddf/plugins/ledutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,25 +57,3 @@ def get_status_led(self, device_name, index):
return (status)
status = "%s-%s:\t%s %s\n"%(device_name, index, color, color_state)
return (status)



#def main():
# parser = argparse.ArgumentParser()
# parser.add_argument("--set", action='store', nargs="+", help="set led color: --set <device_name> <index> <color> <color_state>")
# parser.add_argument("--get", action='store', nargs="+", help="get led color: --get <device_name> <index>")
# args = parser.parse_args()
# if args.set:
# obj=LedUtil()
# if (len(args.set)==3):
# obj.set_status_led(args.set[0], args.set[1], args.set[2])
# else:
# obj.set_status_led(args.set[0], args.set[1], args.set[2], args.set[3])
#
# if args.get:
# obj=LedUtil()
# obj.get_status_led(args.get[0], args.get[1])

#if __name__ == "__main__" :
# main()

7 changes: 0 additions & 7 deletions device/common/pddf/plugins/psuutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,10 +265,3 @@ def get_fan_speed(self, idx, fan_idx):
def dump_sysfs(self):
return pddf_obj.cli_dump_dsysfs('psu')

#if __name__== "__main__":
#obj=PsuUtil()
#print(obj.get_psu_status(1))
#print(obj.get_psu_status(2))
#print(obj.get_psu_presence(1))
#print(obj.get_psu_presence(2))
#print "END\n"
8 changes: 0 additions & 8 deletions device/common/pddf/plugins/sfputil.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,11 +200,3 @@ def get_transceiver_change_event(self):

def dump_sysfs(self):
return pddf_obj.cli_dump_dsysfs('xcvr')

#if __name__== "__main__":
#obj=SfpUtil()
#for port in range(1, 32):
#obj.get_presence(port)
#print "\nQSFP ports:"
#print obj.qsfp_ports

9 changes: 0 additions & 9 deletions device/common/pddf/plugins/sysstatutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,3 @@ def get_misc_status(self):

def dump_sysfs(self):
return pddf_obj.cli_dump_dsysfs('sys-status')

#if __name__== "__main__":
#obj=SYSStatusUtil()
#obj.get_board_info()
#obj.get_cpld_versio()
#obj.get_power_module_status()
#obj.get_system_reset_status()
#obj.get_misc_status()

12 changes: 11 additions & 1 deletion platform/pddf/i2c/modules/client/pddf_client_module.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
/*
* Copyright 2019 Broadcom. All rights reserved.
* Copyright 2019 Broadcom.
* The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* A pddf kernel module to create access-data attributes for client creation
*/

Expand Down
12 changes: 11 additions & 1 deletion platform/pddf/i2c/modules/cpld/driver/pddf_cpld_driver.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
/*
* Copyright 2019 Broadcom. All rights reserved.
* Copyright 2019 Broadcom.
* The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* A pddf kernel driver module for CPLD
*/

Expand Down
13 changes: 12 additions & 1 deletion platform/pddf/i2c/modules/cpld/pddf_cpld_module.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
/*
* Copyright 2019 Broadcom. All rights reserved.
* Copyright 2019 Broadcom.
* The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* A pddf kernel module to create I2C client for a CPLD
*/

Expand Down
13 changes: 12 additions & 1 deletion platform/pddf/i2c/modules/fan/driver/pddf_fan_api.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
/*
* Copyright 2019 Broadcom. All rights reserved.
* Copyright 2019 Broadcom.
* The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* Description of various APIs related to FAN component
*/

Expand Down
13 changes: 12 additions & 1 deletion platform/pddf/i2c/modules/fan/driver/pddf_fan_driver.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
/*
* Copyright 2019 Broadcom. All rights reserved.
* Copyright 2019 Broadcom.
* The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* A pddf kernel module for a FAN controller
*/

Expand Down
13 changes: 12 additions & 1 deletion platform/pddf/i2c/modules/fan/pddf_fan_module.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
/*
* Copyright 2019 Broadcom. All rights reserved.
* Copyright 2019 Broadcom.
* The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* A pddf kernel module to create I2C client for FAN controller
*/

Expand Down
13 changes: 12 additions & 1 deletion platform/pddf/i2c/modules/include/pddf_client_defs.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
/*
* Copyright 2019 Broadcom. All rights reserved.
* Copyright 2019 Broadcom.
* The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* Description:
* Platform I2C client defines/structures header file
*/
Expand Down
13 changes: 12 additions & 1 deletion platform/pddf/i2c/modules/include/pddf_cpld_defs.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
/*
* Copyright 2019 Broadcom. All rights reserved.
* Copyright 2019 Broadcom.
* The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* Description:
* Platform CPLD defines/structures header file
*/
Expand Down
13 changes: 12 additions & 1 deletion platform/pddf/i2c/modules/include/pddf_fan_api.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
/*
* Copyright 2019 Broadcom. All rights reserved.
* Copyright 2019 Broadcom.
* The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries.
*
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* Description
* FAN driver api declarations
*/
Expand Down
13 changes: 12 additions & 1 deletion platform/pddf/i2c/modules/include/pddf_fan_defs.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
/*
* Copyright 2019 Broadcom. All rights reserved.
* Copyright 2019 Broadcom.
* The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* Description:
* Platform FAN defines/structures header file
*/
Expand Down
13 changes: 12 additions & 1 deletion platform/pddf/i2c/modules/include/pddf_fan_driver.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
/*
* Copyright 2019 Broadcom. All rights reserved.
* Copyright 2019 Broadcom.
* The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* Description
* FAN driver related data structures
*/
Expand Down
13 changes: 12 additions & 1 deletion platform/pddf/i2c/modules/include/pddf_led_defs.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
/*
* Copyright 2019 Broadcom. All rights reserved.
* Copyright 2019 Broadcom.
* The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* Description
* Platform LED related defines and structures
*/
Expand Down
13 changes: 12 additions & 1 deletion platform/pddf/i2c/modules/include/pddf_mux_defs.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
/*
* Copyright 2019 Broadcom. All rights reserved.
* Copyright 2019 Broadcom.
* The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* Description:
* Platform MUX defines/structures header file
*/
Expand Down
13 changes: 12 additions & 1 deletion platform/pddf/i2c/modules/include/pddf_psu_api.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
/*
* Copyright 2019 Broadcom. All rights reserved.
* Copyright 2019 Broadcom.
* The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* Description
* PSU driver related api declarations
*/
Expand Down
13 changes: 12 additions & 1 deletion platform/pddf/i2c/modules/include/pddf_psu_defs.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
/*
* Copyright 2019 Broadcom. All rights reserved.
* Copyright 2019 Broadcom.
* The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* Description:
* Platform PSU defines/structures header file
*/
Expand Down
Loading

0 comments on commit 8e8cf2f

Please sign in to comment.