From patchwork Wed Feb 10 12:51:45 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Verkuil X-Patchwork-Id: 8271141 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id EA3F5BEEE5 for ; Wed, 10 Feb 2016 12:52:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 91BD1203DB for ; Wed, 10 Feb 2016 12:52:33 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id CF94E2039C for ; Wed, 10 Feb 2016 12:52:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6C8A46E6D7; Wed, 10 Feb 2016 04:52:23 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from lb1-smtp-cloud3.xs4all.net (lb1-smtp-cloud3.xs4all.net [194.109.24.22]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1057F6E6D9 for ; Wed, 10 Feb 2016 04:52:21 -0800 (PST) Received: from tschai.lan ([90.149.38.145]) by smtp-cloud3.xs4all.net with ESMTP id Gcs01s00A37uBN201csMjt; Wed, 10 Feb 2016 13:52:21 +0100 Received: from tschai.fritz.box (localhost [127.0.0.1]) by tschai.lan (Postfix) with ESMTPSA id 3C0DF181012; Wed, 10 Feb 2016 13:51:52 +0100 (CET) From: Hans Verkuil To: linux-media@vger.kernel.org Subject: [PATCHv12 11/17] v4l2-subdev: add HDMI CEC ops Date: Wed, 10 Feb 2016 13:51:45 +0100 Message-Id: <1455108711-29850-12-git-send-email-hverkuil@xs4all.nl> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1455108711-29850-1-git-send-email-hverkuil@xs4all.nl> References: <1455108711-29850-1-git-send-email-hverkuil@xs4all.nl> Cc: linux-samsung-soc@vger.kernel.org, linux@arm.linux.org.uk, Kamil Debski , dri-devel@lists.freedesktop.org, Hans Verkuil , lars@opdenkamp.eu, linux-input@vger.kernel.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Hans Verkuil 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 [k.debski@samsung.com: Merged changes from CEC Updates commit by Hans Verkuil] Signed-off-by: Kamil Debski --- 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 b273cf9..f97a807 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 { @@ -642,6 +655,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_ms, struct cec_msg *msg); +}; + struct v4l2_subdev_ops { const struct v4l2_subdev_core_ops *core; const struct v4l2_subdev_tuner_ops *tuner; @@ -651,6 +672,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; }; /*