Some touch controllers send out touch data in a similar way to a greyscale frame grabber. Add new device type VFL_TYPE_TOUCH: - This uses a new device prefix v4l-touch for these devices, to stop generic capture software from treating them as webcams. Otherwise, touch is treated similarly to video capture. - Add V4L2_INPUT_TYPE_TOUCH - Add MEDIA_INTF_T_V4L_TOUCH - Add V4L2_CAP_TOUCH to indicate device is a touch device Add formats: - V4L2_TCH_FMT_DELTA_TD16 for signed 16-bit touch deltas - V4L2_TCH_FMT_DELTA_TD08 for signed 16-bit touch deltas - V4L2_TCH_FMT_TU16 for unsigned 16-bit touch data - V4L2_TCH_FMT_TU08 for unsigned 8-bit touch data This support will be used by: - Atmel maXTouch (atmel_mxt_ts) - Synaptics RMI4. - sur40
Showing the changes to include/uapi (2 of 7 files). Show all
Unified · Split
| @@ -307,6 +307,7 @@ struct media_links_enum { · 306 unmodified lines | ||
| 307 | 307 | #define MEDIA_INTF_T_V4L_RADIO (MEDIA_INTF_T_V4L_BASE + 2) |
| 308 | 308 | #define MEDIA_INTF_T_V4L_SUBDEV (MEDIA_INTF_T_V4L_BASE + 3) |
| 309 | 309 | #define MEDIA_INTF_T_V4L_SWRADIO (MEDIA_INTF_T_V4L_BASE + 4) |
| 310 | +#define MEDIA_INTF_T_V4L_TOUCH (MEDIA_INTF_T_V4L_BASE + 5) | |
| 310 | 311 | |
| 311 | 312 | #define MEDIA_INTF_T_ALSA_PCM_CAPTURE (MEDIA_INTF_T_ALSA_BASE) |
| 312 | 313 | #define MEDIA_INTF_T_ALSA_PCM_PLAYBACK (MEDIA_INTF_T_ALSA_BASE + 1) |
| @@ -440,6 +440,8 @@ struct v4l2_capability { · 439 unmodified lines | ||
| 440 | 440 | #define V4L2_CAP_ASYNCIO 0x02000000 /* async I/O */ |
| 441 | 441 | #define V4L2_CAP_STREAMING 0x04000000 /* streaming I/O ioctls */ |
| 442 | 442 | |
| 443 | +#define V4L2_CAP_TOUCH 0x10000000 /* Is a touch device */ | |
| 444 | + | |
| 443 | 445 | #define V4L2_CAP_DEVICE_CAPS 0x80000000 /* sets device capabilities field */ |
| 444 | 446 | |
| 445 | 447 | /* |
| @@ -635,6 +637,12 @@ struct v4l2_pix_format { · 189 unmodified lines | ||
| 635 | 637 | #define V4L2_SDR_FMT_CS14LE v4l2_fourcc('C', 'S', '1', '4') /* complex s14le */ |
| 636 | 638 | #define V4L2_SDR_FMT_RU12LE v4l2_fourcc('R', 'U', '1', '2') /* real u12le */ |
| 637 | 639 | |
| 640 | +/* Touch formats - used for Touch devices */ | |
| 641 | +#define V4L2_TCH_FMT_DELTA_TD16 v4l2_fourcc('T', 'D', '1', '6') /* 16-bit signed deltas */ | |
| 642 | +#define V4L2_TCH_FMT_DELTA_TD08 v4l2_fourcc('T', 'D', '0', '8') /* 8-bit signed deltas */ | |
| 643 | +#define V4L2_TCH_FMT_TU16 v4l2_fourcc('T', 'U', '1', '6') /* 16-bit unsigned touch data */ | |
| 644 | +#define V4L2_TCH_FMT_TU08 v4l2_fourcc('T', 'U', '0', '8') /* 8-bit unsigned touch data */ | |
| 645 | + | |
| 638 | 646 | /* priv field value to indicates that subsequent fields are valid. */ |
| 639 | 647 | #define V4L2_PIX_FMT_PRIV_MAGIC 0xfeedcafe |
| 640 | 648 | |
| @@ -1401,6 +1409,7 @@ struct v4l2_input { · 760 unmodified lines | ||
| 1401 | 1409 | /* Values for the 'type' field */ |
| 1402 | 1410 | #define V4L2_INPUT_TYPE_TUNER 1 |
| 1403 | 1411 | #define V4L2_INPUT_TYPE_CAMERA 2 |
| 1412 | +#define V4L2_INPUT_TYPE_TOUCH 3 | |
| 1404 | 1413 | |
| 1405 | 1414 | /* field 'status' - general */ |
| 1406 | 1415 | #define V4L2_IN_ST_NO_POWER 0x00000001 /* Attached device is off */ |