From patchwork Thu Nov 12 12:21:40 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Hans Verkuil (hansverk)" X-Patchwork-Id: 7601911 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 69F9B9F1C2 for ; Thu, 12 Nov 2015 12:33:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B01A92073E for ; Thu, 12 Nov 2015 12:33:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id ABB9D20788 for ; Thu, 12 Nov 2015 12:33:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751967AbbKLMdR (ORCPT ); Thu, 12 Nov 2015 07:33:17 -0500 Received: from aer-iport-1.cisco.com ([173.38.203.51]:6661 "EHLO aer-iport-1.cisco.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751664AbbKLMdQ (ORCPT ); Thu, 12 Nov 2015 07:33:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=1946; q=dns/txt; s=iport; t=1447331596; x=1448541196; h=from:to:cc:subject:date:message-id; bh=KvynNy6G1Hn36W6NZGE+fVeArdu4ZL5VlXLyjNB2ZOU=; b=lo2x52Y46ALz/35VIUhVF3qRredS2M4hL4vbqGRBo66iRW3KE09Mow3N W0E9giEFG31WCKS8Q7OLwrC7uz6d9c+dMSVhutXXeGs++3b4Fja992xdi O8apFqo8jhkxQgT6geAkKUl7wly1/8EveAovi8n0qSOjUcZFPt5Xs4fxK g=; X-IronPort-AV: E=Sophos;i="5.20,281,1444694400"; d="scan'208";a="631678400" Received: from aer-iport-nat.cisco.com (HELO aer-core-4.cisco.com) ([173.38.203.22]) by aer-iport-1.cisco.com with ESMTP; 12 Nov 2015 12:22:02 +0000 Received: from cobaltpc1.rd.cisco.com ([10.47.79.222]) by aer-core-4.cisco.com (8.14.5/8.14.5) with ESMTP id tACCLvMB009470; Thu, 12 Nov 2015 12:22:02 GMT From: Hans Verkuil To: linux-media@vger.kernel.org Cc: dri-devel@lists.freedesktop.org, linux-input@vger.kernel.org, linux-samsung-soc@vger.kernel.org, lars@opdenkamp.eu, linux@arm.linux.org.uk, Hans Verkuil , Kamil Debski Subject: [PATCHv10 11/16] v4l2-subdev: add HDMI CEC ops Date: Thu, 12 Nov 2015 13:21:40 +0100 Message-Id: <91c527c94e22662d154c80a916e64892fe7da54a.1447329279.git.hansverk@cisco.com> X-Mailer: git-send-email 2.6.2 In-Reply-To: References: In-Reply-To: References: Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-14.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY, USER_IN_DEF_DKIM_WL 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 | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h index b273cf9..e55031e 100644 --- a/include/media/v4l2-subdev.h +++ b/include/media/v4l2-subdev.h @@ -42,6 +42,10 @@ #define V4L2_DEVICE_NOTIFY_EVENT _IOW('v', 2, struct v4l2_event) +#define V4L2_SUBDEV_CEC_TX_DONE _IOW('v', 3, u32) +#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 +55,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 +647,14 @@ struct v4l2_subdev_pad_ops { struct v4l2_mbus_frame_desc *fd); }; +struct v4l2_subdev_cec_ops { + unsigned (*available_log_addrs)(struct v4l2_subdev *sd); + int (*enable)(struct v4l2_subdev *sd, bool enable); + int (*log_addr)(struct v4l2_subdev *sd, u8 logical_addr); + int (*transmit)(struct v4l2_subdev *sd, u32 timeout_ms, + u8 retries, struct cec_msg *msg); +}; + struct v4l2_subdev_ops { const struct v4l2_subdev_core_ops *core; const struct v4l2_subdev_tuner_ops *tuner; @@ -651,6 +664,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; }; /*