Skip to contentSkip to conversation

platform/chrome: chromeos_laptop - Add Haswell Chromebooks

PATCH Superseded Benson Leung 5 participants 20 messages Jun 3, 2014 – Aug 1, 2014 Chrome hardware platform support

lore
Share & tools
lore

Benson Leung

author maintainer
#0 lore raw

cover platform/chrome: chromeos_laptop - Add Haswell Chromebooks

This patch series should be applied after Mika Westerberg's patch here:
https://patchwork.kernel.org/patch/4288591/

It will add support for the cypress touchpads on the HP Chromebook 14, Dell Chromebook 11, and Toshiba CB35.

[PATCH 1/3] platform/chrome: chromeos_laptop - Add HP Chromebook 14 [PATCH 2/3] platform/chrome: chromeos_laptop - Add Dell Chromebook 11 Touch [PATCH 3/3] platform/chrome: chromeos_laptop - Add Toshiba CB35 Touch

author maintainer
#1 lore raw

PATCH 1/3 platform/chrome: chromeos_laptop - Add HP Chromebook 14

Add support for the trackpad on HP Chromebook 14.

---
 drivers/platform/chrome/chromeos_laptop.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
drivers/platform/chrome/chromeos_laptop.c +15 -0
index 44806c5..3e113ce 100644
@@ -391,6 +391,13 @@ static struct chromeos_laptop chromebook_pixel = {
 	},
 };
 
