mbox series

[RESEND,0/5] input: iqs269a: Add support for slider gestures and OTP variants

Message ID 1600289400-27632-1-git-send-email-jeff@labundy.com
Headers show
Series input: iqs269a: Add support for slider gestures and OTP variants | expand

Message

Jeff LaBundy Sept. 16, 2020, 8:49 p.m. UTC
This series introduces support for some additional features offered by the
Azoteq IQS269A capacitive touch controller.

Patches 1 and 2 add support for slider gestures (e.g. tap or swipe). Gestures
are recognized by the hardware itself based on touch activity across the chan-
nels associated with the slider. This feature is useful for lightweight systems
that do not post-process absolute coordinates to determine gestures expressed
by the user.

Gestures are presented to user space as keycodes. An example use-case is an
array of multimedia keys as seen in the following demo:

https://youtu.be/k_vMRQiHLgA

Patches 3 and 4 add support for the device's available OTP variants, which
trade features or exhibit errata that require workarounds. Patch 5 represents
a minor fix that is included in the series because it requires patch 2 in order
to apply cleanly.

This series is being resent with a previous patch 6 ("input: iqs269a: Disable
channels before configuring them") dropped, as a more optimal workaround that
prevents GPIO3 from inadvertently toggling during calibration has since been
highlighted. If found to be viable, it will be sent as a future patch.

Note that this series is based on mainline as the binding patches require
086e9074f52f ("dt-bindings: Remove more cases of 'allOf' containing a '$ref'")
in order to apply cleanly.

Jeff LaBundy (5):
  dt-bindings: input: iqs269a: Add bindings for slider gestures
  input: iqs269a: Add support for slider gestures
  dt-bindings: input: iqs269a: Add bindings for OTP variants
  input: iqs269a: Add support for OTP variants
  input: iqs269a: Make sliders two-dimensional

 .../devicetree/bindings/input/iqs269a.yaml         |  95 ++++++-
 drivers/input/misc/iqs269a.c                       | 315 ++++++++++++++++++---
 2 files changed, 377 insertions(+), 33 deletions(-)

--
2.7.4

Comments

Dmitry Torokhov Sept. 17, 2020, 12:03 a.m. UTC | #1
On Wed, Sep 16, 2020 at 03:50:00PM -0500, Jeff LaBundy wrote:
> libinput rejects devices that define one axis without the orthogonal
> axis, as well as devices for which either axis's resolution is zero.
> 
> To solve this problem, present a thin y-axis with a resolution equal
> to one.

No, let's fix this in libinput please.

> 
> Signed-off-by: Jeff LaBundy <jeff@labundy.com>
> ---
>  drivers/input/misc/iqs269a.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/input/misc/iqs269a.c b/drivers/input/misc/iqs269a.c
> index 04947f1..4a0e4ec 100644
> --- a/drivers/input/misc/iqs269a.c
> +++ b/drivers/input/misc/iqs269a.c
> @@ -1377,6 +1377,8 @@ static int iqs269_input_init(struct iqs269_private *iqs269)
>  					     EV_KEY, BTN_TOUCH);
>  			input_set_abs_params(iqs269->slider[i],
>  					     ABS_X, 0, 255, 0, 0);
> +			input_set_abs_params(iqs269->slider[i],
> +					     ABS_Y, 0, 1, 0, 0);
>  		}
>  
>  		error = input_register_device(iqs269->slider[i]);
> -- 
> 2.7.4
> 

Thanks.