Input: eswin_touch - Fix ABS_X min/max being 0

Only call input_mt_init_slots after setting up some properties which are
then copied to other properties.
This commit is contained in:
Luca Weiss 2025-02-18 16:37:13 +01:00
commit 5f6c2aed42

View file

@ -600,13 +600,6 @@ static int eph_input_device_initialize(struct eph_data *ephdata)
/* direct device, e.g. touchscreen */
mt_flags |= INPUT_MT_DIRECT;
/* multi touch */
ret_val = input_mt_init_slots(ephdata->inputdev, CONFIG_SUPPORTED_TOUCHES, mt_flags);
if (ret_val)
{
dev_err(dev, "Error %d initialising slots\n", ret_val);
return ret_val;
}
/* reports co-ordinates of the tool */
/* Height appears to always be Y */
@ -621,6 +614,13 @@ static int eph_input_device_initialize(struct eph_data *ephdata)
input_set_abs_params(ephdata->inputdev, ABS_MT_TOUCH_MINOR, 0, (EPH_MAX_HEIGHT_WIDTH*max_resoultion), 0, 0);
input_set_abs_params(ephdata->inputdev, ABS_MT_PRESSURE, 0, 255, 0, 0);
/* multi touch */
ret_val = input_mt_init_slots(ephdata->inputdev, CONFIG_SUPPORTED_TOUCHES, mt_flags);
if (ret_val)
{
dev_err(dev, "Error %d initialising slots\n", ret_val);
return ret_val;
}
input_set_drvdata(ephdata->inputdev, ephdata);