Commit Graph

7 Commits

Author SHA1 Message Date
Wei Yongjun 2b8454a75b platform/chrome: unregister platform driver/device when module exit
We have registered platform driver and device when module
init, and need unregister them when module exit.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Olof Johansson <olof@lixom.net>
2013-11-26 20:18:07 -08:00
Olof Johansson 6d3c1afe73 platform/chrome: Make i2c_adapter_names static
Not used outside of the file, so declaration should be static. Picked up by
sparse:

drivers/platform/chrome/chromeos_laptop.c:44:12: warning: symbol
    'i2c_adapter_names' was not declared. Should it be static?

Signed-off-by: Olof Johansson <olof@lixom.net>
Reviewed-by: Benson Leung <bleung@chromium.org>
2013-11-25 13:27:24 -08:00
Benson Leung cdddd23fa2 platform/chrome: chromeos_laptop - fix incorrect placement of __initdata tag
__initdata tag should be placed between the variable name and equal
sign for the variable to be placed in the intended .init.data section.

Signed-off-by: Benson Leung <bleung@chromium.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
2013-11-25 12:51:15 -08:00
Benson Leung 9ad3692458 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>
2013-11-25 12:51:09 -08:00
Aaron Durbin ec199dd57e platform/chrome: chromeos_laptop - Restructure device associations
The previous code had a single DMI matching entry
for each device on a board. Instead provide a single
DMI entry for each board which references a structure
about each board that lists the associated peripherals.
This allows for a lower number of DMI matching sequences
as well making it easier to add new boards.

Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Signed-off-by: Benson Leung <bleung@chromium.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
2013-11-25 12:51:02 -08:00
Olof Johansson 9742e127cd platform/chrome: Add pstore platform_device
Add the ramoops pstore device so that we get logs of panics across reboots.

Signed-off-by: Olof Johansson <olof@lixom.net>
2013-11-25 12:47:24 -08:00
Olof Johansson ab0431059e platform: add chrome platform directory
It makes sense to split out the Chromebook/Chromebox hardware platform
drivers to a separate subdirectory, since some of it will be shared
between ARM and x86.

This moves over the existing chromeos_laptop driver without making
any other changes, and adds appropriate Kconfig entries for the new
directory. It also adds a MAINTAINERS entry for the new subdir.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2013-11-20 18:51:03 -05:00