Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1391056 > unrolled thread

Re: [PATCH 0/8] Input: atmel_mxt_ts - output raw touch diagnostic data via V4L

Started byNick Dyer <nick.dyer@itdev.co.uk>
First post2016-04-29 14:20 +0200
Last post2016-04-29 14:20 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  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

#1391056 — Re: [PATCH 0/8] Input: atmel_mxt_ts - output raw touch diagnostic data via V4L

FromNick Dyer <nick.dyer@itdev.co.uk>
Date2016-04-29 14:20 +0200
SubjectRe: [PATCH 0/8] Input: atmel_mxt_ts - output raw touch diagnostic data via V4L
Message-ID<rtfyO-5Os-23@gated-at.bofh.it>
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.

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web