Skip to content
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

[PR:16737, PR:16739] platform-modules: pddf, broadcom/cel: adapt for kernel 6.1 and bookworm #16954

Merged
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions platform/broadcom/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ include $(PLATFORM_PATH)/sai.mk
# * Nokia
# * Dell
# * Accton
# * Celestica
# * Juniper
# * Ragile
# * Ufispace
Expand All @@ -15,7 +14,7 @@ include $(PLATFORM_PATH)/platform-modules-arista.mk
#include $(PLATFORM_PATH)/platform-modules-accton.mk
include $(PLATFORM_PATH)/platform-modules-alphanetworks.mk
#include $(PLATFORM_PATH)/platform-modules-inventec.mk
#include $(PLATFORM_PATH)/platform-modules-cel.mk
include $(PLATFORM_PATH)/platform-modules-cel.mk
#include $(PLATFORM_PATH)/platform-modules-delta.mk
include $(PLATFORM_PATH)/platform-modules-quanta.mk
##include $(PLATFORM_PATH)/platform-modules-mitac.mk
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,9 @@ static int mc24lc64t_probe(struct i2c_client *client,
return err;
}

static int mc24lc64t_remove(struct i2c_client *client)
static void mc24lc64t_remove(struct i2c_client *client)
{
struct mc24lc64t_data *drvdata = i2c_get_clientdata(client);
sysfs_remove_bin_file(&client->dev.kobj, &mc24lc64t_bit_attr);

return 0;
}

static const struct i2c_device_id mc24lc64t_id[] = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,21 @@ sonic-cel-platform-modules (0.6) unstable; urgency=low
* Remove unused port-mode switch script. This should be done by hwsku config script.
* Add script to turn off QSFP low power mode when boot up.

-- Pradchaya Phucharoen <[email protected]> Wed, 26 July 2017 10:43:00 +0700
-- Pradchaya Phucharoen <[email protected]> Wed, 26 Jul 2017 10:43:00 +0700

sonic-cel-platform-modules (0.5) unstable; urgency=low

* Add port-mode switch script to support 100G 50G 10G_50G qsfp modes.
* Fix garbage data when using sfputil to read QSFP-transceiver's eeprom.
* Fix incorrect endian in eeprom read word data.

-- Pradchaya Phucharoen <[email protected]> Tue, 18 July 2017 11:30:00 +0700
-- Pradchaya Phucharoen <[email protected]> Tue, 18 Jul 2017 11:30:00 +0700

sonic-cel-platform-modules (0.4) unstable; urgency=low

* Add support for DX010's fancontrol, automatic run-up and FIX bug lpmod

-- Pariwat Leamsumran <[email protected]> Thu, 14 June 2017 16:25:00 +0700
-- Pariwat Leamsumran <[email protected]> Thu, 14 Jun 2017 16:25:00 +0700

sonic-cel-platform-modules (0.3) unstable; urgency=low

Expand Down
12 changes: 5 additions & 7 deletions platform/broadcom/sonic-platform-modules-cel/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,20 @@ override_dh_auto_build:
make -C $(KERNEL_SRC)/build M=$(MOD_SRC_DIR)/$${mod}/modules; \
if [ $$mod = "seastone2" ]; then \
cd $(MOD_SRC_DIR)/services/platform_api; \
python3 setup.py bdist_wheel -d $(MOD_SRC_DIR)/$${mod}/modules; \
python3 -m build --wheel --no-isolation --outdir $(MOD_SRC_DIR)/$${mod}/modules; \
continue; \
fi; \
if [ $$mod = "belgite" ]; then \
cd $(MOD_SRC_DIR); \
if [ -d $(MOD_SRC_DIR)/$${mod}/pddf ]; then \
cd $(MOD_SRC_DIR)/$${mod}/pddf; \
if [ -f sonic_platform_setup.py ]; then \
python3 sonic_platform_setup.py bdist_wheel -d $(MOD_SRC_DIR)/$${mod}/pddf; \
echo "Finished makig pddf whl package for $$mod"; \
fi; \
cd $(MOD_SRC_DIR)/$${mod}/pddf; \
python3 -m build --wheel --no-isolation --outdir $(MOD_SRC_DIR)/$${mod}/pddf; \
echo "Finished making pddf whl package for $$mod"; \
fi; \
continue; \
fi; \
cd $(MOD_SRC_DIR)/$${mod}; \
python3 setup.py bdist_wheel -d $(MOD_SRC_DIR)/$${mod}/modules; \
python3 -m build --wheel --no-isolation --outdir $(MOD_SRC_DIR)/$${mod}/modules; \
done)

