Skip to content

Commit 8a2de68

Browse files
saiarcot895FengPan-Frank
authored andcommitted
Start updating the build rules for platform modules and fix some of the kernel module compilation errors
Signed-off-by: Saikrishna Arcot <[email protected]> Signed-off-by: Feng Pan <[email protected]>
1 parent 6587f1d commit 8a2de68

File tree

98 files changed

+441
-666
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+441
-666
lines changed

platform/broadcom/rules.dep

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,25 @@
1-
#DPKG FRK
21
include $(PLATFORM_PATH)/sai-modules.dep
32
include $(PLATFORM_PATH)/sai.dep
4-
# TODO: re-enable once the following have been updated for bookworm:
5-
# * Nokia
6-
# * Juniper
7-
# * Ragile
3+
# TODO(trixie): re-enable modules after updating for Trixie
84
include $(PLATFORM_PATH)/platform-modules-s6000.dep
95
include $(PLATFORM_PATH)/platform-modules-dell.dep
106
include $(PLATFORM_PATH)/platform-modules-arista.dep
117
include $(PLATFORM_PATH)/platform-modules-nexthop.dep
12-
include $(PLATFORM_PATH)/platform-modules-ingrasys.dep
13-
include $(PLATFORM_PATH)/platform-modules-accton.dep
14-
include $(PLATFORM_PATH)/platform-modules-alphanetworks.dep
15-
include $(PLATFORM_PATH)/platform-modules-inventec.dep
8+
#include $(PLATFORM_PATH)/platform-modules-ingrasys.dep
9+
#include $(PLATFORM_PATH)/platform-modules-accton.dep
10+
#include $(PLATFORM_PATH)/platform-modules-alphanetworks.dep
11+
#include $(PLATFORM_PATH)/platform-modules-inventec.dep
1612
include $(PLATFORM_PATH)/platform-modules-cel.dep
17-
include $(PLATFORM_PATH)/platform-modules-delta.dep
18-
include $(PLATFORM_PATH)/platform-modules-quanta.dep
13+
#include $(PLATFORM_PATH)/platform-modules-delta.dep
14+
#include $(PLATFORM_PATH)/platform-modules-quanta.dep
1915
#include $(PLATFORM_PATH)/platform-modules-mitac.dep
2016
#include $(PLATFORM_PATH)/platform-modules-juniper.dep
17+
#include $(PLATFORM_PATH)/platform-modules-brcm-xlr-gts.dep
18+
#include $(PLATFORM_PATH)/platform-modules-ruijie.dep
2119
#include $(PLATFORM_PATH)/platform-modules-ragile.dep
22-
include $(PLATFORM_PATH)/platform-modules-ruijie.dep
2320
include $(PLATFORM_PATH)/platform-modules-supermicro.dep
24-
include $(PLATFORM_PATH)/platform-modules-brcm-xlr-gts.dep
25-
include $(PLATFORM_PATH)/platform-modules-ufispace.dep
26-
include $(PLATFORM_PATH)/platform-modules-micas.dep
21+
#include $(PLATFORM_PATH)/platform-modules-ufispace.dep
22+
#include $(PLATFORM_PATH)/platform-modules-micas.dep
2723
include $(PLATFORM_PATH)/docker-syncd-brcm.dep
2824
include $(PLATFORM_PATH)/docker-syncd-brcm-rpc.dep
2925
include $(PLATFORM_PATH)/docker-saiserver-brcm.dep

