[PATCH 2/4] Input: wacom_w9000 - rely on touchscreen_parse_properties() for resolution
Dmitry Torokhov
dmitry.torokhov at gmail.com
Mon Nov 2 20:47:05 PST 2026
The input core's touchscreen_parse_properties() helper now parses the
touchscreen-x-mm and touchscreen-y-mm properties and calculates axis
resolution in units per millimeter automatically, including handling
axis swapping.
Rely on touchscreen_parse_properties() to configure axis resolutions and
remove the manual property parsing and resolution assignment block in
wacom_w9000_probe(), along with the now-unused local variable.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov at gmail.com>
---
drivers/input/touchscreen/wacom_w9000.c | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/drivers/input/touchscreen/wacom_w9000.c b/drivers/input/touchscreen/wacom_w9000.c
index 4a2629a54167..51c5301262d3 100644
--- a/drivers/input/touchscreen/wacom_w9000.c
+++ b/drivers/input/touchscreen/wacom_w9000.c
@@ -249,7 +249,6 @@ static int wacom_w9000_probe(struct i2c_client *client)
struct wacom_w9000_data *wacom_data;
struct input_dev *input_dev;
int error;
- u32 val;
if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) {
dev_err(dev, "i2c_check_functionality error\n");
@@ -350,15 +349,6 @@ static int wacom_w9000_probe(struct i2c_client *client)
dev_info(dev, "%s size X%uY%u\n", wacom_data->variant->name,
wacom_data->prop.max_x, wacom_data->prop.max_y);
- error = device_property_read_u32(dev, "touchscreen-x-mm", &val);
- if (!error && val)
- input_abs_set_res(input_dev, wacom_data->prop.swap_x_y ? ABS_Y : ABS_X,
- wacom_data->prop.max_x / val);
- error = device_property_read_u32(dev, "touchscreen-y-mm", &val);
- if (!error && val)
- input_abs_set_res(input_dev, wacom_data->prop.swap_x_y ? ABS_X : ABS_Y,
- wacom_data->prop.max_y / val);
-
error = input_register_device(wacom_data->input_dev);
if (error)
return dev_err_probe(dev, error, "Failed to register input device\n");
--
2.56.0.385.gac671c819a-goog
More information about the linux-arm-kernel
mailing list