Skip to content

Commit 233fd7e

Browse files
vadimp-nvidiajwrdegoede
authored andcommitted
platform: mellanox: Extend all systems with I2C notification callback
Motivation is to provide synchronization between I2C main bus and other platform drivers using this notification callback. Signed-off-by: Vadim Pasternak <[email protected]> Reviewed-by: Michael Shych <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Hans de Goede <[email protected]>
1 parent 158cd83 commit 233fd7e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

drivers/platform/x86/mlx-platform.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,11 @@ static const struct resource mlxplat_lpc_resources[] = {
363363
IORESOURCE_IO),
364364
};
365365

366+
/* Platform systems default i2c data */
367+
static struct mlxreg_core_hotplug_platform_data mlxplat_mlxcpld_i2c_default_data = {
368+
.completion_notify = mlxplat_i2c_main_complition_notify,
369+
};
370+
366371
/* Platform i2c next generation systems data */
367372
static struct mlxreg_core_data mlxplat_mlxcpld_i2c_ng_items_data[] = {
368373
{
@@ -5479,6 +5484,7 @@ static int __init mlxplat_dmi_default_matched(const struct dmi_system_id *dmi)
54795484
mlxplat_led = &mlxplat_default_led_data;
54805485
mlxplat_regs_io = &mlxplat_default_regs_io_data;
54815486
mlxplat_wd_data[0] = &mlxplat_mlxcpld_wd_set_type1[0];
5487+
mlxplat_i2c = &mlxplat_mlxcpld_i2c_default_data;
54825488

54835489
return 1;
54845490
}
@@ -5501,6 +5507,7 @@ static int __init mlxplat_dmi_default_wc_matched(const struct dmi_system_id *dmi
55015507
mlxplat_led = &mlxplat_default_led_wc_data;
55025508
mlxplat_regs_io = &mlxplat_default_regs_io_data;
55035509
mlxplat_wd_data[0] = &mlxplat_mlxcpld_wd_set_type1[0];
5510+
mlxplat_i2c = &mlxplat_mlxcpld_i2c_default_data;
55045511

55055512
return 1;
55065513
}
@@ -5548,6 +5555,7 @@ static int __init mlxplat_dmi_msn21xx_matched(const struct dmi_system_id *dmi)
55485555
mlxplat_led = &mlxplat_msn21xx_led_data;
55495556
mlxplat_regs_io = &mlxplat_msn21xx_regs_io_data;
55505557
mlxplat_wd_data[0] = &mlxplat_mlxcpld_wd_set_type1[0];
5558+
mlxplat_i2c = &mlxplat_mlxcpld_i2c_default_data;
55515559

55525560
return 1;
55535561
}
@@ -5570,6 +5578,7 @@ static int __init mlxplat_dmi_msn274x_matched(const struct dmi_system_id *dmi)
55705578
mlxplat_led = &mlxplat_default_led_data;
55715579
mlxplat_regs_io = &mlxplat_msn21xx_regs_io_data;
55725580
mlxplat_wd_data[0] = &mlxplat_mlxcpld_wd_set_type1[0];
5581+
mlxplat_i2c = &mlxplat_mlxcpld_i2c_default_data;
55735582

55745583
return 1;
55755584
}
@@ -5592,6 +5601,7 @@ static int __init mlxplat_dmi_msn201x_matched(const struct dmi_system_id *dmi)
55925601
mlxplat_led = &mlxplat_msn21xx_led_data;
55935602
mlxplat_regs_io = &mlxplat_msn21xx_regs_io_data;
55945603
mlxplat_wd_data[0] = &mlxplat_mlxcpld_wd_set_type1[0];
5604+
mlxplat_i2c = &mlxplat_mlxcpld_i2c_default_data;
55955605

55965606
return 1;
55975607
}
@@ -5641,6 +5651,7 @@ static int __init mlxplat_dmi_comex_matched(const struct dmi_system_id *dmi)
56415651
mlxplat_fan = &mlxplat_default_fan_data;
56425652
for (i = 0; i < ARRAY_SIZE(mlxplat_mlxcpld_wd_set_type2); i++)
56435653
mlxplat_wd_data[i] = &mlxplat_mlxcpld_wd_set_type2[i];
5654+
mlxplat_i2c = &mlxplat_mlxcpld_i2c_default_data;
56445655
mlxplat_regmap_config = &mlxplat_mlxcpld_regmap_config_comex;
56455656

56465657
return 1;

0 commit comments

Comments
 (0)