From patchwork Wed Jun 22 22:08:33 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick Dyer X-Patchwork-Id: 9193809 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 E4E566075C for ; Wed, 22 Jun 2016 22:09:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CEF6E2841B for ; Wed, 22 Jun 2016 22:09:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C155528421; Wed, 22 Jun 2016 22:09:40 +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=unavailable 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 655B12841B for ; Wed, 22 Jun 2016 22:09:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751594AbcFVWI6 (ORCPT ); Wed, 22 Jun 2016 18:08:58 -0400 Received: from kdh-gw.itdev.co.uk ([89.21.227.133]:34360 "EHLO hermes.kdh.itdev.co.uk" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750997AbcFVWI5 (ORCPT ); Wed, 22 Jun 2016 18:08:57 -0400 Received: from localhost.localdomain (unknown [80.229.148.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by hermes.kdh.itdev.co.uk (Postfix) with ESMTPSA id C35C47F4D8; Wed, 22 Jun 2016 23:08:49 +0100 (BST) From: Nick Dyer To: Dmitry Torokhov , Hans Verkuil Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, Benjamin Tissoires , Benson Leung , Alan Bowens , Javier Martinez Canillas , Chris Healy , Henrik Rydberg , Andrew Duggan , James Chen , Dudley Du , Andrew de los Reyes , sheckylin@chromium.org, Peter Hutterer , Florian Echtler , mchehab@osg.samsung.com, nick.dyer@itdev.co.uk Subject: [PATCH v5 9/9] Input: sur40 - use new V4L2 touch input type Date: Wed, 22 Jun 2016 23:08:33 +0100 Message-Id: <1466633313-15339-10-git-send-email-nick.dyer@itdev.co.uk> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1466633313-15339-1-git-send-email-nick.dyer@itdev.co.uk> References: <1466633313-15339-1-git-send-email-nick.dyer@itdev.co.uk> 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: Nick Dyer --- drivers/input/touchscreen/sur40.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/input/touchscreen/sur40.c b/drivers/input/touchscreen/sur40.c index 880c40b..841e045 100644 --- a/drivers/input/touchscreen/sur40.c +++ b/drivers/input/touchscreen/sur40.c @@ -599,7 +599,7 @@ static int sur40_probe(struct usb_interface *interface, sur40->vdev.queue = &sur40->queue; video_set_drvdata(&sur40->vdev, sur40); - error = video_register_device(&sur40->vdev, VFL_TYPE_GRABBER, -1); + error = video_register_device(&sur40->vdev, VFL_TYPE_TOUCH, -1); if (error) { dev_err(&interface->dev, "Unable to register video subdevice."); @@ -763,7 +763,7 @@ static int sur40_vidioc_enum_input(struct file *file, void *priv, { if (i->index != 0) return -EINVAL; - i->type = V4L2_INPUT_TYPE_CAMERA; + i->type = V4L2_INPUT_TYPE_TOUCH; i->std = V4L2_STD_UNKNOWN; strlcpy(i->name, "In-Cell Sensor", sizeof(i->name)); i->capabilities = 0; @@ -794,7 +794,7 @@ static int sur40_vidioc_enum_fmt(struct file *file, void *priv, if (f->index != 0) return -EINVAL; strlcpy(f->description, "8-bit greyscale", sizeof(f->description)); - f->pixelformat = V4L2_PIX_FMT_GREY; + f->pixelformat = V4L2_TCH_FMT_TU08; f->flags = 0; return 0; } @@ -802,7 +802,7 @@ static int sur40_vidioc_enum_fmt(struct file *file, void *priv, static int sur40_vidioc_enum_framesizes(struct file *file, void *priv, struct v4l2_frmsizeenum *f) { - if ((f->index != 0) || (f->pixel_format != V4L2_PIX_FMT_GREY)) + if ((f->index != 0) || (f->pixel_format != V4L2_TCH_FMT_TU08)) return -EINVAL; f->type = V4L2_FRMSIZE_TYPE_DISCRETE; @@ -814,7 +814,7 @@ static int sur40_vidioc_enum_framesizes(struct file *file, void *priv, static int sur40_vidioc_enum_frameintervals(struct file *file, void *priv, struct v4l2_frmivalenum *f) { - if ((f->index > 1) || (f->pixel_format != V4L2_PIX_FMT_GREY) + if ((f->index > 1) || (f->pixel_format != V4L2_TCH_FMT_TU08) || (f->width != sur40_video_format.width) || (f->height != sur40_video_format.height)) return -EINVAL; @@ -903,7 +903,7 @@ static const struct video_device sur40_video_device = { }; static const struct v4l2_pix_format sur40_video_format = { - .pixelformat = V4L2_PIX_FMT_GREY, + .pixelformat = V4L2_TCH_FMT_TU08, .width = SENSOR_RES_X / 2, .height = SENSOR_RES_Y / 2, .field = V4L2_FIELD_NONE,