linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Add support for Elan touchpad varionts of Peppy and Wolf
@ 2016-05-02  0:57 Benson Leung
  2016-05-02  0:57 ` [PATCH 1/2] platform/chrome: chromeos_laptop - Add elan trackpad option for C720 Benson Leung
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Benson Leung @ 2016-05-02  0:57 UTC (permalink / raw)
  To: olof, linux-kernel; +Cc: charliemooney, k7paul, hugegreenbug, bleung

The chromeos-3.8 kernel has support for a second-sourced elan device for
two Haswell based systems, Peppy and Wolf.

Benson Leung (1):
  platform/chrome: chromeos_laptop - Add elan trackpad option for C720

Charlie Mooney (1):
  platform/chrome: chromeos_laptop - Add Elan touchpad for Wolf

 drivers/platform/chrome/chromeos_laptop.c | 22 +++++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)

-- 
2.8.0.rc3.226.g39d4020

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] platform/chrome: chromeos_laptop - Add elan trackpad option for C720
  2016-05-02  0:57 [PATCH 0/2] Add support for Elan touchpad varionts of Peppy and Wolf Benson Leung
@ 2016-05-02  0:57 ` Benson Leung
  2016-05-02  0:57 ` [PATCH 2/2] platform/chrome: chromeos_laptop - Add Elan touchpad for Wolf Benson Leung
  2016-05-11 18:34 ` [PATCH 0/2] Add support for Elan touchpad varionts of Peppy and Wolf Olof Johansson
  2 siblings, 0 replies; 4+ messages in thread
From: Benson Leung @ 2016-05-02  0:57 UTC (permalink / raw)
  To: olof, linux-kernel; +Cc: charliemooney, k7paul, hugegreenbug, bleung

Add the elan trackpad to the Acer C720 (peppy) list, as it is an alternate
trackpad option. It may exist at i2c address 0x15.

Based on this change from the chromeos kernel :
https://chromium-review.googlesource.com/186253

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

diff --git a/drivers/platform/chrome/chromeos_laptop.c b/drivers/platform/chrome/chromeos_laptop.c
index 2b441e9..2a510b8 100644
--- a/drivers/platform/chrome/chromeos_laptop.c
+++ b/drivers/platform/chrome/chromeos_laptop.c
@@ -34,6 +34,7 @@
 #define ATMEL_TS_I2C_ADDR	0x4a
 #define ATMEL_TS_I2C_BL_ADDR	0x26
 #define CYAPA_TP_I2C_ADDR	0x67
+#define ELAN_TP_I2C_ADDR	0x15
 #define ISL_ALS_I2C_ADDR	0x44
 #define TAOS_ALS_I2C_ADDR	0x29
 
@@ -73,7 +74,7 @@ struct i2c_peripheral {
 	int tries;
 };
 
-#define MAX_I2C_PERIPHERALS 3
+#define MAX_I2C_PERIPHERALS 4
 
 struct chromeos_laptop {
 	struct i2c_peripheral i2c_peripherals[MAX_I2C_PERIPHERALS];
@@ -86,6 +87,11 @@ static struct i2c_board_info cyapa_device = {
 	.flags		= I2C_CLIENT_WAKE,
 };
 
+static struct i2c_board_info elantech_device = {
+	I2C_BOARD_INFO("elan_i2c", ELAN_TP_I2C_ADDR),
+	.flags		= I2C_CLIENT_WAKE,
+};
+
 static struct i2c_board_info isl_als_device = {
 	I2C_BOARD_INFO("isl29018", ISL_ALS_I2C_ADDR),
 };
@@ -306,6 +312,16 @@ static int setup_atmel_224s_tp(enum i2c_adapter_type type)
 	return (!tp) ? -EAGAIN : 0;
 }
 
