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. -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html