From: Hans Verkuil <hans.verkuil@cisco.com>
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: [PATCHv13 11/17] v4l2-subdev: add HDMI CEC ops
Date: Fri, 18 Mar 2016 15:07:10 +0100 [thread overview]
Message-ID: <1458310036-19252-12-git-send-email-hans.verkuil@cisco.com> (raw)
In-Reply-To: <1458310036-19252-1-git-send-email-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 | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h
index 11e2dfe..78edf25 100644
--- a/include/media/v4l2-subdev.h
+++ b/include/media/v4l2-subdev.h
@@ -42,6 +42,18 @@
#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)
+#define V4L2_SUBDEV_CEC_CONN_INPUTS _IOW('v', 5, u16)
+
struct v4l2_device;
struct v4l2_ctrl_handler;
struct v4l2_event;
@@ -51,6 +63,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 +658,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 +675,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
next prev parent reply other threads:[~2016-03-18 14:07 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-18 14:06 [PATCHv13 00/17] HDMI CEC framework Hans Verkuil
2016-03-18 14:07 ` [PATCHv13 01/17] dts: exynos4*: add HDMI CEC pin definition to pinctrl Hans Verkuil
2016-03-19 2:50 ` Krzysztof Kozlowski
2016-03-19 8:15 ` Hans Verkuil
2016-03-21 0:22 ` Krzysztof Kozlowski
2016-03-18 14:07 ` [PATCHv13 02/17] dts: exynos4: add node for the HDMI CEC device Hans Verkuil
2016-03-18 14:07 ` [PATCHv13 03/17] dts: exynos4412-odroid*: enable " Hans Verkuil
2016-03-18 14:07 ` [PATCHv13 04/17] input.h: add BUS_CEC type Hans Verkuil
2016-03-18 14:07 ` [PATCHv13 05/17] HID: add HDMI CEC specific keycodes Hans Verkuil
2016-03-18 17:30 ` Hans Verkuil
2016-03-18 14:07 ` [PATCHv13 06/17] rc: Add HDMI CEC protocol handling Hans Verkuil
2016-03-18 14:07 ` [PATCHv13 07/17] cec: add HDMI CEC framework Hans Verkuil
2016-03-18 14:07 ` [PATCHv13 08/17] cec: add compat32 ioctl support Hans Verkuil
2016-03-18 14:07 ` [PATCHv13 09/17] cec.txt: add CEC framework documentation Hans Verkuil
2016-03-18 14:07 ` [PATCHv13 10/17] DocBook/media: add CEC documentation Hans Verkuil
2016-03-18 14:07 ` Hans Verkuil [this message]
2016-03-18 14:07 ` [PATCHv13 12/17] cec: adv7604: add cec support Hans Verkuil
2016-03-18 14:07 ` [PATCHv13 13/17] cec: adv7842: " Hans Verkuil
2016-03-18 14:07 ` [PATCHv13 14/17] cec: adv7511: " Hans Verkuil
2016-03-18 14:07 ` [PATCHv13 15/17] cobalt: " Hans Verkuil
2016-03-18 14:07 ` [PATCHv13 16/17] cec: s5p-cec: Add s5p-cec driver Hans Verkuil
2016-03-18 14:07 ` [PATCHv13 17/17] vivid: add CEC emulation 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=1458310036-19252-12-git-send-email-hans.verkuil@cisco.com \
--to=hans.verkuil@cisco.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).