All of lore.kernel.org
 help / color / mirror / Atom feed
* AW: [PATCH 2/2] Input: st1232 - handle common DT bindings
       [not found] ` <1548757144-2222-2-git-send-email-matthias.fend@wolfvision.net>
@ 2019-02-11  7:15   ` Matthias Fend
  2019-02-11  8:45     ` 'dmitry.torokhov@gmail.com'
  0 siblings, 1 reply; 4+ messages in thread
From: Matthias Fend @ 2019-02-11  7:15 UTC (permalink / raw)
  To: 'dmitry.torokhov@gmail.com'
  Cc: Martin Kepplinger, linux-input, devicetree

Hi Dmitry,

> -----Ursprüngliche Nachricht-----
> Von: Matthias Fend <matthias.fend@wolfvision.net>
> Gesendet: Dienstag, 29. Jänner 2019 11:19
> An: mfend@vol.at
> Cc: Matthias Fend <Matthias.Fend@wolfvision.net>
> Betreff: [PATCH 2/2] Input: st1232 - handle common DT bindings
> 
> This is required to specify generic touchscreen properties via DT.
> 
> Signed-off-by: Matthias Fend <matthias.fend@wolfvision.net>
> ---
>  drivers/input/touchscreen/st1232.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/input/touchscreen/st1232.c
> b/drivers/input/touchscreen/st1232.c
> index 11ff32c..efed2e9 100644
> --- a/drivers/input/touchscreen/st1232.c
> +++ b/drivers/input/touchscreen/st1232.c
> @@ -21,6 +21,7 @@
>  #include <linux/pm_qos.h>
>  #include <linux/slab.h>
>  #include <linux/types.h>
> +#include <linux/input/touchscreen.h>
> 
>  #define ST1232_TS_NAME	"st1232-ts"
> 
> @@ -41,6 +42,7 @@ struct st1232_ts_finger {
>  struct st1232_ts_data {
>  	struct i2c_client *client;
>  	struct input_dev *input_dev;
> +	struct touchscreen_properties prop;
>  	struct st1232_ts_finger finger[MAX_FINGERS];
>  	struct dev_pm_qos_request low_latency_req;
>  	int reset_gpio;
> @@ -109,8 +111,7 @@ static irqreturn_t st1232_ts_irq_handler(int irq, void
> *dev_id)
>  			continue;
> 
>  		input_report_abs(input_dev, ABS_MT_TOUCH_MAJOR,
> finger[i].t);
> -		input_report_abs(input_dev, ABS_MT_POSITION_X,
> finger[i].x);
> -		input_report_abs(input_dev, ABS_MT_POSITION_Y,
> finger[i].y);
> +		touchscreen_report_pos(input_dev, &ts->prop, finger[i].x,
> finger[i].y, true);
>  		input_mt_sync(input_dev);
>  		count++;
>  	}
> @@ -195,6 +196,7 @@ static int st1232_ts_probe(struct i2c_client *client,
>  	input_set_abs_params(input_dev, ABS_MT_TOUCH_MAJOR, 0,
> MAX_AREA, 0, 0);
>  	input_set_abs_params(input_dev, ABS_MT_POSITION_X, MIN_X,
> MAX_X, 0, 0);
>  	input_set_abs_params(input_dev, ABS_MT_POSITION_Y, MIN_Y,
> MAX_Y, 0, 0);
> +	touchscreen_parse_properties(input_dev, true, &ts->prop);
> 
>  	error = devm_request_threaded_irq(&client->dev, client->irq,
>  					  NULL, st1232_ts_irq_handler,
> --

You asked me if I could also include the conversion to touchscreen_report_pos() - which I did in this patch version.
Is there anything else missing?

Thanks,
  ~Matthias

> 2.7.4

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] Input: st1232 - handle common DT bindings
  2019-02-11  7:15   ` AW: [PATCH 2/2] Input: st1232 - handle common DT bindings Matthias Fend
@ 2019-02-11  8:45     ` 'dmitry.torokhov@gmail.com'
  2019-02-11  8:51       ` Martin Kepplinger
  0 siblings, 1 reply; 4+ messages in thread
From: 'dmitry.torokhov@gmail.com' @ 2019-02-11  8:45 UTC (permalink / raw)
  To: Matthias Fend; +Cc: Martin Kepplinger, linux-input, devicetree

