lkml.org 
[lkml]   [2023]   [May]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Date
    Subject[PATCH 2/4] dt-bindings: touchscreen: add virtual-touchscreen and virtual-buttons properties
    The virtual-touchscreen object defines an area within the touchscreen
    where touch events are reported and their coordinates get converted to
    the virtual origin. This object avoids getting events from areas that
    are physically hidden by overlay frames.

    For touchscreens where overlay buttons on the touchscreen surface are
    provided, the virtual-buttons object contains a node for every button
    and the key event that should be reported when pressed.

    Signed-off-by: Javier Carrasco <javier.carrasco@wolfvision.net>
    ---
    .../bindings/input/touchscreen/touchscreen.yaml | 54 ++++++++++++++++++++++
    1 file changed, 54 insertions(+)

    diff --git a/Documentation/devicetree/bindings/input/touchscreen/touchscreen.yaml b/Documentation/devicetree/bindings/input/touchscreen/touchscreen.yaml
    index 895592da9626..869be007eb6f 100644
    --- a/Documentation/devicetree/bindings/input/touchscreen/touchscreen.yaml
    +++ b/Documentation/devicetree/bindings/input/touchscreen/touchscreen.yaml
    @@ -80,6 +80,60 @@ properties:
    touchscreen-y-plate-ohms:
    description: Resistance of the Y-plate in Ohms

    + virtual-touchscreen:
    + description: Clipped touchscreen area
    + type: object
    +
    + properties:
    + x-origin:
    + description: horizontal origin of the clipped area
    + $ref: /schemas/types.yaml#/definitions/uint32
    +
    + y-origin:
    + description: vertical origin of the clipped area
    + $ref: /schemas/types.yaml#/definitions/uint32
    +
    + x-size:
    + description: horizontal resolution of the clipped area
    + $ref: /schemas/types.yaml#/definitions/uint32
    +
    + y-size:
    + description: vertical resolution of the clipped area
    + $ref: /schemas/types.yaml#/definitions/uint32
    +
    + virtual-buttons:
    + description: list of nodes defining the buttons on the touchscreen
    + type: object
    +
    + patternProperties:
    + '^button-':
    + type: object
    + description:
    + Each button (key) is represented as a sub-node.
    +
    + properties:
    + label:
    + $ref: /schemas/types.yaml#/definitions/string
    + description: descriptive name of the button
    +
    + linux,code: true
    +
    + x-origin:
    + description: horizontal origin of the button area
    + $ref: /schemas/types.yaml#/definitions/uint32
    +
    + y-origin:
    + description: vertical origin of the button area
    + $ref: /schemas/types.yaml#/definitions/uint32
    +
    + x-size:
    + description: horizontal resolution of the button area
    + $ref: /schemas/types.yaml#/definitions/uint32
    +
    + y-size:
    + description: vertical resolution of the button area
    + $ref: /schemas/types.yaml#/definitions/uint32
    +
    dependencies:
    touchscreen-size-x: [ touchscreen-size-y ]
    touchscreen-size-y: [ touchscreen-size-x ]
    --
    2.39.2

    \
     
     \ /
      Last update: 2023-05-10 15:54    [W:3.327 / U:0.084 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site