diff options
author | Benson Leung <bleung@chromium.org> | 2013-02-21 12:14:56 -0800 |
---|---|---|
committer | Matthew Garrett <matthew.garrett@nebula.com> | 2013-02-27 08:30:45 -0500 |
commit | e7b28845d794b0f382a3942558c24e63d5e45c32 (patch) | |
tree | 9c9c24317b65b7b573a35f642e9da4de721d9ae1 /drivers/platform | |
parent | 33a84f8a7694e442a624556ef3ae40e91e31bd11 (diff) | |
download | blackbird-op-linux-e7b28845d794b0f382a3942558c24e63d5e45c32.tar.gz blackbird-op-linux-e7b28845d794b0f382a3942558c24e63d5e45c32.zip |
Platform: x86: chromeos_laptop - Add a more general add_i2c_device
This will allow us to assign devices to buses by the type enum.
Signed-off-by: Benson Leung <bleung@chromium.org>
Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r-- | drivers/platform/x86/chromeos_laptop.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/platform/x86/chromeos_laptop.c b/drivers/platform/x86/chromeos_laptop.c index e5380e772b26..6bde4e4c93b4 100644 --- a/drivers/platform/x86/chromeos_laptop.c +++ b/drivers/platform/x86/chromeos_laptop.c @@ -181,16 +181,24 @@ static __init struct i2c_client *add_probed_i2c_device( * info->addr. * Returns NULL if no device found. */ -static struct i2c_client __init *add_smbus_device(const char *name, - struct i2c_board_info *info) +static __init struct i2c_client *add_i2c_device(const char *name, + enum i2c_adapter_type type, + struct i2c_board_info *info) { const unsigned short addr_list[] = { info->addr, I2C_CLIENT_END }; return __add_probed_i2c_device(name, - find_i2c_adapter_num(I2C_ADAPTER_SMBUS), + find_i2c_adapter_num(type), info, addr_list); } + +static struct i2c_client __init *add_smbus_device(const char *name, + struct i2c_board_info *info) +{ + return add_i2c_device(name, I2C_ADAPTER_SMBUS, info); +} + static int __init setup_cyapa_smbus_tp(const struct dmi_system_id *id) { /* add cyapa touchpad on smbus */ |