From patchwork Wed Jul 21 14:41:51 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 113369 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o6LEgOm0009790 for ; Wed, 21 Jul 2010 14:42:24 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932287Ab0GUOmK (ORCPT ); Wed, 21 Jul 2010 10:42:10 -0400 Received: from perceval.irobotique.be ([92.243.18.41]:46861 "EHLO perceval.irobotique.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932254Ab0GUOmG (ORCPT ); Wed, 21 Jul 2010 10:42:06 -0400 Received: from localhost.localdomain (unknown [91.178.8.228]) by perceval.irobotique.be (Postfix) with ESMTPSA id 4867D35E0B; Wed, 21 Jul 2010 14:42:02 +0000 (UTC) From: Laurent Pinchart To: linux-media@vger.kernel.org Cc: sakari.ailus@maxwell.research.nokia.com Subject: [SAMPLE v2 04/12] v4l-subdev: Add pads operations Date: Wed, 21 Jul 2010 16:41:51 +0200 Message-Id: <1279723318-28943-5-git-send-email-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1279722935-28493-1-git-send-email-laurent.pinchart@ideasonboard.com> References: <1279722935-28493-1-git-send-email-laurent.pinchart@ideasonboard.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Wed, 21 Jul 2010 14:42:24 +0000 (UTC) diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h index 01b4135..684ab60 100644 --- a/include/media/v4l2-subdev.h +++ b/include/media/v4l2-subdev.h @@ -41,6 +41,7 @@ struct v4l2_device; struct v4l2_event_subscription; struct v4l2_fh; struct v4l2_subdev; +struct v4l2_subdev_fh; struct tuner_setup; /* decode_vbi_line */ @@ -398,6 +399,25 @@ struct v4l2_subdev_ir_ops { struct v4l2_subdev_ir_parameters *params); }; +enum v4l2_subdev_format { + V4L2_SUBDEV_FORMAT_PROBE = 0, + V4L2_SUBDEV_FORMAT_ACTIVE = 1, +}; + +struct v4l2_subdev_pad_ops { + int (*enum_mbus_code)(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh, + struct v4l2_subdev_pad_mbus_code_enum *code); + int (*enum_frame_size)(struct v4l2_subdev *sd, + struct v4l2_subdev_fh *fh, + struct v4l2_subdev_frame_size_enum *fse); + int (*get_fmt)(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh, + unsigned int pad, struct v4l2_mbus_framefmt *fmt, + enum v4l2_subdev_format which); + int (*set_fmt)(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh, + unsigned int pad, struct v4l2_mbus_framefmt *fmt, + enum v4l2_subdev_format which); +}; + struct v4l2_subdev_ops { const struct v4l2_subdev_core_ops *core; const struct v4l2_subdev_tuner_ops *tuner; @@ -406,6 +426,7 @@ struct v4l2_subdev_ops { const struct v4l2_subdev_vbi_ops *vbi; const struct v4l2_subdev_ir_ops *ir; const struct v4l2_subdev_sensor_ops *sensor; + const struct v4l2_subdev_pad_ops *pad; }; #define V4L2_SUBDEV_NAME_SIZE 32