summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChen-Yu Tsai <wenst@chromium.org>2025-04-21 18:12:46 +0800
committerTzung-Bi Shih <tzungbi@kernel.org>2025-04-25 02:16:24 +0000
commitfb8bfb48a4d11efb9b3e492d7c5e9ae7478786ce (patch)
tree972b17af708109296c65baf2f6a4fe0dd38563ba
parent73d32c3e74e1bd679617b9b9c06d806dedd7c055 (diff)
platform/chrome: of_hw_prober: Support touchscreen probing on Squirtle
The MT8186 Squirtle Chromebook is built with one of two possible touchscreens. Let the prober probe for them. Signed-off-by: Chen-Yu Tsai <wenst@chromium.org> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20250421101248.426929-9-wenst@chromium.org Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
-rw-r--r--drivers/platform/chrome/chromeos_of_hw_prober.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/platform/chrome/chromeos_of_hw_prober.c b/drivers/platform/chrome/chromeos_of_hw_prober.c
index 10dbaede0541..f3cd612e5584 100644
--- a/drivers/platform/chrome/chromeos_of_hw_prober.c
+++ b/drivers/platform/chrome/chromeos_of_hw_prober.c
@@ -59,6 +59,7 @@ static int chromeos_i2c_component_prober(struct device *dev, const void *_data)
DEFINE_CHROMEOS_I2C_PROBE_DATA_DUMB_BY_TYPE(touchscreen);
DEFINE_CHROMEOS_I2C_PROBE_DATA_DUMB_BY_TYPE(trackpad);
+DEFINE_CHROMEOS_I2C_PROBE_CFG_SIMPLE_BY_TYPE(touchscreen);
DEFINE_CHROMEOS_I2C_PROBE_CFG_SIMPLE_BY_TYPE(trackpad);
static const struct chromeos_i2c_probe_data chromeos_i2c_probe_hana_trackpad = {
@@ -76,6 +77,17 @@ static const struct chromeos_i2c_probe_data chromeos_i2c_probe_hana_trackpad = {
},
};
+static const struct chromeos_i2c_probe_data chromeos_i2c_probe_squirtle_touchscreen = {
+ .cfg = &chromeos_i2c_probe_simple_touchscreen_cfg,
+ .opts = &(const struct i2c_of_probe_simple_opts) {
+ .res_node_compatible = "elan,ekth6a12nay",
+ .supply_name = "vcc33",
+ .gpio_name = "reset",
+ .post_power_on_delay_ms = 10,
+ .post_gpio_config_delay_ms = 300,
+ },
+};
+
static const struct hw_prober_entry hw_prober_platforms[] = {
{
.compatible = "google,hana",
@@ -94,6 +106,10 @@ static const struct hw_prober_entry hw_prober_platforms[] = {
.prober = chromeos_i2c_component_prober,
.data = &chromeos_i2c_probe_dumb_trackpad,
}, {
+ .compatible = "google,squirtle",
+ .prober = chromeos_i2c_component_prober,
+ .data = &chromeos_i2c_probe_squirtle_touchscreen,
+ }, {
.compatible = "google,steelix",
.prober = chromeos_i2c_component_prober,
.data = &chromeos_i2c_probe_dumb_trackpad,