override_dh_auto_install:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ static const struct sensor_device_attribute *emc2305_fan_attrs[] = {
* driver interface
*/

static int emc2305_remove(struct i2c_client *client)
static void emc2305_remove(struct i2c_client *client)
{
struct emc2305_data *data = i2c_get_clientdata(client);
int fan_idx, i;
Expand All @@ -636,7 +636,6 @@ static int emc2305_remove(struct i2c_client *client)
&emc2305_attr_common[i].dev_attr);

kfree(data);
return 0;
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,15 +108,13 @@ static int mc24lc64t_probe(struct i2c_client *client,
return err;
}

static int mc24lc64t_remove(struct i2c_client *client)
static void mc24lc64t_remove(struct i2c_client *client)
{
struct mc24lc64t_data *drvdata = i2c_get_clientdata(client);

i2c_unregister_device(drvdata->fake_client);

sysfs_remove_bin_file(&client->dev.kobj, &mc24lc64t_bit_attr);

return 0;
}

static const struct i2c_device_id mc24lc64t_id[] = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ static const struct sensor_device_attribute *emc2305_fan_attrs[] = {
* driver interface
*/

static int emc2305_remove(struct i2c_client *client)
static void emc2305_remove(struct i2c_client *client)
{
struct emc2305_data *data = i2c_get_clientdata(client);
int fan_idx, i;
Expand All @@ -656,7 +656,6 @@ static int emc2305_remove(struct i2c_client *client)
&emc2305_attr_common[i].dev_attr);

kfree(data);
return 0;
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,15 +108,13 @@ static int mc24lc64t_probe(struct i2c_client *client,
return err;
}

static int mc24lc64t_remove(struct i2c_client *client)
static void mc24lc64t_remove(struct i2c_client *client)
{
struct mc24lc64t_data *drvdata = i2c_get_clientdata(client);

i2c_unregister_device(drvdata->fake_client);

sysfs_remove_bin_file(&client->dev.kobj, &mc24lc64t_bit_attr);

return 0;
}

static const struct i2c_device_id mc24lc64t_id[] = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,9 @@ static int mc24lc64t_probe(struct i2c_client *client,
return err;
}

static int mc24lc64t_remove(struct i2c_client *client)
static void mc24lc64t_remove(struct i2c_client *client)
{
struct mc24lc64t_data *drvdata = i2c_get_clientdata(client);
sysfs_remove_bin_file(&client->dev.kobj, &mc24lc64t_bit_attr);

return 0;
}

static const struct i2c_device_id mc24lc64t_id[] = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,9 @@ static int mc24lc64t_probe(struct i2c_client *client,
return err;
}

static int mc24lc64t_remove(struct i2c_client *client)
static void mc24lc64t_remove(struct i2c_client *client)
{
struct mc24lc64t_data *drvdata = i2c_get_clientdata(client);
sysfs_remove_bin_file(&client->dev.kobj, &mc24lc64t_bit_attr);

return 0;
}

static const struct i2c_device_id mc24lc64t_id[] = {
Expand Down
5 changes: 3 additions & 2 deletions platform/pddf/i2c/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ include /usr/share/dpkg/pkg-info.mk
export INSTALL_MOD_DIR:=extra

PYTHON ?= python3
PIP ?= pip3

PACKAGE_PRE_NAME := sonic-platform-pddf
KVERSION ?= $(shell uname -r)
Expand All @@ -37,7 +38,7 @@ clean:
build:
set -e; \
make modules -C $(KERNEL_SRC)/build M=$(MOD_SRC_DIR); \
$(PYTHON) $(MOD_SRC_DIR)/setup.py build; \
$(PYTHON) -m build --wheel --no-isolation $(MOD_SRC_DIR); \
set +e

binary: binary-arch binary-indep
Expand All @@ -59,7 +60,7 @@ binary-indep:
# Need to take a backup of symvers file for compilation of custom modules in various platforms
cp $(MOD_SRC_DIR)/Module.symvers $(MOD_SRC_DIR)/Module.symvers.PDDF; \
cp -r $(MOD_SRC_DIR)/$(UTILS_DIR)/* debian/$(PACKAGE_PRE_NAME)/usr/local/bin/; \
$(PYTHON) $(MOD_SRC_DIR)/setup.py install --root=$(MOD_SRC_DIR)/debian/$(PACKAGE_PRE_NAME) --install-layout=deb; \
$(PIP) install --root=$(MOD_SRC_DIR)/debian/$(PACKAGE_PRE_NAME) $(MOD_SRC_DIR)/; \
set +e

# Resuming debhelper scripts
Expand Down
4 changes: 1 addition & 3 deletions platform/pddf/i2c/modules/cpld/driver/pddf_cpld_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ static int board_i2c_cpld_probe(struct i2c_client *client,
return status;
}

static int board_i2c_cpld_remove(struct i2c_client *client)
static void board_i2c_cpld_remove(struct i2c_client *client)
{
/* Platform data is just a char string */
char *platdata = (char *)client->dev.platform_data;
Expand All @@ -247,8 +247,6 @@ static int board_i2c_cpld_remove(struct i2c_client *client)
{
kfree(platdata);
}

return 0;
}

static const struct i2c_device_id board_i2c_cpld_id[] = {
Expand Down
4 changes: 1 addition & 3 deletions platform/pddf/i2c/modules/fan/driver/pddf_fan_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ static int pddf_fan_probe(struct i2c_client *client,
return status;
}

static int pddf_fan_remove(struct i2c_client *client)
static void pddf_fan_remove(struct i2c_client *client)
{
int i = 0, ret = 0;
struct sensor_device_attribute *ptr = NULL;
Expand Down Expand Up @@ -590,8 +590,6 @@ static int pddf_fan_remove(struct i2c_client *client)
if (ret!=0)
printk(KERN_ERR "FAN post_remove function failed\n");
}

return 0;
}

/* Addresses to scan */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,12 +184,10 @@ static int board_i2c_fpga_probe(struct i2c_client *client,
return status;
}

static int board_i2c_fpga_remove(struct i2c_client *client)
static void board_i2c_fpga_remove(struct i2c_client *client)
{
sysfs_remove_group(&client->dev.kobj, &fpgai2c_attribute_group);
board_i2c_fpga_remove_client(client);

return 0;
}

static const struct i2c_device_id board_i2c_fpga_id[] = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -349,4 +349,3 @@ module_exit (pddf_fpgapci_driver_exit);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Broadcom");
MODULE_DESCRIPTION ("PDDF Driver for FPGAPCI Logic I2C bus");
MODULE_SUPPORTED_DEVICE ("PDDF FPGAPCI Logic I2C bus");
4 changes: 1 addition & 3 deletions platform/pddf/i2c/modules/psu/driver/pddf_psu_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ static int psu_probe(struct i2c_client *client,
return status;
}

static int psu_remove(struct i2c_client *client)
static void psu_remove(struct i2c_client *client)
{
int i=0, ret = 0;
struct psu_data *data = i2c_get_clientdata(client);
Expand Down Expand Up @@ -319,8 +319,6 @@ static int psu_remove(struct i2c_client *client)
if (ret!=0)
printk(KERN_ERR "FAN post_remove function failed\n");
}

return ret;
}

enum psu_intf
Expand Down
4 changes: 1 addition & 3 deletions platform/pddf/i2c/modules/xcvr/driver/pddf_xcvr_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ static int xcvr_probe(struct i2c_client *client,
return status;
}

static int xcvr_remove(struct i2c_client *client)
static void xcvr_remove(struct i2c_client *client)
{
int ret = 0;
struct xcvr_data *data = i2c_get_clientdata(client);
Expand Down Expand Up @@ -222,8 +222,6 @@ static int xcvr_remove(struct i2c_client *client)
if (ret!=0)
printk(KERN_ERR "FAN post_remove function failed\n");
}

return 0;
}

enum xcvr_intf
Expand Down
Loading