Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 360559
b: refs/heads/master
c: aabf3f4
h: refs/heads/master
i:
  360557: 88a5473
  360555: 48ff9a5
  360551: 5df62fc
  360543: 0a102a1
v: v3
  • Loading branch information
Benson Leung authored and Matthew Garrett committed Feb 27, 2013
1 parent c49d379 commit 24f1c79
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 261f171f571a82c1f990d484c374aa3f7236fe5e
refs/heads/master: aabf3f442b0f42b3a37ed7beb8d5f3f249b812ca
26 changes: 26 additions & 0 deletions trunk/drivers/platform/x86/chromeos_laptop.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

#define CYAPA_TP_I2C_ADDR 0x67
#define ISL_ALS_I2C_ADDR 0x44
#define TAOS_ALS_I2C_ADDR 0x29

static struct i2c_client *als;
static struct i2c_client *tp;
Expand All @@ -49,6 +50,10 @@ static struct i2c_board_info __initdata isl_als_device = {
I2C_BOARD_INFO("isl29018", ISL_ALS_I2C_ADDR),
};

static struct i2c_board_info __initdata tsl2563_als_device = {
I2C_BOARD_INFO("tsl2563", TAOS_ALS_I2C_ADDR),
};

static struct i2c_client __init *__add_probed_i2c_device(
const char *name,
int bus,
Expand Down Expand Up @@ -159,6 +164,13 @@ static int __init setup_isl29018_als(const struct dmi_system_id *id)
return 0;
}

static int __init setup_tsl2563_als(const struct dmi_system_id *id)
{
/* add tsl2563 light sensor on smbus */
als = add_smbus_device(NULL, &tsl2563_als_device);
return 0;
}

static struct dmi_system_id __initdata chromeos_laptop_dmi_table[] = {
{
.ident = "Samsung Series 5 550 - Touchpad",
Expand All @@ -183,6 +195,20 @@ static struct dmi_system_id __initdata chromeos_laptop_dmi_table[] = {
},
.callback = setup_cyapa_smbus_tp,
},
{
.ident = "Cr-48 - Light Sensor",
.matches = {
DMI_MATCH(DMI_PRODUCT_NAME, "Mario"),
},
.callback = setup_tsl2563_als,
},
{
.ident = "Acer AC700 - Light Sensor",
.matches = {
DMI_MATCH(DMI_PRODUCT_NAME, "ZGB"),
},
.callback = setup_tsl2563_als,
},
{ }
};
MODULE_DEVICE_TABLE(dmi, chromeos_laptop_dmi_table);
Expand Down

0 comments on commit 24f1c79

Please sign in to comment.