From patchwork Mon Feb 5 14:29:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Echtler X-Patchwork-Id: 10200525 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 A4139601A1 for ; Mon, 5 Feb 2018 14:37:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 63DE428305 for ; Mon, 5 Feb 2018 14:37:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5853128479; Mon, 5 Feb 2018 14:37:34 +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 2651E28305 for ; Mon, 5 Feb 2018 14:37:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753091AbeBEOhc (ORCPT ); Mon, 5 Feb 2018 09:37:32 -0500 Received: from butterbrot.org ([176.9.106.16]:41563 "EHLO butterbrot.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752461AbeBEOhb (ORCPT ); Mon, 5 Feb 2018 09:37:31 -0500 X-Greylist: delayed 460 seconds by postgrey-1.27 at vger.kernel.org; Mon, 05 Feb 2018 09:37:31 EST Received: from flunder.scc.uni-weimar.de (anna125.medien.uni-weimar.de [141.54.178.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by butterbrot.org (Postfix) with ESMTPSA id 33B8A4AE034C; Mon, 5 Feb 2018 15:30:06 +0100 (CET) From: Florian Echtler To: linux-media@vger.kernel.org, hverkuil@xs4all.nl Cc: linux-input@vger.kernel.org, modin@yuri.at, Florian Echtler Subject: [PATCH 2/5] add video control register definitions Date: Mon, 5 Feb 2018 15:29:38 +0100 Message-Id: <1517840981-12280-3-git-send-email-floe@butterbrot.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1517840981-12280-1-git-send-email-floe@butterbrot.org> References: <1517840981-12280-1-git-send-email-floe@butterbrot.org> Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Florian Echtler --- drivers/input/touchscreen/sur40.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/drivers/input/touchscreen/sur40.c b/drivers/input/touchscreen/sur40.c index 8375b06..0dbb004 100644 --- a/drivers/input/touchscreen/sur40.c +++ b/drivers/input/touchscreen/sur40.c @@ -149,6 +149,30 @@ struct sur40_image_header { #define SUR40_TOUCH 0x02 #define SUR40_TAG 0x04 +/* video controls */ +#define SUR40_BRIGHTNESS_MAX 0xFF +#define SUR40_BRIGHTNESS_MIN 0x00 +#define SUR40_BRIGHTNESS_DEF 0xFF + +#define SUR40_CONTRAST_MAX 0x0F +#define SUR40_CONTRAST_MIN 0x00 +#define SUR40_CONTRAST_DEF 0x0A + +#define SUR40_GAIN_MAX 0x09 +#define SUR40_GAIN_MIN 0x00 +#define SUR40_GAIN_DEF 0x08 + +#define SUR40_VSVIDEO_DEF 0x86 + +#define SUR40_BACKLIGHT_MAX 0x01 +#define SUR40_BACKLIGHT_MIN 0x00 +#define SUR40_BACKLIGHT_DEF 0x01 + +int sur40_v4l2_brightness = SUR40_BRIGHTNESS_DEF; /* infrared */ +int sur40_v4l2_contrast = SUR40_CONTRAST_DEF; /* blacklevel */ +int sur40_v4l2_gain = SUR40_GAIN_DEF; /* gain */ +int sur40_v4l2_backlight = 1; /* preprocessor */ + static const struct v4l2_pix_format sur40_pix_format[] = { { .pixelformat = V4L2_TCH_FMT_TU08,