Hi Matthias,

On Mon, Feb 11, 2019 at 07:15:12AM +0000, Matthias Fend wrote:
> Hi Dmitry,
>
> You asked me if I could also include the conversion to touchscreen_report_pos() - which I did in this patch version.
> Is there anything else missing?

Sorry, gmail decided to mark the v2 patches as spam for some reason :(
I fished them out and applied.

Matthias, Martin, I noticed that the driver is still using MT-A
protocol. Could you convert it to the proper MT-B (slotted) protocol?

Thanks.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] Input: st1232 - handle common DT bindings
  2019-02-11  8:45     ` 'dmitry.torokhov@gmail.com'
@ 2019-02-11  8:51       ` Martin Kepplinger
  2019-02-11 22:21         ` 'dmitry.torokhov@gmail.com'
  0 siblings, 1 reply; 4+ messages in thread
From: Martin Kepplinger @ 2019-02-11  8:51 UTC (permalink / raw)
  To: 'dmitry.torokhov@gmail.com', Matthias Fend
  Cc: linux-input, devicetree

[-- Attachment #1: Type: text/plain, Size: 861 bytes --]

On 11.02.19 09:45, 'dmitry.torokhov@gmail.com' wrote:
> Hi Matthias,
> 
> On Mon, Feb 11, 2019 at 07:15:12AM +0000, Matthias Fend wrote:
>> Hi Dmitry,
>>
>> You asked me if I could also include the conversion to touchscreen_report_pos() - which I did in this patch version.
>> Is there anything else missing?
> 
> Sorry, gmail decided to mark the v2 patches as spam for some reason :(
> I fished them out and applied.
> 
> Matthias, Martin, I noticed that the driver is still using MT-A
> protocol. Could you convert it to the proper MT-B (slotted) protocol?
> 

Yes, I thought about that actually. type A protocol is what matches the
controller here... It stores touch points consecutively in memory, but I
doubt that it tracks them (by keeping them at one position in its
memory, for instance). But yes, I want to test that.

                          martin

[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 3616 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] Input: st1232 - handle common DT bindings
  2019-02-11  8:51       ` Martin Kepplinger
@ 2019-02-11 22:21         ` 'dmitry.torokhov@gmail.com'
  0 siblings, 0 replies; 4+ messages in thread
From: 'dmitry.torokhov@gmail.com' @ 2019-02-11 22:21 UTC (permalink / raw)
  To: Martin Kepplinger; +Cc: Matthias Fend, linux-input, devicetree

On Mon, Feb 11, 2019 at 09:51:58AM +0100, Martin Kepplinger wrote:
> On 11.02.19 09:45, 'dmitry.torokhov@gmail.com' wrote:
> > Hi Matthias,
> > 
> > On Mon, Feb 11, 2019 at 07:15:12AM +0000, Matthias Fend wrote:
> >> Hi Dmitry,
> >>
> >> You asked me if I could also include the conversion to touchscreen_report_pos() - which I did in this patch version.
> >> Is there anything else missing?
> > 
> > Sorry, gmail decided to mark the v2 patches as spam for some reason :(
> > I fished them out and applied.
> > 
> > Matthias, Martin, I noticed that the driver is still using MT-A
> > protocol. Could you convert it to the proper MT-B (slotted) protocol?
> > 
> 
> Yes, I thought about that actually. type A protocol is what matches the
> controller here... It stores touch points consecutively in memory, but I
> doubt that it tracks them (by keeping them at one position in its
> memory, for instance). But yes, I want to test that.

We still can do MT-B for such devices by employing in-kernel contact
tracking. See input_mt_assign_slots().

Thanks.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-02-11 22:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1548757144-2222-1-git-send-email-matthias.fend@wolfvision.net>
     [not found] ` <1548757144-2222-2-git-send-email-matthias.fend@wolfvision.net>
2019-02-11  7:15   ` AW: [PATCH 2/2] Input: st1232 - handle common DT bindings Matthias Fend
2019-02-11  8:45     ` 'dmitry.torokhov@gmail.com'
2019-02-11  8:51       ` Martin Kepplinger
2019-02-11 22:21         ` 'dmitry.torokhov@gmail.com'

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.