From patchwork Sun Apr 24 21:08:01 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ivaylo Dimitrov X-Patchwork-Id: 8921551 Return-Path: X-Original-To: patchwork-linux-media@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 B06159F1C1 for ; Sun, 24 Apr 2016 21:10:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BE5DF20219 for ; Sun, 24 Apr 2016 21:10:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D1F8A2022D for ; Sun, 24 Apr 2016 21:10:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753254AbcDXVKR (ORCPT ); Sun, 24 Apr 2016 17:10:17 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:34116 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753198AbcDXVKP (ORCPT ); Sun, 24 Apr 2016 17:10:15 -0400 Received: by mail-wm0-f66.google.com with SMTP id n3so20027442wmn.1 for ; Sun, 24 Apr 2016 14:10:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=sMopDshZq4T8vt5PVn7VaKE1CTEYFoRnRE0QXjaiCXE=; b=NjNcM7p7LR/PN19bkw1CFQXlORcpzGtzbL0Mre9erCuBtnCtRP61as0go/x5CXAPCC pKRrcZeFtJExNyYKH6t7GJNfdvxFyV46WkZqS1VkpNRiEteg8mcgIUHlrZ7CLISVmvyd fch4lP14hLEPppmFy7APapeU7GXl/oh6VqztR/68NBOj1Z5S+YTpKmATPdqv7qNGToPn bBorA2/IO2TA01C2X0juv1K9T7kjB8zPbTfrOWn7pb+IghBYJAe8i5jtxP6Me5ECt6WK xJEUd0a142yjyy7MscH+pzcL+cYgChHtX5FP/HWKwGcgjP5pMpjNQurAiL0XxTVrxA6j REcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=sMopDshZq4T8vt5PVn7VaKE1CTEYFoRnRE0QXjaiCXE=; b=Zig3SJgvovb9o/B7HPbfnd+2PbQcKqBlBTzIY25Th40tMtX00pZKCzvjnPtIhCwrNE ABGrj+j6/CAANQS0gAtbGpfRX7UEAMFnN6eNaWEsRCjEahRLfoVXV4ibyt8+SV2h6jog a5qqO+/08BDb5eUisLEcoxWbLOeQ0OI/McYBJjBcPSOMyh0wAx1YZNi5tfSemRTYaooB S9XtvK60bP5Ra+LUNbrkruooi45wllVL5o/1jUTN3xpTAAYagYFEtxzoYptU3ZVkd7rs 6Ah9nUyjcmRw20NhtrS3Rs0o2OiWzzxAXqwvIuaC2EdjisWk3JAmOE0X7KvT3rGXQs7x q2Wg== X-Gm-Message-State: AOPr4FWeL/YLQ8EDyYDPLLMaANRtzU9uG73ZLhVnoOwkpvoZvUo0Cp3auIAQ5pCw7yl91A== X-Received: by 10.28.9.139 with SMTP id 133mr8173572wmj.72.1461532213892; Sun, 24 Apr 2016 14:10:13 -0700 (PDT) Received: from localhost.localdomain ([46.249.74.23]) by smtp.gmail.com with ESMTPSA id b2sm15440182wmb.9.2016.04.24.14.10.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 24 Apr 2016 14:10:13 -0700 (PDT) From: Ivaylo Dimitrov To: sakari.ailus@iki.fi Cc: sre@kernel.org, pali.rohar@gmail.com, pavel@ucw.cz, linux-media@vger.kernel.org, "Tuukka.O Toivonen" Subject: [RFC PATCH 01/24] V4L fixes Date: Mon, 25 Apr 2016 00:08:01 +0300 Message-Id: <1461532104-24032-2-git-send-email-ivo.g.dimitrov.75@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1461532104-24032-1-git-send-email-ivo.g.dimitrov.75@gmail.com> References: <20160420081427.GZ32125@valkosipuli.retiisi.org.uk> <1461532104-24032-1-git-send-email-ivo.g.dimitrov.75@gmail.com> MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, 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: "Tuukka.O Toivonen" Squashed from the following upstream commits: V4L: Create control class for sensor mode V4L: add ad5820 focus specific custom controls V4L: add V4L2_CID_TEST_PATTERN V4L: Add V4L2_CID_MODE_OPSYSCLOCK for reading output system clock Signed-off-by: Tuukka Toivonen Signed-off-by: Pali Rohár Acked-by: Pavel Machek --- include/uapi/linux/v4l2-controls.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/include/uapi/linux/v4l2-controls.h b/include/uapi/linux/v4l2-controls.h index b6a357a..23011cc 100644 --- a/include/uapi/linux/v4l2-controls.h +++ b/include/uapi/linux/v4l2-controls.h @@ -62,6 +62,7 @@ #define V4L2_CTRL_CLASS_FM_RX 0x00a10000 /* FM Receiver controls */ #define V4L2_CTRL_CLASS_RF_TUNER 0x00a20000 /* RF tuner controls */ #define V4L2_CTRL_CLASS_DETECT 0x00a30000 /* Detection controls */ +#define V4L2_CTRL_CLASS_MODE 0x00a40000 /* Sensor mode information */ /* User-class control IDs */ @@ -974,4 +975,20 @@ enum v4l2_detect_md_mode { #define V4L2_CID_DETECT_MD_THRESHOLD_GRID (V4L2_CID_DETECT_CLASS_BASE + 3) #define V4L2_CID_DETECT_MD_REGION_GRID (V4L2_CID_DETECT_CLASS_BASE + 4) +/* SMIA-type sensor information */ +#define V4L2_CID_MODE_CLASS_BASE (V4L2_CTRL_CLASS_MODE | 0x900) +#define V4L2_CID_MODE_CLASS (V4L2_CTRL_CLASS_MODE | 1) +#define V4L2_CID_MODE_FRAME_WIDTH (V4L2_CID_MODE_CLASS_BASE+1) +#define V4L2_CID_MODE_FRAME_HEIGHT (V4L2_CID_MODE_CLASS_BASE+2) +#define V4L2_CID_MODE_VISIBLE_WIDTH (V4L2_CID_MODE_CLASS_BASE+3) +#define V4L2_CID_MODE_VISIBLE_HEIGHT (V4L2_CID_MODE_CLASS_BASE+4) +#define V4L2_CID_MODE_PIXELCLOCK (V4L2_CID_MODE_CLASS_BASE+5) +#define V4L2_CID_MODE_SENSITIVITY (V4L2_CID_MODE_CLASS_BASE+6) +#define V4L2_CID_MODE_OPSYSCLOCK (V4L2_CID_MODE_CLASS_BASE+7) + +/* Control IDs specific to the AD5820 driver as defined by V4L2 */ +#define V4L2_CID_FOCUS_AD5820_BASE (V4L2_CTRL_CLASS_CAMERA | 0x10af) +#define V4L2_CID_FOCUS_AD5820_RAMP_TIME (V4L2_CID_FOCUS_AD5820_BASE+0) +#define V4L2_CID_FOCUS_AD5820_RAMP_MODE (V4L2_CID_FOCUS_AD5820_BASE+1) + #endif