Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp624349ybb; Wed, 25 Mar 2020 06:36:09 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtFQvI/ezMvJ5ESllK9oFMwvTqPfupDuKnrKhU851MidkRaI0lpsRKTCoMCaHBaNi5V7dlE X-Received: by 2002:aca:dc45:: with SMTP id t66mr2506290oig.39.1585143369663; Wed, 25 Mar 2020 06:36:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585143369; cv=none; d=google.com; s=arc-20160816; b=qo0rek6DvJ5erMNlA8f1GLgPauxYH4LLd2mRpwNoKCYDH8bcz+sQVkKD7dAdW3ojqu 5dDRUabGKQmTFXLGnIwYRYYzgA6vr99TOTnN8eGUdQrMXPh50EHvM6nOUHX5RLzsikyK DL9vgRXaCh/X9Ic2eIywfxw2hDmJJtg8m+7CKLqqIydEeASWTDcw7ur9EoOlgTtA6D6A 2oygLpdo0GDami6p1gUTsKO+oE3OCnmWNL/7Rolxv6/SEh6WinA9ccsMTDPi7nKHQLt/ USfx0oVvN9fxPzv7ydWxXbs+grFNJGPaLY+8yl8AL9g537Ew0qW+YBy14RLjCpiAioz0 jmgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:ironport-sdr:ironport-sdr; bh=RGbP/e+/jlds1qig19Y2R3M7KPua2aQkYDKHcGZInJk=; b=jyN7JE7Dtw9VTC5tPQtER2ZBeTwieN5YhYL+5+/+Rmmpf8bCU9CKi5M6RZLZJEM1LL /+JD9mhxzfLlVnQDuIPqdH/ntltSQP2oamJlofLAwCUmDisVjvMY83ynzmf3m6vjFOf/ LwLsr0dCwi55IML30mFmW3XGDg4QAOxEyHui+0lximzyJtDl6263Qpk0veXISTBz+mKj zB3aaRsHwHhZMx5z6tmRTDuTwWf61Gjm9yOUtOYuNOYU/TrayHNLvNH6/spprvfKg9sl 074GCoPrJH0SUYADJxJWgZ4Ky5Nj+AQn1ryP9sshXQcnxFf1k2heqaMwBr4t7+6bHEzW SohA== 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 o203si11525488oig.1.2020.03.25.06.35.56; Wed, 25 Mar 2020 06:36:09 -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 S1727805AbgCYNfL (ORCPT + 99 others); Wed, 25 Mar 2020 09:35:11 -0400 Received: from esa2.mentor.iphmx.com ([68.232.141.98]:13562 "EHLO esa2.mentor.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727826AbgCYNfJ (ORCPT ); Wed, 25 Mar 2020 09:35:09 -0400 IronPort-SDR: 9YBJkiSsnAyolFvSnPZq2qy7hNBfINJ/zHzG8IK9X0421NxlyhfOQ1aCaj4wPSe+fdYyuhSV0U SYcz2MX4sMVoI/99lVtTphihQ9Y0cUbIVRpZduHxsVgwnF+xmzzyyVEBVvwYdRDhyydf0hzBih ZLsK63cOkmhEU65k4Hq1JwOyLwJOiwZO2OXeFMGHkVg5kFVsx6i6STT83Wa+ElveJLN9CLCq9S Gj4Msjb+2eZYoQ7eNu1l6jpD2PQY+pJjo0HBbHDU6CZp+A4SxvPqZWFpX42Dvm+R8XfR3xzGHo bJg= X-IronPort-AV: E=Sophos;i="5.72,304,1580803200"; d="scan'208";a="47010632" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa2.mentor.iphmx.com with ESMTP; 25 Mar 2020 05:35:08 -0800 IronPort-SDR: w9pTZagqLIHxe7aQyx/vYqfFOst/vTSsysOsccmpWhsG9cVITTX0H8MRZf0T97bun4U8AZV/aU qDvIZKOq7aul1/nTdBwL+UN7IhHwsfhriEJGy0fAbf3lYihttvZfPnlX+f4fcopUbZVgohKsVJ ewnpXgJvJnBjPLjNEWeFT5KhgSZ7DPqoeC+9AREV0aqdfFGhyFVRDYFKAANW4/rSK8kj0Cl9eF 7UoPMxSCJud0RLZvuo+racvQOwiVAfGrxYE5JekQa/9rRUtYqvEi/Tf1U6MdFP6YCz06a7B/ZZ yUU= From: Jiada Wang To: , , , , , CC: , , , , Subject: [PATCH v9 22/55] Input: atmel_mxt_ts - allow input name to be specified in platform data Date: Wed, 25 Mar 2020 06:33:01 -0700 Message-ID: <20200325133334.19346-23-jiada_wang@mentor.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200325133334.19346-1-jiada_wang@mentor.com> References: <20200325133334.19346-1-jiada_wang@mentor.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Nick Dyer Android systems identify the input device and map to IDC file by using the input device name. To avoid unnecessary deltas to the driver file, allow this to be set from the platform data. Signed-off-by: Nick Dyer (cherry picked from ndyer/linux/for-upstream commit cbf94a7bda754d2e1899d9f50313a0bccc91422d) [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 [jiada: Separate Documentation/ portion change to another commit] Signed-off-by: Jiada Wang --- drivers/input/touchscreen/atmel_mxt_ts.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c index d1865250f492..dfc20c0ca0a5 100644 --- a/drivers/input/touchscreen/atmel_mxt_ts.c +++ b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -336,6 +336,7 @@ struct mxt_data { char *fw_name; char *cfg_name; const char *pcfg_name; + const char *input_name; /* Cached parameters from object table */ u16 T5_address; @@ -2412,7 +2413,11 @@ static int mxt_initialize_input_device(struct mxt_data *data) if (!input_dev) return -ENOMEM; - input_dev->name = "Atmel maXTouch Touchscreen"; + if (data->input_name) + input_dev->name = data->input_name; + else + input_dev->name = "Atmel maXTouch Touchscreen"; + input_dev->phys = data->phys; input_dev->id.bustype = BUS_I2C; input_dev->dev.parent = dev; @@ -3653,6 +3658,8 @@ static int mxt_parse_device_properties(struct mxt_data *data) device_property_read_string(dev, "atmel,cfg_name", &data->pcfg_name); + device_property_read_string(dev, "atmel,input_name", &data->input_name); + if (device_property_present(dev, keymap_property)) { n_keys = device_property_count_u32(dev, keymap_property); if (n_keys <= 0) { -- 2.17.1