+static int setup_elantech_tp(enum i2c_adapter_type type)
+{
+	if (tp)
+		return 0;
+
+	/* add elantech touchpad */
+	tp = add_i2c_device("trackpad", type, &elantech_device);
+	return (!tp) ? -EAGAIN : 0;
+}
+
 static int setup_atmel_1664s_ts(enum i2c_adapter_type type)
 {
 	const unsigned short addr_list[] = { ATMEL_TS_I2C_BL_ADDR,
@@ -475,6 +491,8 @@ static struct chromeos_laptop acer_c720 = {
 		{ .add = setup_atmel_1664s_ts, I2C_ADAPTER_DESIGNWARE_1 },
 		/* Touchpad. */
 		{ .add = setup_cyapa_tp, I2C_ADAPTER_DESIGNWARE_0 },
+		/* Elan Touchpad option. */
+		{ .add = setup_elantech_tp, I2C_ADAPTER_DESIGNWARE_0 },
 		/* Light Sensor. */
 		{ .add = setup_isl29018_als, I2C_ADAPTER_DESIGNWARE_1 },
 	},
-- 
2.8.0.rc3.226.g39d4020

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] platform/chrome: chromeos_laptop - Add Elan touchpad for Wolf
  2016-05-02  0:57 [PATCH 0/2] Add support for Elan touchpad varionts of Peppy and Wolf Benson Leung
  2016-05-02  0:57 ` [PATCH 1/2] platform/chrome: chromeos_laptop - Add elan trackpad option for C720 Benson Leung
@ 2016-05-02  0:57 ` Benson Leung
  2016-05-11 18:34 ` [PATCH 0/2] Add support for Elan touchpad varionts of Peppy and Wolf Olof Johansson
  2 siblings, 0 replies; 4+ messages in thread
From: Benson Leung @ 2016-05-02  0:57 UTC (permalink / raw)
  To: olof, linux-kernel; +Cc: charliemooney, k7paul, hugegreenbug, bleung

From: Charlie Mooney <charliemooney@chromium.org>

The upcoming Elan Wolf (Dell Chromebook 11) devices need to know to look
for Elan touchpads on the i2c bus so that they will be functional.

Based on the chromeos-kernel commit :
https://chromium-review.googlesource.com/198283

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

diff --git a/drivers/platform/chrome/chromeos_laptop.c b/drivers/platform/chrome/chromeos_laptop.c
index 2a510b8..e8a44a9 100644
--- a/drivers/platform/chrome/chromeos_laptop.c
+++ b/drivers/platform/chrome/chromeos_laptop.c
@@ -461,6 +461,8 @@ static struct chromeos_laptop dell_chromebook_11 = {
 	.i2c_peripherals = {
 		/* Touchpad. */
 		{ .add = setup_cyapa_tp, I2C_ADAPTER_DESIGNWARE_0 },
+		/* Elan Touchpad option. */
+		{ .add = setup_elantech_tp, I2C_ADAPTER_DESIGNWARE_0 },
 	},
 };
 
-- 
2.8.0.rc3.226.g39d4020

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 0/2] Add support for Elan touchpad varionts of Peppy and Wolf
  2016-05-02  0:57 [PATCH 0/2] Add support for Elan touchpad varionts of Peppy and Wolf Benson Leung
  2016-05-02  0:57 ` [PATCH 1/2] platform/chrome: chromeos_laptop - Add elan trackpad option for C720 Benson Leung
  2016-05-02  0:57 ` [PATCH 2/2] platform/chrome: chromeos_laptop - Add Elan touchpad for Wolf Benson Leung
@ 2016-05-11 18:34 ` Olof Johansson
  2 siblings, 0 replies; 4+ messages in thread
From: Olof Johansson @ 2016-05-11 18:34 UTC (permalink / raw)
  To: Benson Leung; +Cc: linux-kernel, charliemooney, k7paul, hugegreenbug

On Mon, May 02, 2016 at 08:57:15AM +0800, Benson Leung wrote:
> The chromeos-3.8 kernel has support for a second-sourced elan device for
> two Haswell based systems, Peppy and Wolf.
> 
> Benson Leung (1):
>   platform/chrome: chromeos_laptop - Add elan trackpad option for C720
> 
> Charlie Mooney (1):
>   platform/chrome: chromeos_laptop - Add Elan touchpad for Wolf
> 
>  drivers/platform/chrome/chromeos_laptop.c | 22 +++++++++++++++++++++-
>  1 file changed, 21 insertions(+), 1 deletion(-)

Applied both. Thanks!


-Olof

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-05-11 19:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-02  0:57 [PATCH 0/2] Add support for Elan touchpad varionts of Peppy and Wolf Benson Leung
2016-05-02  0:57 ` [PATCH 1/2] platform/chrome: chromeos_laptop - Add elan trackpad option for C720 Benson Leung
2016-05-02  0:57 ` [PATCH 2/2] platform/chrome: chromeos_laptop - Add Elan touchpad for Wolf Benson Leung
2016-05-11 18:34 ` [PATCH 0/2] Add support for Elan touchpad varionts of Peppy and Wolf Olof Johansson

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).