Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1445504ybb; Thu, 9 Apr 2020 02:13:54 -0700 (PDT) X-Google-Smtp-Source: APiQypL5XyBZO8PHiVtcxleLBycmF1AA4tVK2UOC+CpzR8fPVaSDWWRDWKmpBM1pvz3KvRd8Xc7r X-Received: by 2002:a4a:271d:: with SMTP id l29mr9201191oof.18.1586423634242; Thu, 09 Apr 2020 02:13:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586423634; cv=none; d=google.com; s=arc-20160816; b=xyoT4toL2JpDwz0oNW5kcHdjmuvmwTsIshjzoJprvAbhGOnz302mjDwUgkt9/cxio2 Dzgf97zt+Q2E/HgE+zYqjn1pf+ypojjKrdG0EGNEznP6XC3hhMBhYUkF41aYN/QveFlG UIjcE7xzQ9wG69NRNmtOaPEq1aRkSdrxZjMaOh8VKVYFj+3u+RXJfTkeudrqKphAtK8n YBE4JmGa75xid5AGnenHb/fXFfSg7X96FYAb5gIResW/f4jQAaQTwDDLdPjw3s00qCAx hIxs7KIFjgR2Slje/4qb6M3PtpsHmCyALo9Bqfm+ztwIT1haW0Gj1c35NAVXaJyH+3z7 oYHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:ironport-sdr:ironport-sdr; bh=5jqubEGlRrlQqEzm5jB0dilysf8EqP6l9/bO46RGKd4=; b=LDN1kTw2eL5ssgwOI+1uw2kVuxiutI/oizRa3bUoxZSQwuPd5FCCgTs4oRUGofdosY jBgOUG2ocWgNZO3irdRsEMYpRsN/A+5KQC8SS/PM3mfZl+L9R3exIuPvoSF0/7ZND2oV 0oaujvQDGvbrSrXPmeHLqDe25eS8NS5f2Z42d6f2OAo8wcqeZyCXu8lmPnk+pdyP+L25 OAl+2o+4LK4UR7bUCYiAKyTD9fL3wAVTlFL0VgsN0rpUnIZxfoSCenWpAv/ew0YPbJXW G1bhowZeve0Exfkv3aSwOLdtXw/9zXcOmsjBKqf0VXDzMqdMHK1Y3HcwwphtDnsB8dN+ TANw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w63si3966033otb.59.2020.04.09.02.13.39; Thu, 09 Apr 2020 02:13:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726574AbgDIJLm (ORCPT + 99 others); Thu, 9 Apr 2020 05:11:42 -0400 Received: from esa4.mentor.iphmx.com ([68.232.137.252]:40456 "EHLO esa4.mentor.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725783AbgDIJLl (ORCPT ); Thu, 9 Apr 2020 05:11:41 -0400 IronPort-SDR: ct4va3PXa6gQfQJrKzxknWr6fH1WT2JNNMAOzeV/1M1PsC/1mVNkhXuQIJWdJgyzmbPWZ77D+N 3uVFVCRQr9jqWjYcGTRNA1blOzKTtupDioCFPL9QICYrMNL3uTeJWFatPYcFN0tB/lG5BPDJj9 wBowsRYKJo59K0taIx5dbL1B2ew4d6G7UQytJZo97gqEw65jS8aRxo7qRtAvDYh/6RpOunJgTB W23lt5RDa4o32xFcLFgGdi93+bBymZFO6JY7OkHixQXuSOzJbFzeI4ek41VzzUvWqI7nx43+Qd O4w= X-IronPort-AV: E=Sophos;i="5.72,362,1580803200"; d="scan'208";a="47642037" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa4.mentor.iphmx.com with ESMTP; 09 Apr 2020 01:11:41 -0800 IronPort-SDR: /UoAsK/CNHGHlgO2hG4TioUfunh1NUNLEFQIgZ+Wo5sclgKRILoC0zkz8qhgagkWBS4duRMpur cqXAjXItpdvzSanhGo2+9IUV9r8kDhzBkxy7ZPpkfTgCm8hOor+bEOwq9Sb3eDLu0MocZgh625 0REFH6kmnviSmCnaj6M6zCeeJOX9IDL5ZF/+IWer9ysbHj8e3TXHvNZzRZ1qwLUfpDI7qyx1eb RvHV9wxa6kdqJ3W00kW7A0HhNIAUdjB1nDw1KZw/GheMKSBwgG9/qzzsxrUPV/TN3q+YrGV40R kMg= Subject: Re: [PATCH v10 20/55] Input: atmel_mxt_ts - handle cfg filename via pdata/sysfs To: Dmitry Osipenko , , , , , CC: , , , References: <20200331105051.58896-1-jiada_wang@mentor.com> <20200331105051.58896-21-jiada_wang@mentor.com> From: "Wang, Jiada" Message-ID: <9dc72d14-f6fe-45b7-1550-f1f25d841ef2@mentor.com> Date: Thu, 9 Apr 2020 18:11:35 +0900 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SVR-ORW-MBX-06.mgc.mentorg.com (147.34.90.206) To svr-orw-mbx-01.mgc.mentorg.com (147.34.90.201) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Dmitrij On 2020/04/07 23:56, Dmitry Osipenko wrote: > 31.03.2020 13:50, Jiada Wang пишет: >> From: Nick Dyer >> >> There may be multiple maXTouch chips on a single device which will require >> different configuration files. Add a platform data value for the >> configuration filename. >> >> Add sysfs entry to write configuration file if the platform data is not >> set. >> >> Split out the object initialisation code from mxt_initialize() into >> mxt_configure_objects() to allow this. >> >> Signed-off-by: Nick Dyer >> Acked-by: Yufeng Shen >> (cherry picked from ndyer/linux/for-upstream commit 71a2a4d1954460b949a16b607f72bafab294ca79) >> [gdavis: Resolve forward port conflicts due to applying upstream >> commit 96a938aa214e ("Input: atmel_mxt_ts - remove platform >> data support").] >> Signed-off-by: George G. Davis >> [gdavis: Squash fix from Vladimir Zapolskiy: >> - Input: atmel_mxt_ts - fix error paths in mxt_configure_objects()] >> Signed-off-by: Vladimir Zapolskiy >> [jiada: Separate Documentation/ portion change to another commit >> Rename mxt_update_cfg_store to update_cfg_store >> Replace DEVICE_ATTR with DEVICE_ATTR_WO] >> Signed-off-by: Jiada Wang >> --- >> drivers/input/touchscreen/atmel_mxt_ts.c | 109 +++++++++++++++++++---- >> 1 file changed, 94 insertions(+), 15 deletions(-) >> >> diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c >> index 720574417219..d1865250f492 100644 >> --- a/drivers/input/touchscreen/atmel_mxt_ts.c >> +++ b/drivers/input/touchscreen/atmel_mxt_ts.c >> @@ -34,7 +34,6 @@ >> #include >> >> /* Configuration file */ >> -#define MXT_CFG_NAME "maxtouch.cfg" >> #define MXT_CFG_MAGIC "OBP_RAW V1" > ... > >> static void mxt_input_sync(struct mxt_data *data) >> { >> - input_mt_report_pointer_emulation(data->input_dev, >> - data->t19_num_keys); >> - input_sync(data->input_dev); >> + if (data->input_dev) { >> + input_mt_report_pointer_emulation(data->input_dev, >> + data->t19_num_keys); >> + input_sync(data->input_dev); >> + } >> } > > Looks like this hunk shouldn't belong to this patch. yes, this part of change squash fix from ndyer/linux/for-upstream commit c909ada856861f305653b127db3ea0fa60264331 - Input: atmel_mxt_ts - check data->input_dev is not null in mxt_input_sync() seems due to some mistake, commit description about the squash, start to be missing from v6 patch-set I will separate it back into a single commit > > ... >> + if (data->pcfg_name) >> + mxt_update_file_name(&data->client->dev, >> + &data->cfg_name, >> + data->pcfg_name, >> + strlen(data->pcfg_name)); > > This looks wrong to me because I think the cfg_name should fall back to > "maxtouch.cfg" if atmel,cfg_name isn't specified in device-tree, > otherwise this commit may break devices that use an older device-tree. > I agree with you, in next version, I will update this patch to also be compatible with legacy cfg name "maxtouch.cfg" Thanks, Jiada