Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752279Ab0LUSGL (ORCPT ); Tue, 21 Dec 2010 13:06:11 -0500 Received: from mail-gx0-f180.google.com ([209.85.161.180]:62221 "EHLO mail-gx0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751493Ab0LUSGJ convert rfc822-to-8bit (ORCPT ); Tue, 21 Dec 2010 13:06:09 -0500 MIME-Version: 1.0 In-Reply-To: <20101221165956.GA28702@polaris.bitmath.org> References: <1292852364-19127-1-git-send-email-rydberg@euromail.se> <1292852364-19127-3-git-send-email-rydberg@euromail.se> <4D10D75D.80400@canonical.com> <20101221165956.GA28702@polaris.bitmath.org> Date: Tue, 21 Dec 2010 12:06:08 -0600 Message-ID: Subject: Re: [PATCH 2/3] Input: synaptics - add multi-finger and semi-mt support From: Chris Bagwell To: Henrik Rydberg Cc: Chase Douglas , Dmitry Torokhov , Jiri Kosina , Takashi Iwai , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1821 Lines: 44 On Tue, Dec 21, 2010 at 10:59 AM, Henrik Rydberg wrote: >> > Reported-by: Tobyn Bertram >> > Not-yet-signed-off-by: Takashi Iwai >> > Not-yet-signed-off-by: Chase Douglas >> > Not-yet-signed-off-by: Chris Bagwell >> > Signed-off-by: Henrik Rydberg >> >> You can keep my SOB. > > Great, thanks. > >> > +static void set_slot(struct input_dev *dev, int slot, bool active, int x, int y) >> > +{ >> > + ? input_mt_slot(dev, slot); >> > + ? input_mt_report_slot_state(dev, MT_TOOL_FINGER, active); >> > + ? if (active) { >> > + ? ? ? ? ? input_report_abs(dev, ABS_MT_POSITION_X, x); >> > + ? ? ? ? ? input_report_abs(dev, ABS_MT_POSITION_Y, >> > + ? ? ? ? ? ? ? ? ? ? ? ? ? ?YMAX_NOMINAL + YMIN_NOMINAL - y); >> > + ? } >> > +} >> >> I take it that you feel MT_TOOL_FINGER should always be set, even if >> it's always the same as BTN_TOOL_*? I just want to be sure this is >> intended so we document it appropriately. > > Yes - the MT_TOOLs are only emitted when explicitly set in absbit, but > the internal interface always handles it. This is actually documented > in the code (and DocBook). That note is good guidance for developer side. Its also worth noting on app side that MT_TOOL_FINGER is a little special since its value is 0. In most common case, I think it will get filtered out where as BTN_TOOL_FINGER will always be sent. Since we can't yet query per slot ABS_MT_TOOL_TYPE, I guess apps have to just assume its a finger unless told otherwise? Chris -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/