From patchwork Mon Sep 7 13:44:39 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: 7135411 Return-Path: X-Original-To: patchwork-linux-input@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 0FE5FBEEC1 for ; Mon, 7 Sep 2015 13:54:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 316EA2081B for ; Mon, 7 Sep 2015 13:54:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0280F20805 for ; Mon, 7 Sep 2015 13:54:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750906AbbIGNyi (ORCPT ); Mon, 7 Sep 2015 09:54:38 -0400 Received: from aer-iport-2.cisco.com ([173.38.203.52]:6824 "EHLO aer-iport-2.cisco.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750839AbbIGNyh (ORCPT ); Mon, 7 Sep 2015 09:54:37 -0400 X-Greylist: delayed 569 seconds by postgrey-1.27 at vger.kernel.org; Mon, 07 Sep 2015 09:54:37 EDT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=1686; q=dns/txt; s=iport; t=1441634077; x=1442843677; h=from:to:cc:subject:date:message-id; bh=dDi4u5CNfzbP3K4KTPBHeYV+P/5qxyVGbt6e8K7tldI=; b=Xbzf7I9FVceRU2yM/SiyvQZF7ttaASlUetOhhdAk4/AyVx2Pb6gQxkVH xbf56MZPAeLfsBkQGhSwKERuUzCckeq8T3W/NFXkWVFmbj2C6s0zgqan5 CWFaq8nnxBHcmC9LSebpHX5sO0YW8IZtQpDXj6rCePozVnfX1zT/Q4Ud6 g=; X-IronPort-AV: E=Sophos;i="5.17,485,1437436800"; d="scan'208";a="611442785" Received: from aer-iport-nat.cisco.com (HELO aer-core-4.cisco.com) ([173.38.203.22]) by aer-iport-2.cisco.com with ESMTP; 07 Sep 2015 13:45:11 +0000 Received: from cobaltpc1.rd.cisco.com ([10.47.79.60]) by aer-core-4.cisco.com (8.14.5/8.14.5) with ESMTP id t87Dj5rn020142; Mon, 7 Sep 2015 13:45:11 GMT From: Hans Verkuil To: linux-media@vger.kernel.org Cc: dri-devel@lists.freedesktop.org, m.szyprowski@samsung.com, kyungmin.park@samsung.com, thomas@tommie-lie.de, sean@mess.org, dmitry.torokhov@gmail.com, linux-input@vger.kernel.org, linux-samsung-soc@vger.kernel.org, lars@opdenkamp.eu, kamil@wypas.org, linux@arm.linux.org.uk, Hans Verkuil Subject: [PATCHv9 10/15] v4l2-subdev: add HDMI CEC ops Date: Mon, 7 Sep 2015 15:44:39 +0200 Message-Id: X-Mailer: git-send-email 2.1.4 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.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI, T_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 v4l2_subdev_video_ops. 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 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h index b273cf9..3adddc7 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 { @@ -421,6 +426,11 @@ struct v4l2_subdev_video_ops { const struct v4l2_mbus_config *cfg); int (*s_rx_buffer)(struct v4l2_subdev *sd, void *buf, unsigned int *size); + void (*cec_ready)(struct v4l2_subdev *sd); + unsigned (*cec_available_log_addrs)(struct v4l2_subdev *sd); + int (*cec_enable)(struct v4l2_subdev *sd, bool enable); + int (*cec_log_addr)(struct v4l2_subdev *sd, u8 logical_addr); + int (*cec_transmit)(struct v4l2_subdev *sd, u32 timeout_ms, struct cec_msg *msg); }; /**