# Re: Dual touchscreen implementation

- From: Dmitry Torokhov \<dmitry.torokhov@gmail.com\>
- Date: 2010-08-13 07:50:53 
- List: linux-input
- Page: https://ratatoskr.run/linux-input/2010/08/8914538
- Thread: https://ratatoskr.run/linux-input/2010/08/8914521/t.md

```text
Hi,

On Tue, Aug 10, 2010 at 06:16:27PM -0500, Arce, Abraham wrote:
> Hi,
> 
> I am working in a board with dual display/touchscreen. I have searched within drivers/input/touchscreen for some examples on how to implement the functionality to configure driver and behave as a single touchscreen if 2 sensors are present, no specific example found
> 
> My idea is to create an attribute "virtualized" to enable/disable virtualization in the second touchscreen
> 
> + static DEVICE_ATTR(virtualized, S_IRUGO | S_IWUSR,
> + 		   syn_show_attr_virtualized, syn_store_attr_virtualized);
> 
> 
> In the function which reports the values to input subsystem we can then decide to make the second one as an extension of the first touchscreen if
> 
> * virtualized is set to 1
> * and touchscreen sensor is the second one
> 
> 
>  + if (ts->virtualized && dev_name(&sensor->dev == '2')
>  +	data->x = ts->touch_caps.max_x + d->x;
>  [..]
>  + input_report_abs(idev, ABS_x, data->x);
> 
> 
> I'd appreciate any comments on this approach...
> 

Does the kernel have to do that? I'd say it is userspace task to
[re]interpret events.

-- 
Dmitry
```
