diff options
author | Benson Leung <bleung@chromium.org> | 2013-02-01 17:34:46 -0500 |
---|---|---|
committer | Matthew Garrett <matthew.garrett@nebula.com> | 2013-02-27 08:30:40 -0500 |
commit | 8016bcbc380f952bfccb82fde3bb8b4b9cbd6400 (patch) | |
tree | 8e6cc8fa38decca7a1f6f706c7a0857961d6ef8e /drivers/platform | |
parent | aabf3f442b0f42b3a37ed7beb8d5f3f249b812ca (diff) |
Platform: x86: chromeos_laptop - Add Taos tsl2583 device
The Samsung Series 5 Chromebook is equipped with a Taos tsl2583
light sensor. Instatiate it here.
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 | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/platform/x86/chromeos_laptop.c b/drivers/platform/x86/chromeos_laptop.c index 188b7dac7780..95bf94fa1998 100644 --- a/drivers/platform/x86/chromeos_laptop.c +++ b/drivers/platform/x86/chromeos_laptop.c | |||
@@ -50,6 +50,10 @@ static struct i2c_board_info __initdata isl_als_device = { | |||
50 | I2C_BOARD_INFO("isl29018", ISL_ALS_I2C_ADDR), | 50 | I2C_BOARD_INFO("isl29018", ISL_ALS_I2C_ADDR), |
51 | }; | 51 | }; |
52 | 52 | ||
53 | static struct i2c_board_info __initdata tsl2583_als_device = { | ||
54 | I2C_BOARD_INFO("tsl2583", TAOS_ALS_I2C_ADDR), | ||
55 | }; | ||
56 | |||
53 | static struct i2c_board_info __initdata tsl2563_als_device = { | 57 | static struct i2c_board_info __initdata tsl2563_als_device = { |
54 | I2C_BOARD_INFO("tsl2563", TAOS_ALS_I2C_ADDR), | 58 | I2C_BOARD_INFO("tsl2563", TAOS_ALS_I2C_ADDR), |
55 | }; | 59 | }; |
@@ -164,6 +168,13 @@ static int __init setup_isl29018_als(const struct dmi_system_id *id) | |||
164 | return 0; | 168 | return 0; |
165 | } | 169 | } |
166 | 170 | ||
171 | static int __init setup_tsl2583_als(const struct dmi_system_id *id) | ||
172 | { | ||
173 | /* add tsl2583 light sensor on smbus */ | ||
174 | als = add_smbus_device(NULL, &tsl2583_als_device); | ||
175 | return 0; | ||
176 | } | ||
177 | |||
167 | static int __init setup_tsl2563_als(const struct dmi_system_id *id) | 178 | static int __init setup_tsl2563_als(const struct dmi_system_id *id) |
168 | { | 179 | { |
169 | /* add tsl2563 light sensor on smbus */ | 180 | /* add tsl2563 light sensor on smbus */ |
@@ -196,6 +207,13 @@ static struct dmi_system_id __initdata chromeos_laptop_dmi_table[] = { | |||
196 | .callback = setup_cyapa_smbus_tp, | 207 | .callback = setup_cyapa_smbus_tp, |
197 | }, | 208 | }, |
198 | { | 209 | { |
210 | .ident = "Samsung Series 5 - Light Sensor", | ||
211 | .matches = { | ||
212 | DMI_MATCH(DMI_PRODUCT_NAME, "Alex"), | ||
213 | }, | ||
214 | .callback = setup_tsl2583_als, | ||
215 | }, | ||
216 | { | ||
199 | .ident = "Cr-48 - Light Sensor", | 217 | .ident = "Cr-48 - Light Sensor", |
200 | .matches = { | 218 | .matches = { |
201 | DMI_MATCH(DMI_PRODUCT_NAME, "Mario"), | 219 | DMI_MATCH(DMI_PRODUCT_NAME, "Mario"), |