From patchwork Fri Mar 18 14:07:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Verkuil X-Patchwork-Id: 8619721 Return-Path: X-Original-To: patchwork-linux-samsung-soc@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 0C2559F6E1 for ; Fri, 18 Mar 2016 14:18:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 412C120303 for ; Fri, 18 Mar 2016 14:18:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4D0932037F for ; Fri, 18 Mar 2016 14:18:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755034AbcCROSC (ORCPT ); Fri, 18 Mar 2016 10:18:02 -0400 Received: from aer-iport-3.cisco.com ([173.38.203.53]:57354 "EHLO aer-iport-3.cisco.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754382AbcCROSA (ORCPT ); Fri, 18 Mar 2016 10:18:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=2097; q=dns/txt; s=iport; t=1458310680; x=1459520280; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=+A2nj9fG636pr3KYkOgXPj2MqsuMY1514IoaIYKw6hs=; b=QBxJfsgwoAbPRo0dhYUEl93IXhUhFO45HHX6sFMmHtbS6pE0ZB8qFgTo wt6IaIgIvrv2M2wuLjhBsjTFcPmoPt7uX2HbSFqvFPRKsq/HbsY283KFX KI3YL/UGrOq5pu3d8sG+ZSXJbqLWiVKbIOXYggGatiCwGUgDA8REUaoft w=; X-IronPort-AV: E=Sophos;i="5.24,355,1454976000"; d="scan'208";a="634557737" Received: from aer-iport-nat.cisco.com (HELO aer-core-1.cisco.com) ([173.38.203.22]) by aer-iport-3.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Mar 2016 14:06:51 +0000 Received: from cobaltpc1.rd.cisco.com ([10.47.79.81]) (authenticated bits=0) by aer-core-1.cisco.com (8.14.5/8.14.5) with ESMTP id u2IE6jdb023128 (version=TLSv1/SSLv3 cipher=AES128-SHA256 bits=128 verify=NO); Fri, 18 Mar 2016 14:06:51 GMT From: Hans Verkuil To: linux-media@vger.kernel.org Cc: dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org, linux-input@vger.kernel.org, lars@opdenkamp.eu, linux@arm.linux.org.uk, Hans Verkuil , Kamil Debski Subject: [PATCHv13 11/17] v4l2-subdev: add HDMI CEC ops Date: Fri, 18 Mar 2016 15:07:10 +0100 Message-Id: <1458310036-19252-12-git-send-email-hans.verkuil@cisco.com> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1458310036-19252-1-git-send-email-hans.verkuil@cisco.com> References: <1458310036-19252-1-git-send-email-hans.verkuil@cisco.com> X-Authenticated-User: hansverk Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@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, 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 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 11e2dfe..78edf25 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 { @@ -645,6 +658,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, struct cec_msg *msg); +}; + struct v4l2_subdev_ops { const struct v4l2_subdev_core_ops *core; const struct v4l2_subdev_tuner_ops *tuner; @@ -654,6 +675,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; }; /*