Input: mms114 - drop platform data and use generic APIs
The MMS114 platform data has no in-tree users, so drop it. Switch to using the standard touchscreen properties via touchscreen_parse_properties(), and move the old DT parsing code to use device_property_*() APIs. Finally, use touchscreen_report_pos to report x/y coordinates and drop the custom x/y inversion code. Signed-off-by: Simon Shields <simon@lineageos.org> Reviewed-by: Rob Herring <robh@kernel.org> Reviewed-by: Andi Shyti <andi.shyti@samsung.com> Tested-by: Andi Shyti <andi.shyti@samsung.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
This commit is contained in:

committed by
Dmitry Torokhov

parent
477baf7e9a
commit
5b0d0033f3
@@ -4,14 +4,18 @@ Required properties:
|
||||
- compatible: must be "melfas,mms114"
|
||||
- reg: I2C address of the chip
|
||||
- interrupts: interrupt to which the chip is connected
|
||||
- x-size: horizontal resolution of touchscreen
|
||||
- y-size: vertical resolution of touchscreen
|
||||
- touchscreen-size-x: See [1]
|
||||
- touchscreen-size-y: See [1]
|
||||
|
||||
Optional properties:
|
||||
- contact-threshold:
|
||||
- moving-threshold:
|
||||
- x-invert: invert X axis
|
||||
- y-invert: invert Y axis
|
||||
- touchscreen-fuzz-x: See [1]
|
||||
- touchscreen-fuzz-y: See [1]
|
||||
- touchscreen-fuzz-pressure: See [1]
|
||||
- touchscreen-inverted-x: See [1]
|
||||
- touchscreen-inverted-y: See [1]
|
||||
- touchscreen-swapped-x-y: See [1]
|
||||
|
||||
[1]: Documentation/devicetree/bindings/input/touchscreen/touchscreen.txt
|
||||
|
||||
Example:
|
||||
|
||||
@@ -22,12 +26,13 @@ Example:
|
||||
compatible = "melfas,mms114";
|
||||
reg = <0x48>;
|
||||
interrupts = <39 0>;
|
||||
x-size = <720>;
|
||||
y-size = <1280>;
|
||||
contact-threshold = <10>;
|
||||
moving-threshold = <10>;
|
||||
x-invert;
|
||||
y-invert;
|
||||
touchscreen-size-x = <720>;
|
||||
touchscreen-size-y = <1280>;
|
||||
touchscreen-fuzz-x = <10>;
|
||||
touchscreen-fuzz-y = <10>;
|
||||
touchscreen-fuzz-pressure = <10>;
|
||||
touchscreen-inverted-x;
|
||||
touchscreen-inverted-y;
|
||||
};
|
||||
|
||||
/* ... */
|
||||
|
Reference in New Issue
Block a user