All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans Verkuil <hverkuil@xs4all.nl>
To: linux-media@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org,
	linux-samsung-soc@vger.kernel.org, linux-input@vger.kernel.org,
	lars@opdenkamp.eu, linux@arm.linux.org.uk,
	Hans Verkuil <hansverk@cisco.com>, Kamil Debski <kamil@wypas.org>
Subject: [PATCHv14 11/18] v4l2-subdev: add HDMI CEC ops
Date: Fri, 25 Mar 2016 14:10:09 +0100	[thread overview]
Message-ID: <1458911416-47981-12-git-send-email-hverkuil@xs4all.nl> (raw)
In-Reply-To: <1458911416-47981-1-git-send-email-hverkuil@xs4all.nl>

From: Hans Verkuil <hans.verkuil@cisco.com>

Add CEC callbacks to the new v4l2_subdev_cec_ops struct. These are the
low-level CEC ops that subdevs that support CEC have to implement.

Signed-off-by: Hans Verkuil <hansverk@cisco.com>
[k.debski@samsung.com: Merged changes from CEC Updates commit by Hans Verkuil]
Signed-off-by: Kamil Debski <kamil@wypas.org>
---
 include/media/v4l2-subdev.h | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h
index 11e2dfe..8fa660e 100644
--- a/include/media/v4l2-subdev.h
+++ b/include/media/v4l2-subdev.h
@@ -42,6 +42,17 @@
 
 #define	V4L2_DEVICE_NOTIFY_EVENT		_IOW('v', 2, struct v4l2_event)
 
+struct v4l2_subdev_cec_tx_done {
+	u8 status;
+	u8 arb_lost_cnt;
+	u8 nack_cnt;
+	u8 low_drive_cnt;
+	u8 error_cnt;
+};
+
+#define V4L2_SUBDEV_CEC_TX_DONE			_IOW('v', 3, struct v4l2_subdev_cec_tx_done)
+#define V4L2_SUBDEV_CEC_RX_MSG			_IOW('v', 4, struct cec_msg)
+
 struct v4l2_device;
 struct v4l2_ctrl_handler;
 struct v4l2_event;
@@ -51,6 +62,7 @@ struct v4l2_subdev;
 struct v4l2_subdev_fh;
 struct tuner_setup;
 struct v4l2_mbus_frame_desc;
+struct cec_msg;
 
 /* decode_vbi_line */
 struct v4l2_decode_vbi_line {
@@ -645,6 +657,14 @@ struct v4l2_subdev_pad_ops {
 			      struct v4l2_mbus_frame_desc *fd);
 };
 
+struct v4l2_subdev_cec_ops {
+	unsigned (*adap_available_log_addrs)(struct v4l2_subdev *sd);
+	int (*adap_enable)(struct v4l2_subdev *sd, bool enable);
+	int (*adap_log_addr)(struct v4l2_subdev *sd, u8 logical_addr);
+	int (*adap_transmit)(struct v4l2_subdev *sd, u8 attempts,
+			     u32 signal_free_time, struct cec_msg *msg);
+};
+
 struct v4l2_subdev_ops {
 	const struct v4l2_subdev_core_ops	*core;
 	const struct v4l2_subdev_tuner_ops	*tuner;
@@ -654,6 +674,7 @@ struct v4l2_subdev_ops {
 	const struct v4l2_subdev_ir_ops		*ir;
 	const struct v4l2_subdev_sensor_ops	*sensor;
 	const struct v4l2_subdev_pad_ops	*pad;
+	const struct v4l2_subdev_cec_ops	*cec;
 };
 
 /*
-- 
2.7.0


  parent reply	other threads:[~2016-03-25 13:10 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-25 13:09 [PATCHv14 00/18] HDMI CEC framework Hans Verkuil
2016-03-25 13:09 ` [PATCHv14 01/18] dts: exynos4*: add HDMI CEC pin definition to pinctrl Hans Verkuil
2016-03-29  6:26   ` Krzysztof Kozlowski
2016-03-25 13:10 ` [PATCHv14 02/18] dts: exynos4: add node for the HDMI CEC device Hans Verkuil
2016-03-29  6:27   ` Krzysztof Kozlowski
2016-03-25 13:10 ` [PATCHv14 03/18] dts: exynos4412-odroid*: enable " Hans Verkuil
2016-03-29  6:28   ` Krzysztof Kozlowski
2016-03-29  7:28     ` Hans Verkuil
2016-03-25 13:10 ` [PATCHv14 04/18] input.h: add BUS_CEC type Hans Verkuil
2016-03-25 13:10 ` [PATCHv14 05/18] HID: add HDMI CEC specific keycodes Hans Verkuil
2016-03-31 20:00   ` Dmitry Torokhov
2016-03-25 13:10 ` [PATCHv14 06/18] rc: Add HDMI CEC protocol handling Hans Verkuil
2016-03-25 13:10 ` [PATCHv14 07/18] cec: add HDMI CEC framework Hans Verkuil
2016-03-25 13:10 ` [PATCHv14 08/18] cec: add compat32 ioctl support Hans Verkuil
2016-03-25 13:10 ` [PATCHv14 09/18] cec.txt: add CEC framework documentation Hans Verkuil
2016-03-25 13:10 ` [PATCHv14 10/18] DocBook/media: add CEC documentation Hans Verkuil
2016-03-25 13:10 ` Hans Verkuil [this message]
2016-03-25 13:10 ` [PATCHv14 12/18] cec: adv7604: add cec support Hans Verkuil
2016-03-25 13:10 ` [PATCHv14 13/18] cec: adv7842: " Hans Verkuil
2016-03-25 13:10 ` [PATCHv14 14/18] cec: adv7511: " Hans Verkuil
2016-03-25 13:10 ` [PATCHv14 15/18] cobalt: " Hans Verkuil
2016-03-25 13:10 ` [PATCHv14 16/18] cec: s5p-cec: Add s5p-cec driver Hans Verkuil
2016-03-25 13:10 ` [PATCHv14 17/18] vivid: add CEC emulation Hans Verkuil
2016-03-25 13:10 ` [PATCHv14 18/18] cec: add ARC and CDC support Hans Verkuil

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=1458911416-47981-12-git-send-email-hverkuil@xs4all.nl \
    --to=hverkuil@xs4all.nl \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hansverk@cisco.com \
    --cc=kamil@wypas.org \
    --cc=lars@opdenkamp.eu \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    /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.