All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans Verkuil <hverkuil@xs4all.nl>
To: Sean Young <sean@mess.org>, Kamil Debski <k.debski@samsung.com>
Cc: dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org,
	m.szyprowski@samsung.com, mchehab@osg.samsung.com,
	kyungmin.park@samsung.com, thomas@tommie-lie.de,
	Hans Verkuil <hansverk@cisco.com>
Subject: Re: [RFC v2 3/7] cec: add new framework for cec support.
Date: Mon, 26 Jan 2015 09:41:06 +0100	[thread overview]
Message-ID: <54C5FDA2.4060400@xs4all.nl> (raw)
In-Reply-To: <20150123110747.GA3084@gofer.mess.org>

On 01/23/2015 12:07 PM, Sean Young wrote:
> On Thu, Jan 22, 2015 at 05:04:35PM +0100, Kamil Debski wrote:
>> Add the CEC framework.
> -snip-
>> +Remote control handling
>> +-----------------------
>> +
>> +The CEC framework provides two ways of handling the key messages of remote
>> +control. In the first case, the CEC framework will handle these messages and
>> +provide the keypressed via the RC framework. In the second case the messages
>> +related to the key down/up events are not parsed by the framework and are
>> +passed to the userspace as raw messages.
>> +
>> +Switching between these modes is done with a special ioctl.
>> +
>> +#define CEC_G_KEY_PASSTHROUGH	_IOR('a', 10, __u8)
>> +#define CEC_S_KEY_PASSTHROUGH	_IOW('a', 11, __u8)
>> +#define CEC_KEY_PASSTHROUGH_DISABLE	0
>> +#define CEC_KEY_PASSTHROUGH_ENABLE	1
> 
> This is ugly. This ioctl stops keypresses from going to rc-core. The cec 
> device is still registered with rc-core but no keys will be passed to it. 
> This could also be handled by loading an empty keymap; this way the input 
> layer will still receive scancodes but no keypresses.
> 
>> +static ssize_t cec_read(struct file *filp, char __user *buf,
>> +		size_t sz, loff_t *off)
>> +{
>> +	struct cec_devnode *cecdev = cec_devnode_data(filp);
>> +
>> +	if (!cec_devnode_is_registered(cecdev))
>> +		return -EIO;
>> +	return 0;
>> +}
>> +
>> +static ssize_t cec_write(struct file *filp, const char __user *buf,
>> +		size_t sz, loff_t *off)
>> +{
>> +	struct cec_devnode *cecdev = cec_devnode_data(filp);
>> +
>> +	if (!cec_devnode_is_registered(cecdev))
>> +		return -EIO;
>> +	return 0;
>> +}
> 
> Both read and write do nothing; they should either -ENOSYS or the fuctions
> should be removed.

These can be removed. These are leftovers from the very first cec driver I
wrote. The idea at the time was to use read and write to handle CEC messages,
but in the end that never happened and ioctls were used instead,


Regards,

	Hans

  reply	other threads:[~2015-01-26  8:41 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-22 16:04 [RFC v2 0/7] HDMI CEC framework Kamil Debski
2015-01-22 16:04 ` Kamil Debski
2015-01-22 16:04 ` [RFC v2 1/7] ARM: dts: add hdmi cec driver to exynos4412-odroidu3 Kamil Debski
2015-01-22 16:04   ` Kamil Debski
2015-01-22 16:04 ` [RFC v2 2/7] media: rc: Add cec protocol handling Kamil Debski
2015-03-08 14:20   ` Mauro Carvalho Chehab
2015-03-08 14:20     ` Mauro Carvalho Chehab
2015-03-09 16:22     ` Kamil Debski
2015-03-09 16:22       ` Kamil Debski
2015-03-09 16:43       ` Bastien Nocera
2015-03-10 12:02         ` Kamil Debski
2015-03-10 12:02           ` Kamil Debski
2015-03-10 14:13           ` Hans Verkuil
2015-03-10 14:14           ` Bastien Nocera
2015-03-10 15:40             ` Kamil Debski
2015-03-10 15:40               ` Kamil Debski
2015-03-11 11:24     ` Kamil Debski
2015-03-11 11:24       ` Kamil Debski
2015-03-11 13:48       ` Mauro Carvalho Chehab
2015-01-22 16:04 ` [RFC v2 3/7] cec: add new framework for cec support Kamil Debski
2015-01-23 11:07   ` Sean Young
2015-01-26  8:41     ` Hans Verkuil [this message]
2015-03-06 16:14     ` Kamil Debski
2015-03-06 16:14       ` Kamil Debski
2015-03-08 10:44       ` Sean Young
2015-03-09 16:21         ` Kamil Debski
2015-03-08 15:41       ` Mauro Carvalho Chehab
2015-03-09 16:22         ` Kamil Debski
2015-03-09 16:22           ` Kamil Debski
2015-01-22 16:04 ` [RFC v2 4/7] v4l2-subdev: add cec ops Kamil Debski
2015-01-22 16:04 ` [RFC v2 5/7] adv7604: add cec support Kamil Debski
2015-01-22 16:04   ` Kamil Debski
2015-01-22 16:04 ` [RFC v2 6/7] adv7511: " Kamil Debski
2015-01-22 16:04 ` [RFC v2 7/7] s5p-cec: Add s5p-cec driver Kamil Debski

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=54C5FDA2.4060400@xs4all.nl \
    --to=hverkuil@xs4all.nl \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hansverk@cisco.com \
    --cc=k.debski@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-media@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=mchehab@osg.samsung.com \
    --cc=sean@mess.org \
    --cc=thomas@tommie-lie.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.