From patchwork Sat Jun 11 22:29:59 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philippe De Muyter X-Patchwork-Id: 9171201 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 26AA060573 for ; Sat, 11 Jun 2016 22:40:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1A08821327 for ; Sat, 11 Jun 2016 22:40:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0F3CA25D99; Sat, 11 Jun 2016 22:40:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7223725D97 for ; Sat, 11 Jun 2016 22:40:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752092AbcFKWkS (ORCPT ); Sat, 11 Jun 2016 18:40:18 -0400 Received: from smtp2.macqel.be ([109.135.2.61]:57918 "EHLO smtp2.macqel.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751953AbcFKWkQ (ORCPT ); Sat, 11 Jun 2016 18:40:16 -0400 Received: from localhost (localhost [127.0.0.1]) by smtp2.macqel.be (Postfix) with ESMTP id BE15D130E07; Sun, 12 Jun 2016 00:30:20 +0200 (CEST) X-Virus-Scanned: amavisd-new at macqel.be Received: from smtp2.macqel.be ([127.0.0.1]) by localhost (mail.macqel.be [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rpdF5jToh3o9; Sun, 12 Jun 2016 00:30:19 +0200 (CEST) Received: from perdita.MACQEL (perdita.macqel [10.1.40.53]) by smtp2.macqel.be (Postfix) with ESMTP id 54472130D59; Sun, 12 Jun 2016 00:30:19 +0200 (CEST) Received: from perdita.MACQEL (localhost [127.0.0.1]) by perdita.MACQEL (8.14.4/8.14.4/SuSE Linux 0.8) with ESMTP id u5BMUG6D012498; Sun, 12 Jun 2016 00:30:18 +0200 Received: (from p6@localhost) by perdita.MACQEL (8.14.4/8.14.4/Submit) id u5BMUGep012493; Sun, 12 Jun 2016 00:30:16 +0200 X-Authentication-Warning: perdita.MACQEL: p6 set sender to phdm@macq.eu using -f From: Philippe De Muyter To: hverkuil@xs4all.nl, linux-media@vger.kernel.org, steve_longerbeam@mentor.com Cc: Philippe De Muyter Subject: [PATCH 1/2] [media] v4l2-subdev.h: allow V4L2_FRMIVAL_TYPE_CONTINUOUS & _STEPWISE Date: Sun, 12 Jun 2016 00:29:59 +0200 Message-Id: <1465684199-12438-1-git-send-email-phdm@macqel.be> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <56E7FC02.50006@xs4all.nl> References: <56E7FC02.50006@xs4all.nl> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP add max_interval and step_interval to struct v4l2_subdev_frame_interval_enum. When filled correctly by the sensor driver, those fields must be used as follows by the intermediate level : struct v4l2_frmivalenum *fival; struct v4l2_subdev_frame_interval_enum fie; if (fie.max_interval.numerator == 0) { fival->type = V4L2_FRMIVAL_TYPE_DISCRETE; fival->discrete = fie.interval; } else if (fie.step_interval.numerator == 0) { fival->type = V4L2_FRMIVAL_TYPE_CONTINUOUS; fival->stepwise.min = fie.interval; fival->stepwise.max = fie.max_interval; } else { fival->type = V4L2_FRMIVAL_TYPE_STEPWISE; fival->stepwise.min = fie.interval; fival->stepwise.max = fie.max_interval; fival->stepwise.step = fie.step_interval; } Signed-off-by: Philippe De Muyter --- include/uapi/linux/v4l2-subdev.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/uapi/linux/v4l2-subdev.h b/include/uapi/linux/v4l2-subdev.h index dbce2b554..846dd36 100644 --- a/include/uapi/linux/v4l2-subdev.h +++ b/include/uapi/linux/v4l2-subdev.h @@ -127,7 +127,9 @@ struct v4l2_subdev_frame_interval_enum { __u32 height; struct v4l2_fract interval; __u32 which; - __u32 reserved[8]; + struct v4l2_fract max_interval; + struct v4l2_fract step_interval; + __u32 reserved[4]; }; /**