From patchwork Mon Feb 5 14:29:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Echtler X-Patchwork-Id: 10200531 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 092CA6056F for ; Mon, 5 Feb 2018 14:37:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EEA2128305 for ; Mon, 5 Feb 2018 14:37:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E346C28405; Mon, 5 Feb 2018 14:37:36 +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 8EC7C2851A for ; Mon, 5 Feb 2018 14:37:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752991AbeBEOhf (ORCPT ); Mon, 5 Feb 2018 09:37:35 -0500 Received: from butterbrot.org ([176.9.106.16]:41562 "EHLO butterbrot.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752937AbeBEOhb (ORCPT ); Mon, 5 Feb 2018 09:37:31 -0500 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 2DCA24AE0446; Mon, 5 Feb 2018 15:30:09 +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 5/5] add default control values as module parameters Date: Mon, 5 Feb 2018 15:29:41 +0100 Message-Id: <1517840981-12280-6-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 | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/input/touchscreen/sur40.c b/drivers/input/touchscreen/sur40.c index c4b7cf1..d612f3f 100644 --- a/drivers/input/touchscreen/sur40.c +++ b/drivers/input/touchscreen/sur40.c @@ -173,6 +173,14 @@ int sur40_v4l2_contrast = SUR40_CONTRAST_DEF; /* blacklevel */ int sur40_v4l2_gain = SUR40_GAIN_DEF; /* gain */ int sur40_v4l2_backlight = 1; /* preprocessor */ +/* module parameters */ +static uint irlevel = SUR40_BRIGHTNESS_DEF; +module_param(irlevel, uint, 0644); +MODULE_PARM_DESC(irlevel, "set default irlevel"); +static uint vsvideo = SUR40_VSVIDEO_DEF; +module_param(vsvideo, uint, 0644); +MODULE_PARM_DESC(vsvideo, "set default vsvideo"); + static const struct v4l2_pix_format sur40_pix_format[] = { { .pixelformat = V4L2_TCH_FMT_TU08, @@ -372,6 +380,11 @@ static void sur40_open(struct input_polled_dev *polldev) dev_dbg(sur40->dev, "open\n"); sur40_init(sur40); + + /* set default values */ + sur40_set_irlevel(sur40, irlevel); + sur40_set_vsvideo(sur40, vsvideo); + sur40_set_preprocessor(sur40, SUR40_BACKLIGHT_DEF); } /* Disable device, polling has stopped. */