From: Benson Leung <bleung@chromium.org>
To: matthew.garrett@nebula.com, platform-driver-x86@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: bleung@chromium.org, olofj@chromium.org, olof@lixom.net
Subject: [PATCH 4/4] Platform: x86: chromeos_laptop - Add Taos tsl2583 device
Date: Fri, 1 Feb 2013 14:34:46 -0800 [thread overview]
Message-ID: <1359758086-2320-5-git-send-email-bleung@chromium.org> (raw)
In-Reply-To: <1359758086-2320-1-git-send-email-bleung@chromium.org>
The Samsung Series 5 Chromebook is equipped with a Taos tsl2583
light sensor. Instatiate it here.
Signed-off-by: Benson Leung <bleung@chromium.org>
---
drivers/platform/x86/chromeos_laptop.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/drivers/platform/x86/chromeos_laptop.c b/drivers/platform/x86/chromeos_laptop.c
index 188b7da..95bf94f 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 = {
I2C_BOARD_INFO("isl29018", ISL_ALS_I2C_ADDR),
};
+static struct i2c_board_info __initdata tsl2583_als_device = {
+ I2C_BOARD_INFO("tsl2583", TAOS_ALS_I2C_ADDR),
+};
+
static struct i2c_board_info __initdata tsl2563_als_device = {
I2C_BOARD_INFO("tsl2563", TAOS_ALS_I2C_ADDR),
};
@@ -164,6 +168,13 @@ static int __init setup_isl29018_als(const struct dmi_system_id *id)
return 0;
}
+static int __init setup_tsl2583_als(const struct dmi_system_id *id)
+{
+ /* add tsl2583 light sensor on smbus */
+ als = add_smbus_device(NULL, &tsl2583_als_device);
+ return 0;
+}
+
static int __init setup_tsl2563_als(const struct dmi_system_id *id)
{
/* add tsl2563 light sensor on smbus */
@@ -196,6 +207,13 @@ static struct dmi_system_id __initdata chromeos_laptop_dmi_table[] = {
.callback = setup_cyapa_smbus_tp,
},
{
+ .ident = "Samsung Series 5 - Light Sensor",
+ .matches = {
+ DMI_MATCH(DMI_PRODUCT_NAME, "Alex"),
+ },
+ .callback = setup_tsl2583_als,
+ },
+ {
.ident = "Cr-48 - Light Sensor",
.matches = {
DMI_MATCH(DMI_PRODUCT_NAME, "Mario"),
--
1.8.1
next prev parent reply other threads:[~2013-02-01 22:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-01 22:34 [PATCH 0/4] Platform: x86: chromeos_laptop - Add more x86 Chromebooks Benson Leung
2013-02-01 22:34 ` [PATCH 1/4] Platform: x86: chromeos_laptop - Rename setup_lumpy_tp to setup_cyapa_smbus_tp Benson Leung
2013-02-01 22:34 ` [PATCH 2/4] Platform: x86: chromeos_laptop - Add Acer C7 trackpad Benson Leung
2013-02-01 22:34 ` [PATCH 3/4] Platform: x86: chromeos_laptop - Add Taos tsl2563 device Benson Leung
2013-02-01 22:34 ` Benson Leung [this message]
2013-02-11 0:20 ` [PATCH 0/1] Platform: x86: chromeos_laptop - Add HP Pavilion 14 Benson Leung
2013-02-11 0:20 ` [PATCH 1/1] " Benson Leung
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1359758086-2320-5-git-send-email-bleung@chromium.org \
--to=bleung@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matthew.garrett@nebula.com \
--cc=olof@lixom.net \
--cc=olofj@chromium.org \
--cc=platform-driver-x86@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®