Re: [PATCH v7 3/4] Input: stmfts - support FTS5
From: Dmitry Torokhov
Date: Fri Sep 25 2026 - 15:21:30 EST
Hi David,
On Mon, Sep 07, 2026 at 12:50:21PM +0200, David Heidelberg via B4 Relay wrote:
> +static int stmfts5_setup_input(struct stmfts_data *sdata)
> +{
> + struct device *dev = &sdata->client->dev;
> +
> + sdata->mode_switch_gpio = devm_gpiod_get_optional(dev, "mode-switch",
> + GPIOD_OUT_HIGH);
> + if (IS_ERR(sdata->mode_switch_gpio))
> + return dev_err_probe(dev, PTR_ERR(sdata->mode_switch_gpio),
> + "Failed to get GPIO 'switch'\n");
> +
> + /* Set resolution for accurate calibration */
> + if (!input_abs_get_res(sdata->input, ABS_MT_POSITION_X)) {
> + input_abs_set_res(sdata->input, ABS_MT_POSITION_X, 10);
> + input_abs_set_res(sdata->input, ABS_MT_POSITION_Y, 10);
> + }
> +
> + input_set_abs_params(sdata->input, ABS_MT_DISTANCE, 0, 255, 0, 0);
You need
input_set_abs_params(sdata->input, ABS_MT_TOOL_TYPE,
0, MT_TOOL_PALM, 0, 0);
here, otherwise input core will drop ABS_MT_TOOL_TYPE events.
Thanks.
--
Dmitry