From patchwork Wed May 28 09:00:38 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sakari Ailus X-Patchwork-Id: 4253711 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 3246CBF90B for ; Wed, 28 May 2014 09:01:13 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0C42220155 for ; Wed, 28 May 2014 09:01:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2A1DD20125 for ; Wed, 28 May 2014 09:01:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932220AbaE1JBB (ORCPT ); Wed, 28 May 2014 05:01:01 -0400 Received: from mga03.intel.com ([143.182.124.21]:57400 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932218AbaE1JA6 (ORCPT ); Wed, 28 May 2014 05:00:58 -0400 Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga101.ch.intel.com with ESMTP; 28 May 2014 02:00:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.98,926,1392192000"; d="scan'208";a="437950484" Received: from paasikivi.fi.intel.com ([10.237.72.42]) by azsmga001.ch.intel.com with ESMTP; 28 May 2014 02:00:41 -0700 Received: from nauris.fi.intel.com (nauris.localdomain [192.168.240.2]) by paasikivi.fi.intel.com (Postfix) with ESMTP id 7DB9920297; Wed, 28 May 2014 12:00:40 +0300 (EEST) Received: by nauris.fi.intel.com (Postfix, from userid 1000) id DD79C200DE; Wed, 28 May 2014 12:00:38 +0300 (EEST) From: Sakari Ailus To: linux-media@vger.kernel.org Cc: laurent.pinchart@ideasonboard.com Subject: [PATCH 1/1] smiapp: Add driver-specific control class, test pattern controls Date: Wed, 28 May 2014 12:00:38 +0300 Message-Id: <1401267638-7606-1-git-send-email-sakari.ailus@linux.intel.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1401194628-31679-1-git-send-email-sakari.ailus@linux.intel.com> References: <1401194628-31679-1-git-send-email-sakari.ailus@linux.intel.com> 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.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, 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 Add smiapp driver specific control sub-class for test pattern controls. More controls are expected since a fair amount of the standard functionality is still unsupported. There are sensor model specific functionality as well and expectedly thus also sensor specific controls. So reserve 128 controls for this driver. This patch also adds test pattern controls for the four colour components. Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil --- This patch comes before the previous patch I sent to the thread. I missed this when sending it. include/uapi/linux/smiapp.h | 34 ++++++++++++++++++++++++++++++++++ include/uapi/linux/v4l2-controls.h | 4 ++++ 2 files changed, 38 insertions(+) create mode 100644 include/uapi/linux/smiapp.h diff --git a/include/uapi/linux/smiapp.h b/include/uapi/linux/smiapp.h new file mode 100644 index 0000000..116fc69 --- /dev/null +++ b/include/uapi/linux/smiapp.h @@ -0,0 +1,34 @@ +/* + * include/media/smiapp.h + * + * Generic driver for SMIA/SMIA++ compliant camera modules + * + * Copyright (C) 2014 Intel Corporation + * Contact: Sakari Ailus + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + */ + +#ifndef __UAPI_LINUX_SMIAPP_H_ +#define __UAPI_LINUX_SMIAPP_H_ + +#define V4L2_SMIAPP_TEST_PATTERN_MODE_DISABLED 0 +#define V4L2_SMIAPP_TEST_PATTERN_MODE_SOLID_COLOUR 1 +#define V4L2_SMIAPP_TEST_PATTERN_MODE_COLOUR_BARS 2 +#define V4L2_SMIAPP_TEST_PATTERN_MODE_COLOUR_BARS_GREY 3 +#define V4L2_SMIAPP_TEST_PATTERN_MODE_PN9 4 + +#define V4L2_CID_SMIAPP_TEST_PATTERN_RED (V4L2_CID_USER_SMIAPP_BASE | 0x01) +#define V4L2_CID_SMIAPP_TEST_PATTERN_GREENR (V4L2_CID_USER_SMIAPP_BASE | 0x02) +#define V4L2_CID_SMIAPP_TEST_PATTERN_BLUE (V4L2_CID_USER_SMIAPP_BASE | 0x03) +#define V4L2_CID_SMIAPP_TEST_PATTERN_GREENB (V4L2_CID_USER_SMIAPP_BASE | 0x04) + +#endif /* __UAPI_LINUX_SMIAPP_H_ */ diff --git a/include/uapi/linux/v4l2-controls.h b/include/uapi/linux/v4l2-controls.h index 2ac5597..8b5502f 100644 --- a/include/uapi/linux/v4l2-controls.h +++ b/include/uapi/linux/v4l2-controls.h @@ -169,6 +169,10 @@ enum v4l2_colorfx { * We reserve 16 controls for this driver. */ #define V4L2_CID_USER_SAA7134_BASE (V4L2_CID_USER_BASE + 0x1060) +/* The base for the smiapp driver controls. See include/media/smiapp.h + * for the list of controls. 128 controls are reserved for this driver. */ +#define V4L2_CID_USER_SMIAPP_BASE (V4L2_CID_USER_BASE + 0x1070) + /* MPEG-class control IDs */ /* The MPEG controls are applicable to all codec controls * and the 'MPEG' part of the define is historical */