* 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; 6+ messages in thread From: Matthias Fend @ 2019-02-11 7:15 UTC (permalink / raw) To: 'dmitry.torokhov@gmail.com' Cc: Martin Kepplinger, linux-input@vger.kernel.org, devicetree@vger.kernel.org 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] 6+ 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; 6+ messages in thread From: 'dmitry.torokhov@gmail.com' @ 2019-02-11 8:45 UTC (permalink / raw) To: Matthias Fend Cc: Martin Kepplinger, linux-input@vger.kernel.org, devicetree@vger.kernel.org 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] 6+ 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; 6+ messages in thread From: Martin Kepplinger @ 2019-02-11 8:51 UTC (permalink / raw) To: 'dmitry.torokhov@gmail.com', Matthias Fend Cc: linux-input@vger.kernel.org, devicetree@vger.kernel.org [-- 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] 6+ 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; 6+ messages in thread From: 'dmitry.torokhov@gmail.com' @ 2019-02-11 22:21 UTC (permalink / raw) To: Martin Kepplinger Cc: Matthias Fend, linux-input@vger.kernel.org, devicetree@vger.kernel.org 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] 6+ messages in thread
* [PATCH 1/2] dt-bindings: input: touchscreen: st1232i: reference common DT bindings @ 2019-01-28 9:06 Matthias Fend [not found] ` <419160a7-edf5-48cf-85ea-d6d5e9cd6e59.95bf7d06-047e-438c-8c7b-895af195351a.6448af99-cd65-4518-8f79-5ccc17d038ab@emailsignatures365.codetwo.com> 0 siblings, 1 reply; 6+ messages in thread From: Matthias Fend @ 2019-01-28 9:06 UTC (permalink / raw) To: dmitry.torokhov@gmail.com Cc: Matthias Fend, linux-input@vger.kernel.org, devicetree@vger.kernel.org Add a reference to common touchscreen bindings which are also partly supported. Signed-off-by: Matthias Fend <matthias.fend@wolfvision.net> --- Documentation/devicetree/bindings/input/touchscreen/sitronix-st1232.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/input/touchscreen/sitronix-st1232.txt b/Documentation/devicetree/bindings/input/touchscreen/sitronix-st1232.txt index 64ad48b..f3046e7 100644 --- a/Documentation/devicetree/bindings/input/touchscreen/sitronix-st1232.txt +++ b/Documentation/devicetree/bindings/input/touchscreen/sitronix-st1232.txt @@ -8,6 +8,8 @@ Required properties: Optional properties: - gpios: a phandle to the reset GPIO +For additional optional properties see: touchscreen.txt + Example: i2c@00000000 { -- 2.7.4 Matthias Fend R&D Electronics Wolfvision GmbH Oberes Ried 14 | 6833 Klaus | Austria Tel: +43 5523 52250 | Mail: Matthias.Fend@wolfvision.net Webpage: www.wolfvision.com | www.wolfvision.com/green Firmenbuch / Commercial Register: FN283521v Feldkirch/Austria ^ permalink raw reply related [flat|nested] 6+ messages in thread
[parent not found: <419160a7-edf5-48cf-85ea-d6d5e9cd6e59.95bf7d06-047e-438c-8c7b-895af195351a.6448af99-cd65-4518-8f79-5ccc17d038ab@emailsignatures365.codetwo.com>]
* [PATCH 2/2] Input: st1232 - handle common DT bindings [not found] ` <419160a7-edf5-48cf-85ea-d6d5e9cd6e59.95bf7d06-047e-438c-8c7b-895af195351a.6448af99-cd65-4518-8f79-5ccc17d038ab@emailsignatures365.codetwo.com> @ 2019-01-28 9:06 ` Matthias Fend 2019-01-28 19:08 ` dmitry.torokhov 0 siblings, 1 reply; 6+ messages in thread From: Matthias Fend @ 2019-01-28 9:06 UTC (permalink / raw) To: dmitry.torokhov@gmail.com Cc: Matthias Fend, linux-input@vger.kernel.org, devicetree@vger.kernel.org This is required to specify generic touchscreen properties via DT. Signed-off-by: Matthias Fend <matthias.fend@wolfvision.net> --- drivers/input/touchscreen/st1232.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/input/touchscreen/st1232.c b/drivers/input/touchscreen/st1232.c index 11ff32c..ad617ac 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" @@ -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, NULL); error = devm_request_threaded_irq(&client->dev, client->irq, NULL, st1232_ts_irq_handler, -- 2.7.4 Matthias Fend R&D Electronics Wolfvision GmbH Oberes Ried 14 | 6833 Klaus | Austria Tel: +43 5523 52250 | Mail: Matthias.Fend@wolfvision.net Webpage: www.wolfvision.com | www.wolfvision.com/green Firmenbuch / Commercial Register: FN283521v Feldkirch/Austria ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] Input: st1232 - handle common DT bindings 2019-01-28 9:06 ` [PATCH 2/2] Input: st1232 - handle " Matthias Fend @ 2019-01-28 19:08 ` dmitry.torokhov 0 siblings, 0 replies; 6+ messages in thread From: dmitry.torokhov @ 2019-01-28 19:08 UTC (permalink / raw) To: Matthias Fend; +Cc: linux-input@vger.kernel.org, devicetree@vger.kernel.org Hi Matthias, On Mon, Jan 28, 2019 at 09:06:08AM +0000, Matthias Fend wrote: > This is required to specify generic touchscreen properties via DT. > > Signed-off-by: Matthias Fend <matthias.fend@wolfvision.net> > --- > drivers/input/touchscreen/st1232.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/input/touchscreen/st1232.c b/drivers/input/touchscreen/st1232.c > index 11ff32c..ad617ac 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" > > @@ -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, NULL); Do you think you could complete the conversion and also use touchscreen_report_pos() to support common transformations (swap, invert)? Thanks! -- Dmitry ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-02-11 22:21 UTC | newest] Thread overview: 6+ 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' 2019-01-28 9:06 [PATCH 1/2] dt-bindings: input: touchscreen: st1232i: reference " Matthias Fend [not found] ` <419160a7-edf5-48cf-85ea-d6d5e9cd6e59.95bf7d06-047e-438c-8c7b-895af195351a.6448af99-cd65-4518-8f79-5ccc17d038ab@emailsignatures365.codetwo.com> 2019-01-28 9:06 ` [PATCH 2/2] Input: st1232 - handle " Matthias Fend 2019-01-28 19:08 ` dmitry.torokhov
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).