linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Benson Leung <bleung@chromium.org>
To: matthew.garrett@nebula.com, platform-driver-x86@vger.kernel.org,
	linux-kernel@vger.kernel.org
Cc: olofj@chromium.org, miletus@chromium.org,
	Benson Leung <bleung@chromium.org>
Subject: [PATCH 3/6] Platform: x86: chromeos_laptop - Add isl light sensor for Pixel
Date: Thu, 21 Feb 2013 12:14:57 -0800	[thread overview]
Message-ID: <1361477700-26342-4-git-send-email-bleung@chromium.org> (raw)
In-Reply-To: <1361477700-26342-1-git-send-email-bleung@chromium.org>

The Chromebook Pixel uses an isl29023 ambient light sensor on the PANEL
GMBus.

Signed-off-by: Benson Leung <bleung@chromium.org>
---
 drivers/platform/x86/chromeos_laptop.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/drivers/platform/x86/chromeos_laptop.c b/drivers/platform/x86/chromeos_laptop.c
index d585548..3e405d7 100644
--- a/drivers/platform/x86/chromeos_laptop.c
+++ b/drivers/platform/x86/chromeos_laptop.c
@@ -180,6 +180,14 @@ static int __init setup_isl29018_als(const struct dmi_system_id *id)
 	return 0;
 }
 
+static int __init setup_isl29023_als(const struct dmi_system_id *id)
+{
+	/* add isl29023 light sensor on Panel GMBus */
+	als = add_i2c_device("lightsensor", I2C_ADAPTER_PANEL,
+			     &isl_als_device);
+	return 0;
+}
+
 static int __init setup_tsl2583_als(const struct dmi_system_id *id)
 {
 	/* add tsl2583 light sensor on smbus */
@@ -212,6 +220,14 @@ static struct dmi_system_id __initdata chromeos_laptop_dmi_table[] = {
 		.callback = setup_isl29018_als,
 	},
 	{
+		.ident = "Chromebook Pixel - Light Sensor",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "GOOGLE"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "Link"),
+		},
+		.callback = setup_isl29023_als,
+	},
+	{
 		.ident = "Acer C7 Chromebook - Touchpad",
 		.matches = {
 			DMI_MATCH(DMI_PRODUCT_NAME, "Parrot"),
-- 
1.8.1.3


  parent reply	other threads:[~2013-02-21 20:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-21 20:14 [PATCH 0/6] Platform: x86: chromeos_laptop - Add support for Chromebook Pixel Benson Leung
2013-02-21 20:14 ` [PATCH 1/6] Platform: x86: chromeos_laptop - add i915 gmbuses to adapter names Benson Leung
2013-02-21 21:43   ` Matthew Garrett
2013-02-21 20:14 ` [PATCH 2/6] Platform: x86: chromeos_laptop - Add a more general add_i2c_device Benson Leung
2013-02-21 20:14 ` Benson Leung [this message]
2013-02-21 20:14 ` [PATCH 4/6] Platform: x86: chromeos_laptop - Add support for probing devices Benson Leung
2013-02-21 20:14 ` [PATCH 5/6] Platform: x86: chromeos_laptop - Add Pixel Trackpad Benson Leung
2013-02-21 20:15 ` [PATCH 6/6] Platform: x86: chromeos_laptop - Add Pixel Touchscreen 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=1361477700-26342-4-git-send-email-bleung@chromium.org \
    --to=bleung@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthew.garrett@nebula.com \
    --cc=miletus@chromium.org \
    --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;
as well as URLs for NNTP newsgroup(s).