platform/chrome: chromeos_laptop - use I2C notifier to create devices
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 20 Mar 2018 22:31:34 +0000 (15:31 -0700)
committerBenson Leung <bleung@chromium.org>
Tue, 10 Apr 2018 05:46:09 +0000 (22:46 -0700)
commit8d88cb03c22e4cbde4c3020883f534e8ba7f5c79
tree6925d7f404931e6ea3e8c805d16d9699c995a972
parent65582920d72d2562e44c07aa530586a3583477b9
platform/chrome: chromeos_laptop - use I2C notifier to create devices

Instead of using platform device and deferrals to handle the case when i2C
adapters appear late in the game, and not handling device unbinding all
that well, let's switch to using I2C bus notifier to get told when a new
I2C adapter appears in the system, and attempt to add appropriate devices
at that time.

In case when we have 2 Designware adapters in the system (Acer C720),
instead of counting and hoping they get enumerate din the right order,
let's switch to using their PCI devids (slot/function) that should be
stable.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Benson Leung <bleung@chromium.org>
drivers/platform/chrome/chromeos_laptop.c