[PATCH 3/4] Input: goodix-berlin - set default resolution before parsing properties

Neil Armstrong neil.armstrong at linaro.org
Tue Nov 3 01:58:22 PST 2026


On 11/3/26 05:47, Dmitry Torokhov wrote:
> goodix_berlin_input_dev_config() currently configures the default
> 10 units/mm resolution on ABS_MT_POSITION_X and ABS_MT_POSITION_Y after
> calling touchscreen_parse_properties(). This unconditionally overwrites
> any axis resolution calculated by touchscreen_parse_properties() from
> touchscreen-x-mm and touchscreen-y-mm device properties.
> 
> Set the default resolution before calling touchscreen_parse_properties()
> so the default resolution remains in place when physical dimensions are
> not specified, while allowing touchscreen-x-mm and touchscreen-y-mm to
> override it when present.
> 
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov at gmail.com>
> ---
>   drivers/input/touchscreen/goodix_berlin_core.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/input/touchscreen/goodix_berlin_core.c b/drivers/input/touchscreen/goodix_berlin_core.c
> index b0938a4f3fec..5cf453427eeb 100644
> --- a/drivers/input/touchscreen/goodix_berlin_core.c
> +++ b/drivers/input/touchscreen/goodix_berlin_core.c
> @@ -626,8 +626,6 @@ static int goodix_berlin_input_dev_config(struct goodix_berlin_core *cd,
>   			     0, SZ_64K - 1, 0, 0);
>   	input_set_abs_params(cd->input_dev, ABS_MT_TOUCH_MAJOR, 0, 255, 0, 0);
>   
> -	touchscreen_parse_properties(cd->input_dev, true, &cd->props);
> -
>   	/*
>   	 * The resolution of these touchscreens is about 10 units/mm, the actual
>   	 * resolution does not matter much since we set INPUT_PROP_DIRECT.
> @@ -636,6 +634,8 @@ static int goodix_berlin_input_dev_config(struct goodix_berlin_core *cd,
>   	input_abs_set_res(cd->input_dev, ABS_MT_POSITION_X, 10);
>   	input_abs_set_res(cd->input_dev, ABS_MT_POSITION_Y, 10);
>   
> +	touchscreen_parse_properties(cd->input_dev, true, &cd->props);
> +
>   	error = input_mt_init_slots(cd->input_dev, GOODIX_BERLIN_MAX_TOUCH,
>   				    INPUT_MT_DIRECT | INPUT_MT_DROP_UNUSED);
>   	if (error)

Reviewed-by: Neil Armstrong <neil.armstrong at linaro.org>

Thanks,
Neil



More information about the linux-arm-kernel mailing list