Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757373AbbGUAHF (ORCPT ); Mon, 20 Jul 2015 20:07:05 -0400 Received: from mail-pa0-f42.google.com ([209.85.220.42]:35827 "EHLO mail-pa0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754156AbbGUAHD (ORCPT ); Mon, 20 Jul 2015 20:07:03 -0400 Date: Mon, 20 Jul 2015 17:06:58 -0700 From: Dmitry Torokhov To: Dudley Du Cc: mark.rutland@arm.com, robh+dt@kernel.org, rydberg@euromail.se, bleung@google.com, jmmahler@gmail.com, devicetree@vger.kernel.org, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1 3/7] input: cyapa: add proximity function support for gen5 and gen6 modules Message-ID: <20150721000658.GD15528@dtor-ws> References: <1434358897-24668-1-git-send-email-dudl@cypress.com> <1434358897-24668-4-git-send-email-dudl@cypress.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1434358897-24668-4-git-send-email-dudl@cypress.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 993 Lines: 30 Hi Dudley, On Mon, Jun 15, 2015 at 05:01:33PM +0800, Dudley Du wrote: > > +static void cyapa_pip_report_proximity(struct cyapa *cyapa, > + const struct cyapa_pip_report_data *report_data) > +{ > + struct input_dev *input = cyapa->input; > + u8 distance = report_data->report_head[PIP_PROXIMITY_DISTANCE_OFFSET] & > + PIP_PROXIMITY_DISTANCE_MASK; > + > + input_report_abs(input, ABS_MT_DISTANCE, distance); > + input_sync(input); It looks like the distance reported by the hardware is not per-contact (i.e. it can not tell that we had 2 fingers on surface and the 2nd one was lifted and is now hovering over the surface), so we should be using ABS_DISTANCE, not ABS_MT_DISTANCE. I can adjust it here, no need to resend. Thanks. -- Dmitry -- 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/