AW: [PATCH 2/2] Input: st1232 - handle common DT bindings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Dmitry,

> -----Ursprüngliche Nachricht-----
> Von: Matthias Fend <matthias.fend@xxxxxxxxxxxxxx>
> Gesendet: Dienstag, 29. Jänner 2019 11:19
> An: mfend@xxxxxx
> Cc: Matthias Fend <Matthias.Fend@xxxxxxxxxxxxxx>
> 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@xxxxxxxxxxxxxx>
> ---
>  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





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux