From 4decc72c23ed8a0d00a5681e5b4500ee4c7ac8f2 Mon Sep 17 00:00:00 2001 From: Cliff Huang Date: Mon, 29 Dec 2025 18:09:45 -0800 Subject: [PATCH] drivers/intel/touch: Change ELAN device name for Google's Rex touch device Change Google's Rex touch device name from TH_SENSOR_GOOGLE to TH_SENSOR_ELAN_REX to better reflect the specific vendor and platform combination. This provides clearer identification and avoids generic naming that could cause confusion with other Google touch implementations. BUG=none TEST=This change cannot be tested in isolation as it only contains naming changes. Testing requires hardware that supports Rex touchscreen functionality, such as: Fatcat board with Google's specialized cable connected to a Rex touchscreen. Verify that the new naming convention works correctly with change: https://review.coreboot.org/c/coreboot/+/89181 (This change uses the new naming convention introduced here). Touch functionality should work identically to before, with only the internal naming updated. Signed-off-by: Cliff Huang Change-Id: I40bb33dee14e9a567ad9dfcf956f3a9cca26dcad Reviewed-on: https://review.coreboot.org/c/coreboot/+/90645 Reviewed-by: Kapil Porwal Tested-by: build bot (Jenkins) Reviewed-by: Kim, Kyoung Il --- src/drivers/intel/touch/chip.h | 6 +++++- src/drivers/intel/touch/elan.h | 9 +++++---- src/drivers/intel/touch/touch.c | 2 +- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/drivers/intel/touch/chip.h b/src/drivers/intel/touch/chip.h index 83b5cd7d37..6e2696ff3f 100644 --- a/src/drivers/intel/touch/chip.h +++ b/src/drivers/intel/touch/chip.h @@ -178,8 +178,12 @@ struct intel_thc_hidspi_info { enum intel_touch_device { TH_SENSOR_NONE, TH_SENSOR_WACOM, /* BOM22 for SPI only */ + /* + * TH_SENSOR_ELAN: the ELAN device for Intel's RVPs (default for ELAN) + * TH_SENSOR_ELAN_REX: the devece used in Google Rex; requires a special cable for Intel's RVP + */ TH_SENSOR_ELAN, /* BOM36 for SPI and BOM37 for I2C */ - TH_SENSOR_GOOGLE, /* ELAN9006 for SPI and ELAN6918 for I2C */ + TH_SENSOR_ELAN_REX, /* ELAN9006 for SPI and ELAN6918 for I2C */ TH_SENSOR_HYNITRON, /* NYITRON for I2C only */ TH_SENSOR_GENERIC, /* for device properity thru devicetree */ }; diff --git a/src/drivers/intel/touch/elan.h b/src/drivers/intel/touch/elan.h index 4f7b2a1ee0..baaa56880a 100644 --- a/src/drivers/intel/touch/elan.h +++ b/src/drivers/intel/touch/elan.h @@ -32,19 +32,20 @@ static const struct drivers_intel_touch_config elan_touch_config = { /* * ELAN9006 is used for HID-SPI interface, while ELAN6918 is used for HID-I2C - * interface. + * interface; This is Google Rex's touch device and requires a special cable + * in Intel's RVP and fatcat. */ -static const struct drivers_intel_touch_config google_touch_config = { +static const struct drivers_intel_touch_config elan_rex_touch_config = { .sensor_dev_name = "ELAN Touch Sensor Device", - .dev_hidi2c = { /* Google's I2C-based touch */ + .dev_hidi2c = { /* Google Rex's I2C-based touch */ .hid = "ELAN6918", .cid = "PNP0C50", .intf.hidi2c.addr = 0x10, .intf.hidi2c.descriptor_address = 0x1, .intf.hidi2c.connection_speed = I2C_SPEED_FAST, /* fast mode */ }, - .dev_hidspi = { /* Google's SPI-based touch */ + .dev_hidspi = { /* Google Rex's SPI-based touch */ .hid = "ELAN9006", .cid = "PNP0C51", .intf.hidspi.connection_speed = (32 * MHz), /* unit: Hz */ diff --git a/src/drivers/intel/touch/touch.c b/src/drivers/intel/touch/touch.c index 85dd7f9159..03738741b8 100644 --- a/src/drivers/intel/touch/touch.c +++ b/src/drivers/intel/touch/touch.c @@ -43,7 +43,7 @@ static const struct drivers_intel_touch_config *get_driver_config(const struct d switch (config->connected_device) { case TH_SENSOR_WACOM: return &wacom_touch_config; case TH_SENSOR_ELAN: return &elan_touch_config; - case TH_SENSOR_GOOGLE: return &google_touch_config; + case TH_SENSOR_ELAN_REX: return &elan_rex_touch_config; case TH_SENSOR_HYNITRON: return &hynitron_touch_config; case TH_SENSOR_GENERIC: return config; case TH_SENSOR_NONE: return NULL;