+static struct chromeos_laptop hp_chromebook_14 = {
+	.i2c_peripherals = {
+		/* Touchpad. */
+		{ .add = setup_cyapa_tp, I2C_ADAPTER_DESIGNWARE_0 },
+	},
+};
+
 static struct chromeos_laptop acer_c7_chromebook = {
 	.i2c_peripherals = {
 		/* Touchpad. */
@@ -457,6 +464,14 @@ static struct dmi_system_id chromeos_laptop_dmi_table[] __initdata = {
 		_CBDD(chromebook_pixel),
 	},
 	{
+		.ident = "HP Chromebook 14",
+		.matches = {
+			DMI_MATCH(DMI_BIOS_VENDOR, "coreboot"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "Falco"),
+		},
+		_CBDD(hp_chromebook_14),
+	},
+	{
 		.ident = "Acer C7 Chromebook",
 		.matches = {
 			DMI_MATCH(DMI_PRODUCT_NAME, "Parrot"),
Signature · 1 line
1.9.1.423.g4596e3a
author maintainer
#2 lore raw

PATCH 2/3 platform/chrome: chromeos_laptop - Add Dell Chromebook 11 touch

In reply to Benson Leung

From: Mohammed Habibulla <[email protected]>

Add support for Dell Chromebook 11's touch device, which is the same as falco/peppy on the same bus using the LynxPoint-LP I2C via the i2c-designware-pci driver.

Based on these patches from the chromeos-3.8 kernel:
https://chromium-review.googlesource.com/#/c/65320/
https://chromium-review.googlesource.com/#/c/174664/

---
 drivers/platform/chrome/chromeos_laptop.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
drivers/platform/chrome/chromeos_laptop.c +14 -0
index 3e113ce..c4d89ae 100644
@@ -398,6 +398,13 @@ static struct chromeos_laptop hp_chromebook_14 = {
 	},
 };
 
+static struct chromeos_laptop dell_chromebook_11 = {
+	.i2c_peripherals = {
+		/* Touchpad. */
+		{ .add = setup_cyapa_tp, I2C_ADAPTER_DESIGNWARE_0 },
+	},
+};
+
 static struct chromeos_laptop acer_c7_chromebook = {
 	.i2c_peripherals = {
 		/* Touchpad. */
@@ -463,6 +470,13 @@ static struct dmi_system_id chromeos_laptop_dmi_table[] __initdata = {
 		},
 		_CBDD(chromebook_pixel),
 	},
+		.ident = "Wolf",
+		.matches = {
+			DMI_MATCH(DMI_BIOS_VENDOR, "coreboot"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "Wolf"),
+		},
+		_CBDD(dell_chromebook_11),
+	},
 	{
 		.ident = "HP Chromebook 14",
 		.matches = {
Signature · 1 line
1.9.1.423.g4596e3a
author maintainer
#3 lore raw

PATCH 3/3 platform/chrome: chromeos_laptop - Add Toshiba CB35 Touch

In reply to Benson Leung

From: Gene Chen <[email protected]>

Add support for Leon touch devices, which is the same as falco/peppy/wolf on the same buses using the LynxPoint-LP I2C via the i2c-designware-pci driver.

Based on these patches from the chromeos-3.8 kernel:
https://chromium-review.googlesource.com/168351
https://chromium-review.googlesource.com/173445

---
 drivers/platform/chrome/chromeos_laptop.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
drivers/platform/chrome/chromeos_laptop.c +15 -0
index c4d89ae..0f06ab5 100644
@@ -405,6 +405,13 @@ static struct chromeos_laptop dell_chromebook_11 = {
 	},
 };
 
+static struct chromeos_laptop toshiba_cb35 = {
+	.i2c_peripherals = {
+		/* Touchpad. */
+		{ .add = setup_cyapa_tp, I2C_ADAPTER_DESIGNWARE_0 },
+	},
+};
+
 static struct chromeos_laptop acer_c7_chromebook = {
 	.i2c_peripherals = {
 		/* Touchpad. */
@@ -486,6 +493,14 @@ static struct dmi_system_id chromeos_laptop_dmi_table[] __initdata = {
 		_CBDD(hp_chromebook_14),
 	},
 	{
+		.ident = "Toshiba CB35",
+		.matches = {
+			DMI_MATCH(DMI_BIOS_VENDOR, "coreboot"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "Leon"),
+		},
+		_CBDD(toshiba_cb35),
+	},
+	{
 		.ident = "Acer C7 Chromebook",
 		.matches = {
 			DMI_MATCH(DMI_PRODUCT_NAME, "Parrot"),
Signature · 1 line
1.9.1.423.g4596e3a
#4 lore raw
In reply to Benson Leung

Hi,

Quoted 9 lines · Benson Leung

This patch series should be applied after Mika Westerberg's patch here:
https://patchwork.kernel.org/patch/4288591/

It will add support for the cypress touchpads on the HP Chromebook 14, Dell Chromebook 11, and Toshiba CB35.

[PATCH 1/3] platform/chrome: chromeos_laptop - Add HP Chromebook 14 [PATCH 2/3] platform/chrome: chromeos_laptop - Add Dell Chromebook 11 Touch [PATCH 3/3] platform/chrome: chromeos_laptop - Add Toshiba CB35 Touch

The 3.16 merge window is open, please resend after -rc1 and I'll queue it up.

-Olof

author maintainer
#5 lore raw

Looks like -rc1 is here, so I'll respin these and send them out again.

Quoted 17 lines · Olof Johansson

Hi,

Quoted 9 lines · Benson Leung

This patch series should be applied after Mika Westerberg's patch here:
https://patchwork.kernel.org/patch/4288591/

It will add support for the cypress touchpads on the HP Chromebook 14, Dell Chromebook 11, and Toshiba CB35.

[PATCH 1/3] platform/chrome: chromeos_laptop - Add HP Chromebook 14 [PATCH 2/3] platform/chrome: chromeos_laptop - Add Dell Chromebook 11 Touch [PATCH 3/3] platform/chrome: chromeos_laptop - Add Toshiba CB35 Touch

The 3.16 merge window is open, please resend after -rc1 and I'll queue it up.

-Olof

Signature · 3 lines
Benson Leung
Software Engineer, Chrom* OS
[email protected]
#6 lore raw

Hi Olof, did you apply these patches? I haven't seen them in 3.16-rc3, linux-next, kernel/git/olof/chrome-platform, kernel/git/olof/misc, or kernel/git/arm/arm-soc.

Thanks,
Scot

Quoted 20 lines · Benson Leung

Looks like -rc1 is here, so I'll respin these and send them out again.

Quoted 17 lines · Olof Johansson

Hi,

Quoted 9 lines · Benson Leung

This patch series should be applied after Mika Westerberg's patch here:
https://patchwork.kernel.org/patch/4288591/

It will add support for the cypress touchpads on the HP Chromebook 14, Dell Chromebook 11, and Toshiba CB35.

[PATCH 1/3] platform/chrome: chromeos_laptop - Add HP Chromebook 14 [PATCH 2/3] platform/chrome: chromeos_laptop - Add Dell Chromebook 11 Touch [PATCH 3/3] platform/chrome: chromeos_laptop - Add Toshiba CB35 Touch

The 3.16 merge window is open, please resend after -rc1 and I'll queue it up.

-Olof

#7 lore raw

No, not yet. I'll do a pass of merges of this (and arm-soc) on Wednesday.

-Olof

Quoted 35 lines · Scot Doyle

Hi Olof, did you apply these patches? I haven't seen them in 3.16-rc3, linux-next, kernel/git/olof/chrome-platform, kernel/git/olof/misc, or kernel/git/arm/arm-soc.

Thanks,
Scot

Quoted 26 lines · Benson Leung

Looks like -rc1 is here, so I'll respin these and send them out again.

Quoted 22 lines · Olof Johansson

Hi,

Quoted 11 lines · Benson Leung

This patch series should be applied after Mika Westerberg's patch here:
https://patchwork.kernel.org/patch/4288591/

It will add support for the cypress touchpads on the HP Chromebook 14, Dell Chromebook 11, and Toshiba CB35.

[PATCH 1/3] platform/chrome: chromeos_laptop - Add HP Chromebook 14 [PATCH 2/3] platform/chrome: chromeos_laptop - Add Dell Chromebook 11 Touch
[PATCH 3/3] platform/chrome: chromeos_laptop - Add Toshiba CB35 Touch

The 3.16 merge window is open, please resend after -rc1 and I'll queue it up.

-Olof

#8 lore raw

Hi Olof,

Have these been applied? If not, where should I watch for them?

Thank you,
Scot

Quoted 41 lines · Olof Johansson

No, not yet. I'll do a pass of merges of this (and arm-soc) on Wednesday.

-Olof

Quoted 35 lines · Scot Doyle

Hi Olof, did you apply these patches? I haven't seen them in 3.16-rc3, linux-next, kernel/git/olof/chrome-platform, kernel/git/olof/misc, or kernel/git/arm/arm-soc.

Thanks,
Scot

Quoted 26 lines · Benson Leung

Looks like -rc1 is here, so I'll respin these and send them out again.

Quoted 22 lines · Olof Johansson

Hi,

Quoted 11 lines · Benson Leung

This patch series should be applied after Mika Westerberg's patch here:
https://patchwork.kernel.org/patch/4288591/

It will add support for the cypress touchpads on the HP Chromebook 14, Dell Chromebook 11, and Toshiba CB35.

[PATCH 1/3] platform/chrome: chromeos_laptop - Add HP Chromebook 14 [PATCH 2/3] platform/chrome: chromeos_laptop - Add Dell Chromebook 11 Touch
[PATCH 3/3] platform/chrome: chromeos_laptop - Add Toshiba CB35 Touch

The 3.16 merge window is open, please resend after -rc1 and I'll queue it up.

-Olof

#9 lore raw
Quoted 3 lines · Scot Doyle

Hi Olof,

Have these been applied? If not, where should I watch for them?

Hi,

could you tell me from which tree I could get these patches?

Regards
Oliver

author maintainer
#11 lore raw

v2 cover platform/chrome: chromeos_laptop - Add Haswell Chromebooks

In reply to Benson Leung

This patch series will add support for the cypress touchpads on the HP Chromebook 14, Dell Chromebook 11, and Toshiba CB35.

Based on the work here by Mika Westerberg, which this series incorporates :
https://patchwork.kernel.org/patch/4288591/

[PATCHv2 1/4] platform/chrome: chromeos_laptop - Add support for Acer C720 [PATCHv2 2/4] platform/chrome: chromeos_laptop - Add HP Chromebook 14 [PATCHv2 3/4] platform/chrome: chromeos_laptop - Add Dell Chromebook 11 Touch [PATCHv2 4/4] platform/chrome: chromeos_laptop - Add Toshiba CB35 Touch

author maintainer
#12 lore raw

PATCH v2 1/4 platform/chrome: chromeos_laptop - Add support for Acer C720

From: Mika Westerberg <[email protected]>

Acer C720 has touchpad and light sensor connected to a separate I2C buses. Since the designware I2C host controller driver has two instances on this particular machine we need a way to match the correct instance. Add support for this and then register both C720 touchpad and light sensor.

This code is based on following patch from Benson Leung:

https://patchwork.kernel.org/patch/3074411/

---
 drivers/platform/chrome/chromeos_laptop.c | 45 ++++++++++++++++++++++++++-----
 1 file changed, 39 insertions(+), 6 deletions(-)
drivers/platform/chrome/chromeos_laptop.c +39 -6
index 7f1a2e2..a241e5f 100644
@@ -45,6 +45,8 @@ static const char *i2c_adapter_names[] = {
 	"SMBus I801 adapter",
 	"i915 gmbus vga",
 	"i915 gmbus panel",
+	"i2c-designware-pci",
+	"i2c-designware-pci",
 };
 
 /* Keep this enum consistent with i2c_adapter_names */
@@ -52,6 +54,8 @@ enum i2c_adapter_type {
 	I2C_ADAPTER_SMBUS = 0,
 	I2C_ADAPTER_VGADDC,
 	I2C_ADAPTER_PANEL,
+	I2C_ADAPTER_DESIGNWARE_0,
+	I2C_ADAPTER_DESIGNWARE_1,
 };
 
 struct i2c_peripheral {
@@ -172,29 +176,42 @@ static struct i2c_client *__add_probed_i2c_device(
 	return client;
 }
 
+struct i2c_lookup {
+	const char *name;
+	int instance;
+	int n;
+};
+
 static int __find_i2c_adap(struct device *dev, void *data)
 {
-	const char *name = data;
+	struct i2c_lookup *lookup = data;
 	static const char *prefix = "i2c-";
 	struct i2c_adapter *adapter;
 	if (strncmp(dev_name(dev), prefix, strlen(prefix)) != 0)
 		return 0;
 	adapter = to_i2c_adapter(dev);
-	return (strncmp(adapter->name, name, strlen(name)) == 0);
+	if (strncmp(adapter->name, lookup->name, strlen(lookup->name)) == 0 &&
+	    lookup->n++ == lookup->instance)
+		return 1;
+	return 0;
 }
 
 static int find_i2c_adapter_num(enum i2c_adapter_type type)
 {
 	struct device *dev = NULL;
 	struct i2c_adapter *adapter;
-	const char *name = i2c_adapter_names[type];
+	struct i2c_lookup lookup;
+
+	memset(&lookup, 0, sizeof(lookup));
+	lookup.name = i2c_adapter_names[type];
+	lookup.instance = (type == I2C_ADAPTER_DESIGNWARE_1) ? 1 : 0;
+
 	/* find the adapter by name */
-	dev = bus_find_device(&i2c_bus_type, NULL, (void *)name,
-			      __find_i2c_adap);
+	dev = bus_find_device(&i2c_bus_type, NULL, &lookup, __find_i2c_adap);
 	if (!dev) {
 		/* Adapters may appear later. Deferred probing will retry */
 		pr_notice("%s: i2c adapter %s not found on system.\n", __func__,
-			  name);
+			  lookup.name);
 		return -ENODEV;
 	}
 	adapter = to_i2c_adapter(dev);
@@ -377,6 +394,15 @@ static struct chromeos_laptop acer_ac700 = {
 	},
 };
 
+static struct chromeos_laptop acer_c720 = {
+	.i2c_peripherals = {
+		/* Touchpad. */
+		{ .add = setup_cyapa_tp, I2C_ADAPTER_DESIGNWARE_0 },
+		/* Light Sensor. */
+		{ .add = setup_isl29018_als, I2C_ADAPTER_DESIGNWARE_1 },
+	},
+};
+
 static struct chromeos_laptop hp_pavilion_14_chromebook = {
 	.i2c_peripherals = {
 		/* Touchpad. */
@@ -434,6 +460,13 @@ static struct dmi_system_id chromeos_laptop_dmi_table[] __initdata = {
 		_CBDD(acer_ac700),
 	},
 	{
+		.ident = "Acer C720",
+		.matches = {
+			DMI_MATCH(DMI_PRODUCT_NAME, "Peppy"),
+		},
+		_CBDD(acer_c720),
+	},
+	{
 		.ident = "HP Pavilion 14 Chromebook",
 		.matches = {
 			DMI_MATCH(DMI_PRODUCT_NAME, "Butterfly"),
Signature · 1 line
2.0.0.526.g5318336
author maintainer
#13 lore raw

PATCH v2 2/4 platform/chrome: chromeos_laptop - Add HP Chromebook 14

In reply to Benson Leung

Add support for the trackpad on HP Chromebook 14.

---
 drivers/platform/chrome/chromeos_laptop.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
drivers/platform/chrome/chromeos_laptop.c +15 -0
index a241e5f..02e014b 100644
@@ -380,6 +380,13 @@ static struct chromeos_laptop chromebook_pixel = {
 	},
 };
 
+static struct chromeos_laptop hp_chromebook_14 = {
+	.i2c_peripherals = {
+		/* Touchpad. */
+		{ .add = setup_cyapa_tp, I2C_ADAPTER_DESIGNWARE_0 },
+	},
+};
+
 static struct chromeos_laptop acer_c7_chromebook = {
 	.i2c_peripherals = {
 		/* Touchpad. */
@@ -446,6 +453,14 @@ static struct dmi_system_id chromeos_laptop_dmi_table[] __initdata = {
 		_CBDD(chromebook_pixel),
 	},
 	{
+		.ident = "HP Chromebook 14",
+		.matches = {
+			DMI_MATCH(DMI_BIOS_VENDOR, "coreboot"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "Falco"),
+		},
+		_CBDD(hp_chromebook_14),
+	},
+	{
 		.ident = "Acer C7 Chromebook",
 		.matches = {
 			DMI_MATCH(DMI_PRODUCT_NAME, "Parrot"),
Signature · 1 line
2.0.0.526.g5318336
author maintainer
#15 lore raw

PATCH v2 3/4 platform/chrome: chromeos_laptop - Add Dell Chromebook 11 touch

In reply to Benson Leung

From: Mohammed Habibulla <[email protected]>

Add support for Dell Chromebook 11's touch device, which is the same as falco/peppy on the same bus using the LynxPoint-LP I2C via the i2c-designware-pci driver.

Based on these patches from the chromeos-3.8 kernel:
https://chromium-review.googlesource.com/#/c/65320/
https://chromium-review.googlesource.com/#/c/174664/

---
 drivers/platform/chrome/chromeos_laptop.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
drivers/platform/chrome/chromeos_laptop.c +15 -0
index 02e014b..e0a6710 100644
@@ -387,6 +387,13 @@ static struct chromeos_laptop hp_chromebook_14 = {
 	},
 };
 
+static struct chromeos_laptop dell_chromebook_11 = {
+	.i2c_peripherals = {
+		/* Touchpad. */
+		{ .add = setup_cyapa_tp, I2C_ADAPTER_DESIGNWARE_0 },
+	},
+};
+
 static struct chromeos_laptop acer_c7_chromebook = {
 	.i2c_peripherals = {
 		/* Touchpad. */
@@ -453,6 +460,14 @@ static struct dmi_system_id chromeos_laptop_dmi_table[] __initdata = {
 		_CBDD(chromebook_pixel),
 	},
 	{
+		.ident = "Wolf",
+		.matches = {
+			DMI_MATCH(DMI_BIOS_VENDOR, "coreboot"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "Wolf"),
+		},
+		_CBDD(dell_chromebook_11),
+	},
+	{
 		.ident = "HP Chromebook 14",
 		.matches = {
 			DMI_MATCH(DMI_BIOS_VENDOR, "coreboot"),
Signature · 1 line
2.0.0.526.g5318336
Reviewed-by on v2 3/4
#16 lore raw

Re: [PATCHv2 3/4] platform/chrome: chromeos_laptop - Add Dell Chromebook 11 touch

Quoted 6 lines · Benson Leung

From: Mohammed Habibulla <[email protected]>

Add support for Dell Chromebook 11's touch device, which is the same as falco/peppy on the same bus using the LynxPoint-LP I2C via the i2c-designware-pci driver.

Quoted 6 lines

Based on these patches from the chromeos-3.8 kernel:
https://chromium-review.googlesource.com/#/c/65320/
https://chromium-review.googlesource.com/#/c/174664/

author maintainer
#17 lore raw

PATCH v2 4/4 platform/chrome: chromeos_laptop - Add Toshiba CB35 Touch

In reply to Benson Leung

From: Gene Chen <[email protected]>

Add support for Leon touch devices, which is the same as falco/peppy/wolf on the same buses using the LynxPoint-LP I2C via the i2c-designware-pci driver.

Based on these patches from the chromeos-3.8 kernel:
https://chromium-review.googlesource.com/168351
https://chromium-review.googlesource.com/173445

---
 drivers/platform/chrome/chromeos_laptop.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
drivers/platform/chrome/chromeos_laptop.c +15 -0
index e0a6710..37fa570 100644
@@ -394,6 +394,13 @@ static struct chromeos_laptop dell_chromebook_11 = {
 	},
 };
 
+static struct chromeos_laptop toshiba_cb35 = {
+	.i2c_peripherals = {
+		/* Touchpad. */
+		{ .add = setup_cyapa_tp, I2C_ADAPTER_DESIGNWARE_0 },
+	},
+};
+
 static struct chromeos_laptop acer_c7_chromebook = {
 	.i2c_peripherals = {
 		/* Touchpad. */
@@ -476,6 +483,14 @@ static struct dmi_system_id chromeos_laptop_dmi_table[] __initdata = {
 		_CBDD(hp_chromebook_14),
 	},
 	{
+		.ident = "Toshiba CB35",
+		.matches = {
+			DMI_MATCH(DMI_BIOS_VENDOR, "coreboot"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "Leon"),
+		},
+		_CBDD(toshiba_cb35),
+	},
+	{
 		.ident = "Acer C7 Chromebook",
 		.matches = {
 			DMI_MATCH(DMI_PRODUCT_NAME, "Parrot"),
Signature · 1 line
2.0.0.526.g5318336
Reviewed-by on v2 4/4
#18 lore raw

Re: [PATCHv2 4/4] platform/chrome: chromeos_laptop - Add Toshiba CB35 Touch

Quoted 6 lines · Benson Leung

From: Gene Chen <[email protected]>

Add support for Leon touch devices, which is the same as falco/peppy/wolf on the same buses using the LynxPoint-LP I2C via the i2c-designware-pci driver.

Quoted 7 lines

Based on these patches from the chromeos-3.8 kernel:
https://chromium-review.googlesource.com/168351
https://chromium-review.googlesource.com/173445

#19 lore raw
In reply to Benson Leung
Quoted 10 lines · Benson Leung

This patch series will add support for the cypress touchpads on the HP Chromebook 14, Dell Chromebook 11, and Toshiba CB35.

Based on the work here by Mika Westerberg, which this series incorporates :
https://patchwork.kernel.org/patch/4288591/

[PATCHv2 1/4] platform/chrome: chromeos_laptop - Add support for Acer C720 [PATCHv2 2/4] platform/chrome: chromeos_laptop - Add HP Chromebook 14 [PATCHv2 3/4] platform/chrome: chromeos_laptop - Add Dell Chromebook 11 Touch [PATCHv2 4/4] platform/chrome: chromeos_laptop - Add Toshiba CB35 Touch

Applied, sorry for the repeated delays. :-/

-Olof