diff options
| author | Vadim Pasternak <vadimp@mellanox.com> | 2018-02-13 17:09:36 -0500 |
|---|---|---|
| committer | Darren Hart (VMware) <dvhart@infradead.org> | 2018-03-23 19:14:29 -0400 |
| commit | ef0f62264b2a9e6fc73476ed22ade1ff1f3ad7f3 (patch) | |
| tree | 2cf6987205b838ec7bf503d90ebe89b91198e61c /include/linux/platform_data | |
| parent | f709e1bfb0c643a866b909d101442c7a7f425655 (diff) | |
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>
Diffstat (limited to 'include/linux/platform_data')
| -rw-r--r-- | include/linux/platform_data/mlxreg.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/platform_data/mlxreg.h b/include/linux/platform_data/mlxreg.h index 262910967476..2744cff1b297 100644 --- a/include/linux/platform_data/mlxreg.h +++ b/include/linux/platform_data/mlxreg.h | |||
| @@ -130,6 +130,7 @@ struct mlxreg_core_platform_data { | |||
| 130 | * @cell_low: location of low aggregation interrupt register; | 130 | * @cell_low: location of low aggregation interrupt register; |
| 131 | * @mask_low: low aggregation interrupt common mask; | 131 | * @mask_low: low aggregation interrupt common mask; |
| 132 | * @deferred_nr: I2C adapter number must be exist prior probing execution; | 132 | * @deferred_nr: I2C adapter number must be exist prior probing execution; |
| 133 | * @shift_nr: I2C adapter numbers must be incremented by this value; | ||
| 133 | */ | 134 | */ |
| 134 | struct mlxreg_core_hotplug_platform_data { | 135 | struct mlxreg_core_hotplug_platform_data { |
| 135 | struct mlxreg_core_item *items; | 136 | struct mlxreg_core_item *items; |
| @@ -141,6 +142,7 @@ struct mlxreg_core_hotplug_platform_data { | |||
| 141 | u32 cell_low; | 142 | u32 cell_low; |
| 142 | u32 mask_low; | 143 | u32 mask_low; |
| 143 | int deferred_nr; | 144 | int deferred_nr; |
| 145 | int shift_nr; | ||
| 144 | }; | 146 | }; |
| 145 | 147 | ||
| 146 | #endif /* __LINUX_PLATFORM_DATA_MLXREG_H */ | 148 | #endif /* __LINUX_PLATFORM_DATA_MLXREG_H */ |
