Skip to content

Commit fb8bfb4

Browse files
wensTzung-Bi Shih
authored andcommitted
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 <[email protected]> Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Tzung-Bi Shih <[email protected]>
1 parent 73d32c3 commit fb8bfb4

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

drivers/platform/chrome/chromeos_of_hw_prober.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ static int chromeos_i2c_component_prober(struct device *dev, const void *_data)
5959
DEFINE_CHROMEOS_I2C_PROBE_DATA_DUMB_BY_TYPE(touchscreen);
6060
DEFINE_CHROMEOS_I2C_PROBE_DATA_DUMB_BY_TYPE(trackpad);
6161

62+
DEFINE_CHROMEOS_I2C_PROBE_CFG_SIMPLE_BY_TYPE(touchscreen);
6263
DEFINE_CHROMEOS_I2C_PROBE_CFG_SIMPLE_BY_TYPE(trackpad);
6364

6465
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 = {
7677
},
7778
};
7879

80+
static const struct chromeos_i2c_probe_data chromeos_i2c_probe_squirtle_touchscreen = {
81+
.cfg = &chromeos_i2c_probe_simple_touchscreen_cfg,
82+
.opts = &(const struct i2c_of_probe_simple_opts) {
83+
.res_node_compatible = "elan,ekth6a12nay",
84+
.supply_name = "vcc33",
85+
.gpio_name = "reset",
86+
.post_power_on_delay_ms = 10,
87+
.post_gpio_config_delay_ms = 300,
88+
},
89+
};
90+
7991
static const struct hw_prober_entry hw_prober_platforms[] = {
8092
{
8193
.compatible = "google,hana",
@@ -93,6 +105,10 @@ static const struct hw_prober_entry hw_prober_platforms[] = {
93105
.compatible = "google,squirtle",
94106
.prober = chromeos_i2c_component_prober,
95107
.data = &chromeos_i2c_probe_dumb_trackpad,
108+
}, {
109+
.compatible = "google,squirtle",
110+
.prober = chromeos_i2c_component_prober,
111+
.data = &chromeos_i2c_probe_squirtle_touchscreen,
96112
}, {
97113
.compatible = "google,steelix",
98114
.prober = chromeos_i2c_component_prober,

0 commit comments

Comments
 (0)