From patchwork Sat Jun 11 22:31:10 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: 9171199 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 6CD8E60573 for ; Sat, 11 Jun 2016 22:40:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5F73121327 for ; Sat, 11 Jun 2016 22:40:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 53DC526490; Sat, 11 Jun 2016 22:40:26 +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 5170121327 for ; Sat, 11 Jun 2016 22:40:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752029AbcFKWkQ (ORCPT ); Sat, 11 Jun 2016 18:40:16 -0400 Received: from smtp2.macqel.be ([109.135.2.61]:57055 "EHLO smtp2.macqel.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751849AbcFKWkP (ORCPT ); Sat, 11 Jun 2016 18:40:15 -0400 X-Greylist: delayed 592 seconds by postgrey-1.27 at vger.kernel.org; Sat, 11 Jun 2016 18:40:15 EDT Received: from localhost (localhost [127.0.0.1]) by smtp2.macqel.be (Postfix) with ESMTP id EF500130F41; Sun, 12 Jun 2016 00:31:21 +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 QO60jRXUUSHc; Sun, 12 Jun 2016 00:31:20 +0200 (CEST) Received: from perdita.MACQEL (perdita.macqel [10.1.40.53]) by smtp2.macqel.be (Postfix) with ESMTP id 5496E130D59; Sun, 12 Jun 2016 00:31:20 +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 u5BMVH5m012552; Sun, 12 Jun 2016 00:31:19 +0200 Received: (from p6@localhost) by perdita.MACQEL (8.14.4/8.14.4/Submit) id u5BMVHxP012542; Sun, 12 Jun 2016 00:31:17 +0200 X-Authentication-Warning: perdita.MACQEL: p6 set sender to phdm@macq.eu using -f From: Philippe De Muyter To: linux-media@vger.kernel.org, steve_longerbeam@mentor.com Cc: Philippe De Muyter Subject: [PATCH 2/2] media: mx6-camif: add V4L2_FRMIVAL_TYPE_STEPWISE & _CONTINUOUS Date: Sun, 12 Jun 2016 00:31:10 +0200 Message-Id: <1465684270-12506-1-git-send-email-phdm@macqel.be> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1465684199-12438-1-git-send-email-phdm@macqel.be> References: <1465684199-12438-1-git-send-email-phdm@macqel.be> 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 Signed-off-by: Philippe De Muyter --- drivers/staging/media/imx6/capture/mx6-camif.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/drivers/staging/media/imx6/capture/mx6-camif.c b/drivers/staging/media/imx6/capture/mx6-camif.c index b36f9d1..137733e 100644 --- a/drivers/staging/media/imx6/capture/mx6-camif.c +++ b/drivers/staging/media/imx6/capture/mx6-camif.c @@ -1344,8 +1344,19 @@ static int vidioc_enum_frameintervals(struct file *file, void *priv, if (ret) return ret; - fival->type = V4L2_FRMIVAL_TYPE_DISCRETE; - fival->discrete = fie.interval; + 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; + } return 0; }