platform/x86: mlx-platform: Add physical bus number auto detection
mlx-platform does not provide a bus number to i2c-mlxcpld, assuming it is always one. On some x86 systems, other i2c drivers may probe before i2c-mlxcpld, causing bus one to be busy. Make mlx-platform determine which adapter number is free prior to activating i2c-mlxpld, adjusting the mux base numbers accordingly. Update the mlxreg-hotplug pdata similarly. This adds an explicit mlx-platform build dependency on I2C, update the Kconfig accordingly. Add the missing REGMAP dependency while we're at it. Signed-off-by: Vadim Pasternak <vadimp@mellanox.com> [dvhart: Rewrite commit message more concisely] [dvhart: Add build dependencies] Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
This commit is contained in:

committed by
Darren Hart (VMware)

parent
f709e1bfb0
commit
ef0f62264b
@@ -130,6 +130,7 @@ struct mlxreg_core_platform_data {
|
||||
* @cell_low: location of low aggregation interrupt register;
|
||||
* @mask_low: low aggregation interrupt common mask;
|
||||
* @deferred_nr: I2C adapter number must be exist prior probing execution;
|
||||
* @shift_nr: I2C adapter numbers must be incremented by this value;
|
||||
*/
|
||||
struct mlxreg_core_hotplug_platform_data {
|
||||
struct mlxreg_core_item *items;
|
||||
@@ -141,6 +142,7 @@ struct mlxreg_core_hotplug_platform_data {
|
||||
u32 cell_low;
|
||||
u32 mask_low;
|
||||
int deferred_nr;
|
||||
int shift_nr;
|
||||
};
|
||||
|
||||
#endif /* __LINUX_PLATFORM_DATA_MLXREG_H */
|
||||
|
Reference in New Issue
Block a user