Skip to content

Commit aa464a9

Browse files
pavannaregundiNaveen-Rampuram
authored andcommitted
[marvell-teralynx] Add Trixie support (sonic-net#43)
* Add Trixie support Signed-off-by: Naveen Rampuram <[email protected]> * Update submodule sonic-platform-marvell-teralynx Signed-off-by: Pavan Naregundi <[email protected]> * Update submodule mrvl-teralynx Signed-off-by: Pavan Naregundi <[email protected]> --------- Signed-off-by: Naveen Rampuram <[email protected]> Signed-off-by: Pavan Naregundi <[email protected]> Co-authored-by: Naveen Rampuram <[email protected]>
1 parent 33dc9b0 commit aa464a9

25 files changed

Lines changed: 72 additions & 141 deletions

platform/marvell-teralynx/sonic-platform-modules-cel/midstone-200i/modules/200i_cpld.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -736,7 +736,12 @@ static struct i2c_adapter * cel_ms200i_i2c_init(struct platform_device *pdev, in
736736

737737
new_adapter->dev.parent = &pdev->dev;
738738
new_adapter->owner = THIS_MODULE;
739-
new_adapter->class = I2C_CLASS_HWMON | I2C_CLASS_SPD;
739+
740+
#ifdef I2C_CLASS_SPD
741+
new_adapter->class = I2C_CLASS_HWMON | I2C_CLASS_SPD;
742+
#else
743+
new_adapter->class = I2C_CLASS_HWMON;
744+
#endif
740745
new_adapter->algo = &ms200i_i2c_algorithm;
741746

742747
snprintf(new_adapter->name, sizeof(new_adapter->name),
@@ -812,7 +817,7 @@ static int cel_ms200i_lpc_drv_probe(struct platform_device *pdev)
812817
return 0;
813818
}
814819

815-
static int cel_ms200i_lpc_drv_remove(struct platform_device *pdev)
820+
static void cel_ms200i_lpc_drv_remove(struct platform_device *pdev)
816821
{
817822
int portid_count;
818823
struct ms200i_i2c_data *new_data;
@@ -821,7 +826,6 @@ static int cel_ms200i_lpc_drv_remove(struct platform_device *pdev)
821826

822827
for (portid_count=1 ; portid_count<=LENGTH_PORT_CPLD ; portid_count++)
823828
i2c_del_adapter(cpld_data->i2c_adapter[portid_count-1]);
824-
return 0;
825829
}
826830

827831
static struct platform_driver cel_ms200i_lpc_drv = {

platform/marvell-teralynx/sonic-platform-modules-cel/midstone-200i/modules/200i_wdt.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,15 +315,14 @@ static int ms200i_wdt_probe(struct platform_device *pdev)
315315
return ret;
316316
}
317317

318-
static int ms200i_wdt_remove(struct platform_device *pdev)
318+
static void ms200i_wdt_remove(struct platform_device *pdev)
319319
{
320320
struct ms200i_wdt_drvdata *drvdata = platform_get_drvdata(pdev);
321321

322322
watchdog_unregister_device(&drvdata->wdt);
323323
#ifdef ENAB_DEBUG
324324
printk(KERN_INFO "MS200i WDT Remove");
325325
#endif
326-
return 0;
327326
}
328327

329328
static struct platform_driver ms200i_wdt_drv = {

platform/marvell-teralynx/sonic-platform-modules-cel/midstone-200i/modules/mc24lc64t.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,7 @@ static struct bin_attribute mc24lc64t_bit_attr = {
7979
.read = mc24lc64t_read,
8080
};
8181

82-
static int mc24lc64t_probe(struct i2c_client *client,
83-
const struct i2c_device_id *id)
82+
static int mc24lc64t_probe(struct i2c_client *client)
8483
{
8584
struct i2c_adapter *adapter = client->adapter;
8685
struct mc24lc64t_data *drvdata;

platform/marvell-teralynx/sonic-platform-modules-supermicro/debian/rules

100644100755
File mode changed.

platform/marvell-teralynx/sonic-platform-modules-supermicro/sse-t7132s/modules/t7132s.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1401,7 +1401,7 @@ static int t7132s_drv_probe(struct platform_device *pdev)
14011401
int adapter_id = 0;
14021402
int chan_id = 0;
14031403

1404-
cpld_class = class_create(THIS_MODULE, CLASS_NAME);
1404+
cpld_class = class_create(CLASS_NAME);
14051405
ret = PTR_ERR(cpld_class);
14061406

14071407
cpld_data = devm_kzalloc(&pdev->dev, sizeof(struct t7132s_cpld),
@@ -1517,7 +1517,7 @@ static int t7132s_drv_probe(struct platform_device *pdev)
15171517
return 0;
15181518
}
15191519

1520-
static int t7132s_drv_remove(struct platform_device *pdev)
1520+
static void t7132s_drv_remove(struct platform_device *pdev)
15211521
{
15221522
int ret = 0;
15231523
int port_count = 0;
@@ -1556,7 +1556,6 @@ static int t7132s_drv_remove(struct platform_device *pdev)
15561556
devm_kfree(&pdev->dev, cpld_data);
15571557
devm_kfree(&pdev->dev, pwddev);
15581558

1559-
return 0;
15601559
}
15611560

15621561
static struct platform_driver t7132s_drv = {

platform/marvell-teralynx/sonic-platform-modules-wistron/6512-32r/modules/oldjc42.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ static int jc42_detect(struct i2c_client *client, struct i2c_board_info *info)
437437
struct jc42_chips *chip = &jc42_chips[i];
438438
if (manid == chip->manid &&
439439
(devid & chip->devid_mask) == chip->devid) {
440-
strlcpy(info->type, "jc42", I2C_NAME_SIZE);
440+
strscpy(info->type, "jc42", I2C_NAME_SIZE);
441441
return 0;
442442
}
443443
}
@@ -580,13 +580,17 @@ MODULE_DEVICE_TABLE(of, jc42_of_ids);
580580
#endif
581581

582582
static struct i2c_driver jc42_driver = {
583-
.class = I2C_CLASS_SPD | I2C_CLASS_HWMON,
583+
#ifdef I2C_CLASS_SPD
584+
.class = I2C_CLASS_SPD | I2C_CLASS_HWMON,
585+
#else
586+
.class = I2C_CLASS_HWMON,
587+
#endif
584588
.driver = {
585589
.name = "oldjc42",
586590
.pm = JC42_DEV_PM_OPS,
587591
.of_match_table = of_match_ptr(jc42_of_ids),
588592
},
589-
.probe_new = jc42_probe,
593+
.probe = jc42_probe,
590594
.remove = jc42_remove,
591595
.id_table = jc42_id,
592596
.detect = jc42_detect,

platform/marvell-teralynx/sonic-platform-modules-wistron/6512-32r/modules/wistron_6512_32r_cpld.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -943,8 +943,9 @@ static void wistron_cpld_remove_client(struct i2c_client *client)
943943
/*
944944
* I2C init/probing/exit functions
945945
*/
946-
static int wistron_cpld_probe(struct i2c_client *client, const struct i2c_device_id *id)
946+
static int wistron_cpld_probe(struct i2c_client *client)
947947
{
948+
const struct i2c_device_id *id = i2c_client_get_device_id(client);
948949
struct wistron_cpld_data *data;
949950
int ret = -ENODEV;
950951
const struct attribute_group *group = NULL;

platform/marvell-teralynx/sonic-platform-modules-wistron/6512-32r/modules/wistron_6512_32r_fan.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ static const struct attribute_group wistron_fan_group = {
181181
.attrs = wistron_fan_attributes,
182182
};
183183

184-
static int wistron_fan_probe(struct i2c_client *client, const struct i2c_device_id *dev_id)
184+
static int wistron_fan_probe(struct i2c_client *client)
185185
{
186186
struct wistron_fan_data *data;
187187
int status;

0 commit comments

Comments
 (0)