platform/broadcom/rules.mk

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,27 @@
11
include $(PLATFORM_PATH)/sai-modules.mk
22
include $(PLATFORM_PATH)/sai.mk
33
include $(PLATFORM_PATH)/sswsyncd.mk
4-
# TODO: re-enable once the following have been updated for bookworm:
5-
# * Nokia
6-
# * Juniper
7-
# * Ragile
4+
# TODO(trixie): re-enable modules after updating for Trixie
85
include $(PLATFORM_PATH)/platform-modules-nokia.mk
96
include $(PLATFORM_PATH)/platform-modules-dell.mk
107
include $(PLATFORM_PATH)/platform-modules-arista.mk
118
include $(PLATFORM_PATH)/platform-modules-nexthop.mk
129
#include $(PLATFORM_PATH)/platform-modules-ingrasys.mk
13-
include $(PLATFORM_PATH)/platform-modules-accton.mk
14-
include $(PLATFORM_PATH)/platform-modules-alphanetworks.mk
10+
#include $(PLATFORM_PATH)/platform-modules-accton.mk
11+
#include $(PLATFORM_PATH)/platform-modules-alphanetworks.mk
1512
#include $(PLATFORM_PATH)/platform-modules-inventec.mk
1613
include $(PLATFORM_PATH)/platform-modules-cel.mk
1714
#include $(PLATFORM_PATH)/platform-modules-delta.mk
18-
include $(PLATFORM_PATH)/platform-modules-quanta.mk
15+
#include $(PLATFORM_PATH)/platform-modules-quanta.mk
1916
##include $(PLATFORM_PATH)/platform-modules-mitac.mk
2017
#include $(PLATFORM_PATH)/platform-modules-juniper.mk
2118
#include $(PLATFORM_PATH)/platform-modules-brcm-xlr-gts.mk
2219
#include $(PLATFORM_PATH)/platform-modules-ruijie.mk
2320
#include $(PLATFORM_PATH)/platform-modules-ragile.mk
2421
include $(PLATFORM_PATH)/platform-modules-supermicro.mk
2522
#include $(PLATFORM_PATH)/platform-modules-tencent.mk
26-
include $(PLATFORM_PATH)/platform-modules-ufispace.mk
27-
include $(PLATFORM_PATH)/platform-modules-micas.mk
23+
#include $(PLATFORM_PATH)/platform-modules-ufispace.mk
24+
#include $(PLATFORM_PATH)/platform-modules-micas.mk
2825
include $(PLATFORM_PATH)/docker-syncd-brcm.mk
2926
include $(PLATFORM_PATH)/docker-syncd-brcm-rpc.mk
3027
include $(PLATFORM_PATH)/docker-saiserver-brcm.mk

platform/broadcom/sonic-platform-modules-accton/as5712-54x/modules/accton_as5712_54x_fan.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -390,12 +390,10 @@ static int accton_as5712_54x_fan_probe(struct platform_device *pdev)
390390
return status;
391391
}
392392

393-
static int accton_as5712_54x_fan_remove(struct platform_device *pdev)
393+
static void accton_as5712_54x_fan_remove(struct platform_device *pdev)
394394
{
395395
hwmon_device_unregister(fan_data->hwmon_dev);
396396
sysfs_remove_group(&fan_data->pdev->dev.kobj, &accton_as5712_54x_fan_group);
397-
398-
return 0;
399397
}
400398

401399

platform/broadcom/sonic-platform-modules-accton/as5712-54x/modules/accton_as5712_54x_psu.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,11 +143,11 @@ static const struct attribute_group as5712_54x_psu_group = {
143143
.attrs = as5712_54x_psu_attributes,
144144
};
145145

