From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755841AbcFTQZX (ORCPT ); Mon, 20 Jun 2016 12:25:23 -0400 Received: from lb2-smtp-cloud2.xs4all.net ([194.109.24.25]:54671 "EHLO lb2-smtp-cloud2.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751646AbcFTQXd (ORCPT ); Mon, 20 Jun 2016 12:23:33 -0400 Subject: Re: [PATCH v4 8/9] Input: atmel_mxt_ts - add support for reference data To: Nick Dyer References: <1466172988-3698-1-git-send-email-nick.dyer@itdev.co.uk> <1466172988-3698-9-git-send-email-nick.dyer@itdev.co.uk> <5768152E.7070905@xs4all.nl> Cc: Dmitry Torokhov , 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 From: Hans Verkuil Message-ID: <57681853.9020703@xs4all.nl> Date: Mon, 20 Jun 2016 18:22:43 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.7.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/20/2016 06:18 PM, Nick Dyer wrote: > On 20/06/2016 17:09, Hans Verkuil wrote: >> On 06/17/2016 04:16 PM, Nick Dyer wrote: >>> @@ -2325,11 +2344,20 @@ static int mxt_vidioc_querycap(struct file *file, void *priv, >>> static int mxt_vidioc_enum_input(struct file *file, void *priv, >>> struct v4l2_input *i) >>> { >>> - if (i->index > 0) >>> + if (i->index >= MXT_V4L_INPUT_MAX) >>> return -EINVAL; >>> >>> i->type = V4L2_INPUT_TYPE_TOUCH_SENSOR; >>> - strlcpy(i->name, "Mutual References", sizeof(i->name)); >>> + >>> + switch (i->index) { >>> + case MXT_V4L_INPUT_REFS: >>> + strlcpy(i->name, "Mutual References", sizeof(i->name)); >>> + break; >>> + case MXT_V4L_INPUT_DELTAS: >>> + strlcpy(i->name, "Mutual Deltas", sizeof(i->name)); >> >> I don't think this name is very clear. I have no idea how to interpret "Mutual" >> in this context. > > "Mutual" is a touch domain specific term, it means the delta value is for > the capacitance between the horizontal and vertical lines at a particular > "node" on the touchscreen matrix, see > https://en.wikipedia.org/wiki/Touchscreen#Mutual_capacitance > > I'll put in a comment. As I mentioned in an earlier review, we need a v4l-touch interface description anyway. I think it might be useful to describe some of these touch-specific terms there. That way that could be a useful reference for end-users. Nobody reads comments, but people do read the spec (well, I do). Regards, Hans > >> >>> + break; >>> + } >>> + >>> return 0; >>> } >>> >>> @@ -2337,12 +2365,16 @@ static int mxt_set_input(struct mxt_data *data, unsigned int i) >>> { >>> struct v4l2_pix_format *f = &data->dbg.format; >>> >>> - if (i > 0) >>> + if (i >= MXT_V4L_INPUT_MAX) >>> return -EINVAL; >>> >>> + if (i == MXT_V4L_INPUT_DELTAS) >>> + f->pixelformat = V4L2_PIX_FMT_YS16; >>> + else >>> + f->pixelformat = V4L2_PIX_FMT_Y16; >> >> You probably need a V4L2_TOUCH_FMT_U16 or something for this as well. It certainly >> needs to be documented. > > OK, will change this. > > -- > To unsubscribe from this list: send the line "unsubscribe linux-media" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html >