* [PATCH 0/6] Platform: x86: chromeos_laptop - Add support for Chromebook Pixel
@ 2013-02-21 20:14 Benson Leung
2013-02-21 20:14 ` [PATCH 1/6] Platform: x86: chromeos_laptop - add i915 gmbuses to adapter names Benson Leung
` (5 more replies)
0 siblings, 6 replies; 9+ messages in thread
From: Benson Leung @ 2013-02-21 20:14 UTC (permalink / raw)
To: matthew.garrett, platform-driver-x86, linux-kernel; +Cc: olofj, miletus
The following patch series will add support for the isl light sensor,
atmel mxt touchpad, and atmel mxt touchscreen on the Chromebook Pixel.
[PATCH 1/6] Platform: x86: chromeos_laptop - add i915 gmbuses to
[PATCH 2/6] Platform: x86: chromeos_laptop - Add a more general
[PATCH 3/6] Platform: x86: chromeos_laptop - Add isl light sensor for
[PATCH 4/6] Platform: x86: chromeos_laptop - Add support for probing
[PATCH 5/6] Platform: x86: chromeos_laptop - Add Pixel Trackpad
[PATCH 6/6] Platform: x86: chromeos_laptop - Add Pixel Touchscreen
This should be merged after the patch adding the HP Pavilion 14.
Platform: x86: chromeos_laptop - Add HP Pavilion 14
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 1/6] Platform: x86: chromeos_laptop - add i915 gmbuses to adapter names
2013-02-21 20:14 [PATCH 0/6] Platform: x86: chromeos_laptop - Add support for Chromebook Pixel Benson Leung
@ 2013-02-21 20:14 ` 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
` (4 subsequent siblings)
5 siblings, 1 reply; 9+ messages in thread
From: Benson Leung @ 2013-02-21 20:14 UTC (permalink / raw)
To: matthew.garrett, platform-driver-x86, linux-kernel
Cc: olofj, miletus, Benson Leung
Add the two other i2c buses (vga and panel) from i915.
Chromebook Pixel has input and light sensor devices on these busses.
Signed-off-by: Benson Leung <bleung@chromium.org>
---
drivers/platform/x86/chromeos_laptop.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/platform/x86/chromeos_laptop.c b/drivers/platform/x86/chromeos_laptop.c
index bc6599c..d223592 100644
--- a/drivers/platform/x86/chromeos_laptop.c
+++ b/drivers/platform/x86/chromeos_laptop.c
@@ -34,11 +34,15 @@ static struct i2c_client *tp;
const char *i2c_adapter_names[] = {
"SMBus I801 adapter",
+ "i915 gmbus vga",
+ "i915 gmbus panel",
};
/* Keep this enum consistent with i2c_adapter_names */
enum i2c_adapter_type {
I2C_ADAPTER_SMBUS = 0,
+ I2C_ADAPTER_VGADDC,
+ I2C_ADAPTER_PANEL,
};
static struct i2c_board_info __initdata cyapa_device = {
--
1.8.1.3
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/6] Platform: x86: chromeos_laptop - Add a more general add_i2c_device
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 20:14 ` Benson Leung
2013-02-21 20:14 ` [PATCH 3/6] Platform: x86: chromeos_laptop - Add isl light sensor for Pixel Benson Leung
` (3 subsequent siblings)
5 siblings, 0 replies; 9+ messages in thread
From: Benson Leung @ 2013-02-21 20:14 UTC (permalink / raw)
To: matthew.garrett, platform-driver-x86, linux-kernel
Cc: olofj, miletus, Benson Leung
This will allow us to assign devices to buses by the type enum.
Signed-off-by: Benson Leung <bleung@chromium.org>
---
drivers/platform/x86/chromeos_laptop.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/drivers/platform/x86/chromeos_laptop.c b/drivers/platform/x86/chromeos_laptop.c
index d223592..d585548 100644
--- a/drivers/platform/x86/chromeos_laptop.c
+++ b/drivers/platform/x86/chromeos_laptop.c
@@ -148,16 +148,24 @@ static int __init find_i2c_adapter_num(enum i2c_adapter_type type)
* info->addr.
* Returns NULL if no device found.
*/
-static struct i2c_client __init *add_smbus_device(const char *name,
- struct i2c_board_info *info)
+static __init struct i2c_client *add_i2c_device(const char *name,
+ enum i2c_adapter_type type,
+ struct i2c_board_info *info)
{
const unsigned short addr_list[] = { info->addr, I2C_CLIENT_END };
return __add_probed_i2c_device(name,
- find_i2c_adapter_num(I2C_ADAPTER_SMBUS),
+ find_i2c_adapter_num(type),
info,
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)
{
/* add cyapa touchpad on smbus */
--
1.8.1.3
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 3/6] Platform: x86: chromeos_laptop - Add isl light sensor for Pixel
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 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
2013-02-21 20:14 ` [PATCH 4/6] Platform: x86: chromeos_laptop - Add support for probing devices Benson Leung
` (2 subsequent siblings)
5 siblings, 0 replies; 9+ messages in thread
From: Benson Leung @ 2013-02-21 20:14 UTC (permalink / raw)
To: matthew.garrett, platform-driver-x86, linux-kernel
Cc: olofj, miletus, Benson Leung
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
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 4/6] Platform: x86: chromeos_laptop - Add support for probing devices
2013-02-21 20:14 [PATCH 0/6] Platform: x86: chromeos_laptop - Add support for Chromebook Pixel Benson Leung
` (2 preceding siblings ...)
2013-02-21 20:14 ` [PATCH 3/6] Platform: x86: chromeos_laptop - Add isl light sensor for Pixel Benson Leung
@ 2013-02-21 20:14 ` 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
5 siblings, 0 replies; 9+ messages in thread
From: Benson Leung @ 2013-02-21 20:14 UTC (permalink / raw)
To: matthew.garrett, platform-driver-x86, linux-kernel
Cc: olofj, miletus, Benson Leung
This will allow support for devices that may appear at more than
one i2c address at boot time. The specific example is the atmel_mxt touch
devices, which may appear at a different address if it comes up
in bootloader mode.
Signed-off-by: Benson Leung <bleung@chromium.org>
---
drivers/platform/x86/chromeos_laptop.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/drivers/platform/x86/chromeos_laptop.c b/drivers/platform/x86/chromeos_laptop.c
index 3e405d7..f3a292b 100644
--- a/drivers/platform/x86/chromeos_laptop.c
+++ b/drivers/platform/x86/chromeos_laptop.c
@@ -144,6 +144,26 @@ static int __init find_i2c_adapter_num(enum i2c_adapter_type type)
}
/*
+ * Takes a list of addresses in addrs as such :
+ * { addr1, ... , addrn, I2C_CLIENT_END };
+ * add_probed_i2c_device will use i2c_new_probed_device
+ * and probe for devices at all of the addresses listed.
+ * Returns NULL if no devices found.
+ * See Documentation/i2c/instantiating-devices for more information.
+ */
+static __init struct i2c_client *add_probed_i2c_device(
+ const char *name,
+ enum i2c_adapter_type type,
+ struct i2c_board_info *info,
+ const unsigned short *addrs)
+{
+ return __add_probed_i2c_device(name,
+ find_i2c_adapter_num(type),
+ info,
+ addrs);
+}
+
+/*
* Probes for a device at a single address, the one provided by
* info->addr.
* Returns NULL if no device found.
--
1.8.1.3
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 5/6] Platform: x86: chromeos_laptop - Add Pixel Trackpad
2013-02-21 20:14 [PATCH 0/6] Platform: x86: chromeos_laptop - Add support for Chromebook Pixel Benson Leung
` (3 preceding siblings ...)
2013-02-21 20:14 ` [PATCH 4/6] Platform: x86: chromeos_laptop - Add support for probing devices Benson Leung
@ 2013-02-21 20:14 ` Benson Leung
2013-02-21 20:15 ` [PATCH 6/6] Platform: x86: chromeos_laptop - Add Pixel Touchscreen Benson Leung
5 siblings, 0 replies; 9+ messages in thread
From: Benson Leung @ 2013-02-21 20:14 UTC (permalink / raw)
To: matthew.garrett, platform-driver-x86, linux-kernel
Cc: olofj, miletus, Benson Leung
Instantiate the atmel mxt224s trackpad on this system.
The trackpad may appear at two possible addresses:
0x4b in operational mode.
0x25 in bootloader mode.
Signed-off-by: Benson Leung <bleung@chromium.org>
---
drivers/platform/x86/chromeos_laptop.c | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/drivers/platform/x86/chromeos_laptop.c b/drivers/platform/x86/chromeos_laptop.c
index f3a292b..febedc0 100644
--- a/drivers/platform/x86/chromeos_laptop.c
+++ b/drivers/platform/x86/chromeos_laptop.c
@@ -25,6 +25,8 @@
#include <linux/i2c.h>
#include <linux/module.h>
+#define ATMEL_TP_I2C_ADDR 0x4b
+#define ATMEL_TP_I2C_BL_ADDR 0x25
#define CYAPA_TP_I2C_ADDR 0x67
#define ISL_ALS_I2C_ADDR 0x44
#define TAOS_ALS_I2C_ADDR 0x29
@@ -62,6 +64,12 @@ static struct i2c_board_info __initdata tsl2563_als_device = {
I2C_BOARD_INFO("tsl2563", TAOS_ALS_I2C_ADDR),
};
+static struct i2c_board_info __initdata atmel_224s_tp_device = {
+ I2C_BOARD_INFO("atmel_mxt_tp", ATMEL_TP_I2C_ADDR),
+ .platform_data = NULL,
+ .flags = I2C_CLIENT_WAKE,
+};
+
static struct i2c_client __init *__add_probed_i2c_device(
const char *name,
int bus,
@@ -193,6 +201,19 @@ static int __init setup_cyapa_smbus_tp(const struct dmi_system_id *id)
return 0;
}
+static int __init setup_atmel_224s_tp(const struct dmi_system_id *id)
+{
+ const unsigned short addr_list[] = { ATMEL_TP_I2C_BL_ADDR,
+ ATMEL_TP_I2C_ADDR,
+ I2C_CLIENT_END };
+
+ /* add atmel mxt touchpad on VGA DDC GMBus */
+ tp = add_probed_i2c_device("trackpad", I2C_ADAPTER_VGADDC,
+ &atmel_224s_tp_device, addr_list);
+ return 0;
+}
+
+
static int __init setup_isl29018_als(const struct dmi_system_id *id)
{
/* add isl29018 light sensor */
@@ -232,6 +253,14 @@ static struct dmi_system_id __initdata chromeos_laptop_dmi_table[] = {
.callback = setup_cyapa_smbus_tp,
},
{
+ .ident = "Chromebook Pixel - Touchpad",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "GOOGLE"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Link"),
+ },
+ .callback = setup_atmel_224s_tp,
+ },
+ {
.ident = "Samsung Series 5 550 - Light Sensor",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG"),
--
1.8.1.3
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 6/6] Platform: x86: chromeos_laptop - Add Pixel Touchscreen
2013-02-21 20:14 [PATCH 0/6] Platform: x86: chromeos_laptop - Add support for Chromebook Pixel Benson Leung
` (4 preceding siblings ...)
2013-02-21 20:14 ` [PATCH 5/6] Platform: x86: chromeos_laptop - Add Pixel Trackpad Benson Leung
@ 2013-02-21 20:15 ` Benson Leung
5 siblings, 0 replies; 9+ messages in thread
From: Benson Leung @ 2013-02-21 20:15 UTC (permalink / raw)
To: matthew.garrett, platform-driver-x86, linux-kernel
Cc: olofj, miletus, Benson Leung
From: Yufeng Shen <miletus@chromium.org>
Instantiate the atmel mxt1664s touchscreen on this system.
The touchscreen may appear at two possible addresses:
0x4a in operational mode.
0x26 in bootloader mode.
Signed-off-by: Yufeng Shen <miletus@chromium.org>
Signed-off-by: Benson Leung <bleung@chromium.org>
---
drivers/platform/x86/chromeos_laptop.c | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/drivers/platform/x86/chromeos_laptop.c b/drivers/platform/x86/chromeos_laptop.c
index febedc0..93d6680 100644
--- a/drivers/platform/x86/chromeos_laptop.c
+++ b/drivers/platform/x86/chromeos_laptop.c
@@ -27,12 +27,15 @@
#define ATMEL_TP_I2C_ADDR 0x4b
#define ATMEL_TP_I2C_BL_ADDR 0x25
+#define ATMEL_TS_I2C_ADDR 0x4a
+#define ATMEL_TS_I2C_BL_ADDR 0x26
#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;
+static struct i2c_client *ts;
const char *i2c_adapter_names[] = {
"SMBus I801 adapter",
@@ -70,6 +73,12 @@ static struct i2c_board_info __initdata atmel_224s_tp_device = {
.flags = I2C_CLIENT_WAKE,
};
+static struct i2c_board_info __initdata atmel_1664s_device = {
+ I2C_BOARD_INFO("atmel_mxt_ts", ATMEL_TS_I2C_ADDR),
+ .platform_data = NULL,
+ .flags = I2C_CLIENT_WAKE,
+};
+
static struct i2c_client __init *__add_probed_i2c_device(
const char *name,
int bus,
@@ -213,6 +222,18 @@ static int __init setup_atmel_224s_tp(const struct dmi_system_id *id)
return 0;
}
+static int __init setup_atmel_1664s_ts(const struct dmi_system_id *id)
+{
+ const unsigned short addr_list[] = { ATMEL_TS_I2C_BL_ADDR,
+ ATMEL_TS_I2C_ADDR,
+ I2C_CLIENT_END };
+
+ /* add atmel mxt touch device on PANEL GMBus */
+ ts = add_probed_i2c_device("touchscreen", I2C_ADAPTER_PANEL,
+ &atmel_1664s_device, addr_list);
+ return 0;
+}
+
static int __init setup_isl29018_als(const struct dmi_system_id *id)
{
@@ -253,6 +274,14 @@ static struct dmi_system_id __initdata chromeos_laptop_dmi_table[] = {
.callback = setup_cyapa_smbus_tp,
},
{
+ .ident = "Chromebook Pixel - Touchscreen",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "GOOGLE"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Link"),
+ },
+ .callback = setup_atmel_1664s_ts,
+ },
+ {
.ident = "Chromebook Pixel - Touchpad",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "GOOGLE"),
@@ -330,6 +359,8 @@ static void __exit chromeos_laptop_exit(void)
i2c_unregister_device(als);
if (tp)
i2c_unregister_device(tp);
+ if (ts)
+ i2c_unregister_device(ts);
}
module_init(chromeos_laptop_init);
--
1.8.1.3
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 1/6] Platform: x86: chromeos_laptop - add i915 gmbuses to adapter names
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
0 siblings, 0 replies; 9+ messages in thread
From: Matthew Garrett @ 2013-02-21 21:43 UTC (permalink / raw)
To: Benson Leung
Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org,
olofj@chromium.org, miletus@chromium.org
On Thu, 2013-02-21 at 12:14 -0800, Benson Leung wrote:
> Add the two other i2c buses (vga and panel) from i915.
> Chromebook Pixel has input and light sensor devices on these busses.
This is after you put the HDMI encoder on the system i2c bus on the
CR-48? Whatever they're putting in the food there must be good. I'll
queue these.
--
Matthew Garrett | mjg59@srcf.ucam.org
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/6] Platform: x86: chromeos_laptop - add i915 gmbuses to adapter names
@ 2013-02-21 21:43 ` Matthew Garrett
0 siblings, 0 replies; 9+ messages in thread
From: Matthew Garrett @ 2013-02-21 21:43 UTC (permalink / raw)
To: Benson Leung
Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org,
olofj@chromium.org, miletus@chromium.org
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 537 bytes --]
On Thu, 2013-02-21 at 12:14 -0800, Benson Leung wrote:
> Add the two other i2c buses (vga and panel) from i915.
> Chromebook Pixel has input and light sensor devices on these busses.
This is after you put the HDMI encoder on the system i2c bus on the
CR-48? Whatever they're putting in the food there must be good. I'll
queue these.
--
Matthew Garrett | mjg59@srcf.ucam.org
ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2013-02-21 21:43 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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 ` [PATCH 3/6] Platform: x86: chromeos_laptop - Add isl light sensor for Pixel Benson Leung
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
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.