From patchwork Mon Jun 29 10:14:55 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Verkuil X-Patchwork-Id: 6687991 Return-Path: X-Original-To: patchwork-linux-media@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 09BB8C05AD for ; Mon, 29 Jun 2015 10:26:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2D99220555 for ; Mon, 29 Jun 2015 10:26:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3C20820569 for ; Mon, 29 Jun 2015 10:26:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753145AbbF2K0Z (ORCPT ); Mon, 29 Jun 2015 06:26:25 -0400 Received: from aer-iport-1.cisco.com ([173.38.203.51]:37495 "EHLO aer-iport-1.cisco.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752937AbbF2K0B (ORCPT ); Mon, 29 Jun 2015 06:26:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=1641; q=dns/txt; s=iport; t=1435573560; x=1436783160; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=AmX4RgPD1J7Nj4RkRB9lpPkPDBr7dmORXgwFKwx9+Lk=; b=XVJ5yWYURFOJCr81DX+BS5OxY0CW1Iq0x6D+uGMUdJumhs0636zjHnQp zAFkbLqMo35eFtETKWgERUO5y8tkLRVbL4HWEU6sHdPPo3L6wmv+DtlGN x3CJBTkCOto2HIzbk7ZpnCdtVqOIar0yE4jMTlddrllJLdKeVTystKo69 A=; X-IronPort-AV: E=Sophos;i="5.13,698,1427760000"; d="scan'208";a="566167942" Received: from aer-iport-nat.cisco.com (HELO aer-core-2.cisco.com) ([173.38.203.22]) by aer-iport-1.cisco.com with ESMTP; 29 Jun 2015 10:15:58 +0000 Received: from test-media.cisco.com (ams3-vpn-dhcp354.cisco.com [10.61.65.98]) (authenticated bits=0) by aer-core-2.cisco.com (8.14.5/8.14.5) with ESMTP id t5TAFMjO016684 (version=TLSv1/SSLv3 cipher=AES128-SHA256 bits=128 verify=NO); Mon, 29 Jun 2015 10:15:55 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, Hans Verkuil Subject: [PATCHv7 10/15] v4l2-subdev: add HDMI CEC ops Date: Mon, 29 Jun 2015 12:14:55 +0200 Message-Id: <1435572900-56998-11-git-send-email-hans.verkuil@cisco.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1435572900-56998-1-git-send-email-hans.verkuil@cisco.com> References: <1435572900-56998-1-git-send-email-hans.verkuil@cisco.com> X-Authenticated-User: hansverk Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-15.1 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 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 Signed-off-by: Hans Verkuil --- include/media/v4l2-subdev.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h index dc20102..53e220d 100644 --- a/include/media/v4l2-subdev.h +++ b/include/media/v4l2-subdev.h @@ -42,6 +42,9 @@ #define V4L2_DEVICE_NOTIFY_EVENT _IOW('v', 2, struct v4l2_event) +#define V4L2_SUBDEV_CEC_TX_DONE _IOW('v', 2, u32) +#define V4L2_SUBDEV_CEC_RX_MSG _IOW('v', 3, struct cec_msg) + struct v4l2_device; struct v4l2_ctrl_handler; struct v4l2_event_subscription; @@ -50,6 +53,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 { @@ -338,6 +342,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); + 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, struct cec_msg *msg); + void (*cec_transmit_timed_out)(struct v4l2_subdev *sd); }; /*