146-
static int as5712_54x_psu_probe(struct i2c_client *client,
147-
const struct i2c_device_id *dev_id)
146+
static int as5712_54x_psu_probe(struct i2c_client *client)
148147
{
149148
struct as5712_54x_psu_data *data;
150149
int status;
150+
const struct i2c_device_id *dev_id = i2c_client_get_device_id(client);
151151

152152
if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_I2C_BLOCK)) {
153153
status = -EIO;

platform/broadcom/sonic-platform-modules-accton/as5712-54x/modules/i2c-mux-accton_as5712_54x_cpld.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1192,10 +1192,10 @@ static ssize_t show_version(struct device *dev, struct device_attribute *attr, c
11921192
/*
11931193
* I2C init/probing/exit functions
11941194
*/
1195-
static int as5712_54x_cpld_mux_probe(struct i2c_client *client,
1196-
const struct i2c_device_id *id)
1195+
static int as5712_54x_cpld_mux_probe(struct i2c_client *client)
11971196
{
11981197
struct i2c_adapter *adap = to_i2c_adapter(client->dev.parent);
1198+
const struct i2c_device_id *id = i2c_client_get_device_id(client);
11991199
int num, force, class;
12001200
struct i2c_mux_core *muxc;
12011201
struct as5712_54x_cpld_data *data;
@@ -1221,9 +1221,8 @@ static int as5712_54x_cpld_mux_probe(struct i2c_client *client,
12211221
/* Now create an adapter for each channel */
12221222
for (num = 0; num < chips[data->type].nchans; num++) {
12231223
force = 0; /* dynamic adap number */
1224-
class = 0; /* no class by default */
12251224

1226-
ret = i2c_mux_add_adapter(muxc, force, num, class);
1225+
ret = i2c_mux_add_adapter(muxc, force, num);
12271226

12281227
if (ret) {
12291228
dev_err(&client->dev,

platform/broadcom/sonic-platform-modules-accton/as5712-54x/modules/leds-accton_as5712_54x.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -526,15 +526,13 @@ static int accton_as5712_54x_led_probe(struct platform_device *pdev)
526526
return ret;
527527
}
528528

529-
static int accton_as5712_54x_led_remove(struct platform_device *pdev)
529+
static void accton_as5712_54x_led_remove(struct platform_device *pdev)
530530
{
531531
int i;
532532

533533
for (i = 0; i < ARRAY_SIZE(accton_as5712_54x_leds); i++) {
534534
led_classdev_unregister(&accton_as5712_54x_leds[i]);
535535
}
536-
537-
return 0;
538536
}
539537

540538
static struct platform_driver accton_as5712_54x_led_driver = {

platform/broadcom/sonic-platform-modules-accton/as7326-56x/modules/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ obj-m:= accton_i2c_cpld.o \
66

77

88
CFLAGS_pddf_custom_psu.o := -I$(M)/../../../../pddf/i2c/modules/include
9-
KBUILD_EXTRA_SYMBOLS := $(M)/../../../../pddf/i2c/Module.symvers.PDDF
9+
KBUILD_EXTRA_SYMBOLS := $(KERNEL_SRC)/Module.symvers.PDDF
1010

1111
else
1212
ifeq (,$(KERNEL_SRC))

platform/broadcom/sonic-platform-modules-accton/as7712-32x/modules/accton_as7712_32x_fan.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -536,8 +536,7 @@ static struct as7712_32x_fan_data *as7712_32x_fan_update_device(struct device *d
536536
return data;
537537
}
538538

539-
static int as7712_32x_fan_probe(struct i2c_client *client,
540-
const struct i2c_device_id *dev_id)
539+
static int as7712_32x_fan_probe(struct i2c_client *client)
541540
{
542541
struct as7712_32x_fan_data *data;
543542
int status;

platform/broadcom/sonic-platform-modules-accton/as7712-32x/modules/accton_as7712_32x_psu.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,11 @@ static const struct attribute_group as7712_32x_psu_group = {
105105
.attrs = as7712_32x_psu_attributes,
106106
};
107107

108-
static int as7712_32x_psu_probe(struct i2c_client *client,
109-
const struct i2c_device_id *dev_id)
108+
static int as7712_32x_psu_probe(struct i2c_client *client)
110109
{
111110
struct as7712_32x_psu_data *data;
112111
int status;
112+
const struct i2c_device_id *dev_id = i2c_client_get_device_id(client);
113113

114114
if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_I2C_BLOCK)) {
115115
status = -EIO;

platform/broadcom/sonic-platform-modules-accton/as7712-32x/modules/accton_as7712_32x_sfp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1079,9 +1079,9 @@ static int qsfp_probe(struct i2c_client *client, const struct i2c_device_id *dev
10791079
return status;
10801080
}
10811081

1082-
static int sfp_device_probe(struct i2c_client *client,
1083-
const struct i2c_device_id *dev_id)
1082+
static int sfp_device_probe(struct i2c_client *client)
10841083
{
1084+
const struct i2c_device_id *dev_id = i2c_client_get_device_id(client);
10851085
struct sfp_port_data *data = NULL;
10861086

10871087
data = kzalloc(sizeof(struct sfp_port_data), GFP_KERNEL);

0 commit comments

Comments
 (0)