platform/x86: mlx-platform: Add deffered bus functionality
authorVadim Pasternak <vadimp@mellanox.com>
Tue, 13 Feb 2018 22:09:34 +0000 (22:09 +0000)
committerDarren Hart (VMware) <dvhart@infradead.org>
Fri, 23 Mar 2018 23:14:28 +0000 (16:14 -0700)
commitd726f6b1997528354e1053accbb6223981e81802
tree86922fc85a8de11ef2d56dfe780f140d92e16bc7
parentd066f144d66728b8187bda5ef966b44c58935484
platform/x86: mlx-platform: Add deffered bus functionality

mlx-platform activates i2c-mux-reg, which creates buses needed by
mlxreg-hotplug. If the mlxreg-hotplug probe runs before the i2c-mux-reg
probe completes, it may attempt to connect a device to an adapter number
that has not been created yet, and fail.

Make mlx-platform driver record the highest bus number in mlxreg-hotplug
platform data and defer mlxreg-hotplug probe until all the buses are
created.

Signed-off-by: Vadim Pasternak <vadimp@mellanox.com>
[dvhart: rewrite commit message more concisely]
Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
drivers/platform/mellanox/mlxreg-hotplug.c
drivers/platform/x86/mlx-platform.c
include/linux/platform_data/mlxreg.h