Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1391056
| From | Nick Dyer <nick.dyer@itdev.co.uk> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 0/8] Input: atmel_mxt_ts - output raw touch diagnostic data via V4L |
| Date | 2016-04-29 14:20 +0200 |
| Message-ID | <rtfyO-5Os-23@gated-at.bofh.it> (permalink) |
| References | (1 earlier) <rqEDp-7qZ-29@gated-at.bofh.it> <rqKz8-3sD-3@gated-at.bofh.it> <rqKSu-3S9-23@gated-at.bofh.it> <rqL2a-3VA-1@gated-at.bofh.it> <rqLvd-49a-35@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 22/04/2016 16:44, Mauro Carvalho Chehab wrote: >> On the other hand, it would be a good place to tell the user that it >> is from a touch sensor. >> >> Using the upcoming metadata feature wouldn't work since there is no width >> and height in the metadata format. >> >> I wonder what others think about adding a new type value. > > IMO, two things should be done here: > > 1) Add some caps flag to help userspace to identify what's there > on those devices; In the patches I have written so far, I have used inputs to select between different types of data, so I believe there's no real need for this yet. Did you have anything else in mind? > 2) Make sure that udev/systemd won't be naming the devnodes as > "/dev/video"; > > > The latter one could be solved with either the new dev meta or > with another VFL_TYPE for input systems (like VFL_TYPE_TOUCH_SENSOR) > and use this code snippet: > > diff --git a/drivers/media/v4l2-core/v4l2-dev.c b/drivers/media/v4l2-core/v4l2-dev.c > index d8e5994cccf1..4d3e574eba49 100644 > --- a/drivers/media/v4l2-core/v4l2-dev.c > +++ b/drivers/media/v4l2-core/v4l2-dev.c > @@ -887,6 +887,9 @@ int __video_register_device(struct video_device *vdev, int type, int nr, > /* Use device name 'swradio' because 'sdr' was already taken. */ > name_base = "swradio"; > break; > + case VFL_TYPE_TOUCH_SENSOR: > + name_base = "v4l-touch"; > + break; > default: > printk(KERN_ERR "%s called with unknown type: %d\n", > __func__, type); > > > Such change would cause __video_register_device() to pass a different > name_base to: > dev_set_name(&vdev->dev, "%s%d", name_base, vdev->num); > > This way, udev/systemd will use a different name (by default, > /dev/v4l-touch0), and existing apps won't identify this as a > webcam. Thanks - this sounds like a good approach to me. I will update.
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
Re: [PATCH 0/8] Input: atmel_mxt_ts - output raw touch diagnostic data via V4L Nick Dyer <nick.dyer@itdev.co.uk> - 2016-04-29 14:20 +0200
csiph-web