Commit e7b28845 authored by Benson Leung's avatar Benson Leung Committed by Matthew Garrett

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: default avatarBenson Leung <bleung@chromium.org>
Signed-off-by: default avatarMatthew Garrett <matthew.garrett@nebula.com>
parent 33a84f8a
...@@ -181,16 +181,24 @@ static __init struct i2c_client *add_probed_i2c_device( ...@@ -181,16 +181,24 @@ static __init struct i2c_client *add_probed_i2c_device(
* info->addr. * info->addr.
* Returns NULL if no device found. * Returns NULL if no device found.
*/ */
static struct i2c_client __init *add_smbus_device(const char *name, static __init struct i2c_client *add_i2c_device(const char *name,
struct i2c_board_info *info) enum i2c_adapter_type type,
struct i2c_board_info *info)
{ {
const unsigned short addr_list[] = { info->addr, I2C_CLIENT_END }; const unsigned short addr_list[] = { info->addr, I2C_CLIENT_END };
return __add_probed_i2c_device(name, return __add_probed_i2c_device(name,
find_i2c_adapter_num(I2C_ADAPTER_SMBUS), find_i2c_adapter_num(type),
info, info,
addr_list); 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) static int __init setup_cyapa_smbus_tp(const struct dmi_system_id *id)
{ {
/* add cyapa touchpad on smbus */ /* add cyapa touchpad on smbus */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment