Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1509928

Re: [PATCH 4/4] Input: goodix - Support interchanging x and y coordinates in hardware

From Rob Herring <robh@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH 4/4] Input: goodix - Support interchanging x and y coordinates in hardware
Date 2016-10-27 01:20 +0200
Message-ID <swFEd-25s-5@gated-at.bofh.it> (permalink)
References <surP3-3PX-11@gated-at.bofh.it> <surP3-3PX-27@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Oct 20, 2016 at 02:59:17PM -0500, Franklin S Cooper Jr wrote:
> On systems with a fixed display/touchscreen orientation it is important to
> pass in the "correct" x and y coordinates based on the orientation.
> Currently, to support landscape and portrait touchscreen-swapped-x-y
> simply does the following:
> 
> Assuming touchscreen is as follows:
> X: 1280 Y:800 programmed in touchscreen controller and also interchange
> bit cleared. Assuming ts mounted in portrait mode.
> 
> 1280 (X)
> ------
> |    |
> |    | 800 (Y)
> |    |
> |    |
> ------
> 
> 800 (Y)
> ------
> |    |
> |    | 1280 (X)
> |    |
> |    |
> ------
> 
> However, the above isn't really what we want especially in distros that
> assumes a fixed orientation. In this case what we really want is to
> interchange the x and y coordinates so the Y coordinate can return a max
> value of 1280 and X can return a max value of 800.
> 
> 800 (X)
> ------
> |    |
> |    | 1280 (Y)
> |    |
> |    |
> ------
> 
> Since the driver is limited to the value reported by the touchscreen
> controller this issue can't be fixed purely in the driver. Therefore,
> add a new DT property that supports interchanging X and Y coordinates
> internally within the hardware.

I'm not sure I follow why existing properties don't cover this.

> 
> Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com>
> ---
>  .../devicetree/bindings/input/touchscreen/goodix.txt        |  2 ++
>  drivers/input/touchscreen/goodix.c                          | 13 +++++++++++++
>  2 files changed, 15 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/input/touchscreen/goodix.txt b/Documentation/devicetree/bindings/input/touchscreen/goodix.txt
> index ebc7cb7..b8be2ab 100644
> --- a/Documentation/devicetree/bindings/input/touchscreen/goodix.txt
> +++ b/Documentation/devicetree/bindings/input/touchscreen/goodix.txt
> @@ -25,6 +25,8 @@ Optional properties:
>   - touchscreen-inverted-y  : Y axis is inverted (boolean)
>   - touchscreen-swapped-x-y : X and Y axis are swapped (boolean)
>                               (swapping is done after inverting the axis)
> + - touchscreen-inter-x-y   : X and Y maximum values programmed in the device
> +                             are interchanged internally in hardware. (boolean)

Minimally this should be vendor specific and have a vendor prefix I 
think.

Rob

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/4] Input: goodix - Support dynamic reconfiguration Franklin S Cooper Jr <fcooper@ti.com> - 2016-10-20 22:10 +0200
  [PATCH 3/4] Input: goodix - Tweak configuration to use passed in touchscreen resolution Franklin S Cooper Jr <fcooper@ti.com> - 2016-10-20 22:10 +0200
    Re: [PATCH 3/4] Input: goodix - Tweak configuration to use passed in  touchscreen resolution Rob Herring <robh@kernel.org> - 2016-10-27 01:20 +0200
    Re: [PATCH 3/4] Input: goodix - Tweak configuration to use passed  in touchscreen resolution Bastien Nocera <hadess@hadess.net> - 2016-10-27 16:20 +0200
      Re: [PATCH 3/4] Input: goodix - Tweak configuration to use passed in  touchscreen resolution Franklin S Cooper Jr <fcooper@ti.com> - 2016-10-27 19:10 +0200
  [PATCH 4/4] Input: goodix - Support interchanging x and y coordinates in hardware Franklin S Cooper Jr <fcooper@ti.com> - 2016-10-20 22:10 +0200
    Re: [PATCH 4/4] Input: goodix - Support interchanging x and y  coordinates in hardware Rob Herring <robh@kernel.org> - 2016-10-27 01:20 +0200
      Re: [PATCH 4/4] Input: goodix - Support interchanging x and y  coordinates in hardware Bastien Nocera <hadess@hadess.net> - 2016-10-27 16:30 +0200
        Re: [PATCH 4/4] Input: goodix - Support interchanging x and y  coordinates in hardware Franklin S Cooper Jr <fcooper@ti.com> - 2016-10-27 19:50 +0200
          Re: [PATCH 4/4] Input: goodix - Support interchanging x and y  coordinates in hardware Bastien Nocera <hadess@hadess.net> - 2016-10-28 02:10 +0200
      Re: [PATCH 4/4] Input: goodix - Support interchanging x and y  coordinates in hardware Franklin S Cooper Jr <fcooper@ti.com> - 2016-10-27 20:00 +0200
  [PATCH 2/4] Input: goodix - Allow tweaking of configuration file dynamically Franklin S Cooper Jr <fcooper@ti.com> - 2016-10-20 22:10 +0200
    Re: [PATCH 2/4] Input: goodix - Allow tweaking of configuration  file dynamically Bastien Nocera <hadess@hadess.net> - 2016-10-27 16:30 +0200
      Re: [PATCH 2/4] Input: goodix - Allow tweaking of configuration file  dynamically Franklin S Cooper Jr <fcooper@ti.com> - 2016-10-27 19:00 +0200
        Re: [PATCH 2/4] Input: goodix - Allow tweaking of configuration  file dynamically Bastien Nocera <hadess@hadess.net> - 2016-10-27 19:50 +0200

csiph-web