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: 7620561 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 D65C6C05CA for ; Mon, 16 Nov 2015 02:33:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E04AC205B3 for ; Mon, 16 Nov 2015 02:33:26 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 90B2620591 for ; Mon, 16 Nov 2015 02:33:25 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 336D16E799; Sun, 15 Nov 2015 18:31:51 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from aer-iport-1.cisco.com (aer-iport-1.cisco.com [173.38.203.51]) by gabe.freedesktop.org (Postfix) with ESMTPS id C39077A167 for ; Thu, 12 Nov 2015 04:31:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=1946; q=dns/txt; s=iport; t=1447331507; x=1448541107; h=from:to:cc:subject:date:message-id; bh=KvynNy6G1Hn36W6NZGE+fVeArdu4ZL5VlXLyjNB2ZOU=; b=ax0HZg7mtPA+w4icN9d1u2x1XvLmNd1j99L6nhFzEJPJ/S9YqlY+9enV Klikj8+Lcebe/6ueLGcwK98mSh/EfIys3BAZb5pHAz0tdpeBr41OYzz6m SkCo4Rp+h1SdGKiqoVPuQrrBCy6prVQScHDOiVcOApp6IoBTAcoeFcDzW 4=; 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 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: X-Mailman-Approved-At: Sun, 15 Nov 2015 18:31:22 -0800 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.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,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 | 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; }; /*