From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 33058C433E2 for ; Mon, 14 Sep 2020 03:39:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 02D83214F1 for ; Mon, 14 Sep 2020 03:39:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726028AbgINDju (ORCPT ); Sun, 13 Sep 2020 23:39:50 -0400 Received: from emcscan.emc.com.tw ([192.72.220.5]:22763 "EHLO emcscan.emc.com.tw" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725995AbgINDjs (ORCPT ); Sun, 13 Sep 2020 23:39:48 -0400 X-IronPort-AV: E=Sophos;i="5.56,253,1539619200"; d="scan'208";a="37297016" Received: from unknown (HELO webmail.emc.com.tw) ([192.168.10.1]) by emcscan.emc.com.tw with ESMTP; 14 Sep 2020 11:39:44 +0800 Received: from 192.168.10.23 by webmail.emc.com.tw with MailAudit ESMTP Server V5.0(47158:0:AUTH_RELAY) (envelope-from ); Mon, 14 Sep 2020 11:39:42 +0800 (CST) Received: from 192.168.55.71 by webmail.emc.com.tw with Mail2000 ESMTPA Server V7.00(2482:1:AUTH_LOGIN) (envelope-from ); Mon, 14 Sep 2020 11:39:40 +0800 (CST) From: "Johnny.Chuang" To: "'Harry Cutts'" , "'Johnny Chuang'" Cc: "'Dmitry Torokhov'" , "'Benjamin Tissoires'" , "'Peter Hutterer'" , "'lkml'" , "'linux-input'" , "'James Chen'" , "'Jennifer Tsai'" , "'Paul Liang'" , "'Jeff Chuang'" References: <1598581195-9874-1-git-send-email-johnny.chuang.emc@gmail.com> In-Reply-To: Subject: RE: [PATCH v3] Input: elants_i2c - Report resolution of ABS_MT_TOUCH_MAJOR by FW information. Date: Mon, 14 Sep 2020 11:39:39 +0800 Message-ID: <002a01d68a48$ad112a30$07337e90$@emc.com.tw> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQI77ytWzSZun9942hZafipM5V6HSAGb0KaPqI/UJFA= Content-Language: zh-tw x-dg-ref: PG1ldGE+PGF0IG5tPSJib2R5LnR4dCIgcD0iYzpcdXNlcnNcMDUwMTBcYXBwZGF0YVxyb2FtaW5nXDA5ZDg0OWI2LTMyZDMtNGE0MC04NWVlLTZiODRiYTI5ZTM1Ylxtc2dzXG1zZy1lYThjZjEwZS1mNjNiLTExZWEtOGZkOC03YzVjZjg3NDk0NzhcYW1lLXRlc3RcZWE4Y2YxMTAtZjYzYi0xMWVhLThmZDgtN2M1Y2Y4NzQ5NDc4Ym9keS50eHQiIHN6PSIyODA3IiB0PSIxMzI0NDUyODM3OTc2ODAxNzkiIGg9IkNOa084QUpoeElCTEFzRi9aTEpsbTcxelJwOD0iIGlkPSIiIGJsPSIwIiBibz0iMSIvPjwvbWV0YT4= x-dg-rorf: true Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Thu, 27 Aug 2020 at 19:20, Johnny Chuang > wrote: > > > > This patch adds a new behavior to report touch major resolution based > > on information provided by firmware. > > > > In initial process, driver acquires touch information from touch ic. > > It contains one byte about the resolution value of ABS_MT_TOUCH_MAJOR. > > Touch driver will report touch major resolution by this information. > > > > Signed-off-by: Johnny Chuang > > Thanks Johnny! > > Reviewed-by: Harry Cutts > > Harry Cutts > Chrome OS Touch/Input team > Hi Sirs, Can you help to review this patch? > > --- > > Changes in v2: > > - register a real resolution value from firmware, > > instead of hardcoding resolution value as 1 by flag. > > Changes in v3: > > - modify git log message from flag to real value. > > - modify driver comment from flag to real value. > > --- > > drivers/input/touchscreen/elants_i2c.c | 6 ++++++ > > 1 file changed, 6 insertions(+) > > > > diff --git a/drivers/input/touchscreen/elants_i2c.c > > b/drivers/input/touchscreen/elants_i2c.c > > index b0bd5bb..661a3ee 100644 > > --- a/drivers/input/touchscreen/elants_i2c.c > > +++ b/drivers/input/touchscreen/elants_i2c.c > > @@ -151,6 +151,7 @@ struct elants_data { > > > > bool wake_irq_enabled; > > bool keep_power_in_suspend; > > + u8 report_major_resolution; > > > > /* Must be last to be used for DMA operations */ > > u8 buf[MAX_PACKET_SIZE] ____cacheline_aligned; @@ -459,6 > > +460,9 @@ static int elants_i2c_query_ts_info(struct elants_data *ts) > > rows = resp[2] + resp[6] + resp[10]; > > cols = resp[3] + resp[7] + resp[11]; > > > > + /* get report resolution value of ABS_MT_TOUCH_MAJOR */ > > + ts->report_major_resolution = resp[16]; > > + > > /* Process mm_to_pixel information */ > > error = elants_i2c_execute_command(client, > > get_osr_cmd, > > sizeof(get_osr_cmd), @@ -1325,6 +1329,8 @@ static int > elants_i2c_probe(struct i2c_client *client, > > 0, MT_TOOL_PALM, 0, 0); > > input_abs_set_res(ts->input, ABS_MT_POSITION_X, ts->x_res); > > input_abs_set_res(ts->input, ABS_MT_POSITION_Y, ts->y_res); > > + if (ts->report_major_resolution > 0) > > + input_abs_set_res(ts->input, ABS_MT_TOUCH_MAJOR, > > + ts->report_major_resolution); > > > > touchscreen_parse_properties(ts->input, true, &ts->prop); > > > > -- > > 2.7.4 > >