public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Nick Dyer <nick.dyer@itdev.co.uk>
To: Mauro Carvalho Chehab <mchehab@osg.samsung.com>,
	Hans Verkuil <hverkuil@xs4all.nl>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-media@vger.kernel.org,
	Benjamin Tissoires <benjamin.tissoires@redhat.com>,
	Benson Leung <bleung@chromium.org>,
	Alan Bowens <Alan.Bowens@atmel.com>,
	Javier Martinez Canillas <javier@osg.samsung.com>,
	Chris Healy <cphealy@gmail.com>,
	Henrik Rydberg <rydberg@bitmath.org>,
	Andrew Duggan <aduggan@synaptics.com>,
	James Chen <james.chen@emc.com.tw>, Dudley Du <dudl@cypress.com>,
	Andrew de los Reyes <adlr@chromium.org>,
	sheckylin@chromium.org, Peter Hutterer <peter.hutterer@who-t.net>,
	Florian Echtler <floe@butterbrot.org>
Subject: Re: [PATCH 0/8] Input: atmel_mxt_ts - output raw touch diagnostic data via V4L
Date: Fri, 29 Apr 2016 13:14:12 +0100	[thread overview]
Message-ID: <57235014.8060304@itdev.co.uk> (raw)
In-Reply-To: <20160422124425.39ac140f@recife.lan>

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.

      reply	other threads:[~2016-04-29 12:14 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-21  9:31 [PATCH 0/8] Input: atmel_mxt_ts - output raw touch diagnostic data via V4L Nick Dyer
2016-04-21  9:31 ` [PATCH 1/8] Input: atmel_mxt_ts - add support for T37 diagnostic data Nick Dyer
2016-04-21  9:31 ` [PATCH 2/8] Input: atmel_mxt_ts - output diagnostic debug via v4l2 device Nick Dyer
2016-04-21 11:04   ` kbuild test robot
2016-04-21 11:23   ` kbuild test robot
2016-04-21 11:43   ` kbuild test robot
2016-04-21  9:31 ` [PATCH 3/8] Input: atmel_mxt_ts - read touchscreen size Nick Dyer
2016-04-21  9:31 ` [PATCH 4/8] Input: atmel_mxt_ts - handle diagnostic data orientation Nick Dyer
2016-04-21  9:31 ` [PATCH 5/8] Input: atmel_mxt_ts - add diagnostic data support for mXT1386 Nick Dyer
2016-04-21  9:31 ` [PATCH 6/8] Input: atmel_mxt_ts - add support for reference data Nick Dyer
2016-04-21  9:31 ` [PATCH 7/8] Input: atmel_mxt_ts - single node diagnostic data support Nick Dyer
2016-04-21  9:31 ` [PATCH 8/8] Input: atmel_mxt_ts - add v4l pixelformat definition for touch refs output Nick Dyer
2016-04-22  8:26 ` [PATCH 0/8] Input: atmel_mxt_ts - output raw touch diagnostic data via V4L Hans Verkuil
2016-04-22 14:45   ` Mauro Carvalho Chehab
2016-04-22 15:07     ` Nick Dyer
2016-04-22 15:18       ` Hans Verkuil
2016-04-22 15:44         ` Mauro Carvalho Chehab
2016-04-29 12:14           ` Nick Dyer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=57235014.8060304@itdev.co.uk \
    --to=nick.dyer@itdev.co.uk \
    --cc=Alan.Bowens@atmel.com \
    --cc=adlr@chromium.org \
    --cc=aduggan@synaptics.com \
    --cc=benjamin.tissoires@redhat.com \
    --cc=bleung@chromium.org \
    --cc=cphealy@gmail.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=dudl@cypress.com \
    --cc=floe@butterbrot.org \
    --cc=hverkuil@xs4all.nl \
    --cc=james.chen@emc.com.tw \
    --cc=javier@osg.samsung.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@osg.samsung.com \
    --cc=peter.hutterer@who-t.net \
    --cc=rydberg@bitmath.org \
    --cc=sheckylin@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox