platform/chrome: chromeos_laptop - Use deferred probing
authorBenson Leung <bleung@chromium.org>
Mon, 21 Oct 2013 03:58:25 +0000 (20:58 -0700)
committerOlof Johansson <olof@lixom.net>
Mon, 25 Nov 2013 20:51:09 +0000 (12:51 -0800)
commit9ad3692458c387eb9537da73b2b75841ed7acdaf
treef9504a0bfb1938ab6d38be5d914e8cbbcfe8a5b6
parentec199dd57ef71858b53828283ac495ed82164933
platform/chrome: chromeos_laptop - Use deferred probing

Further refactor chromeos_laptop, adding a probe function.
Init will call dmi_check_system, but will only use the match to select
a chromeos_laptop structure of the current board.

Probe will add the devices, and on errors return -EPROBE_DEFER.
If i2c adapters are loaded after chromeos_laptop inits, the deferred
probe will instantiate the peripherals when the bus appears.

Signed-off-by: Benson Leung <bleung@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
drivers/platform/chrome/chromeos_laptop.c