Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp1367785ybj; Thu, 7 May 2020 23:00:59 -0700 (PDT) X-Google-Smtp-Source: APiQypIoZo12qZn4bxMTIPE6gC/smPH/JC+2EiW8fW3lGJixxQJ657UEFwTqP5rdg7mTrZwqrlRr X-Received: by 2002:a17:906:49c7:: with SMTP id w7mr516036ejv.29.1588917658952; Thu, 07 May 2020 23:00:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588917658; cv=none; d=google.com; s=arc-20160816; b=FOfJK2+UCs84nFd75Hop0Kd5njMdGxdLzD3RMCg8xtNeIeAZaRT4VqIkRGFwWzNfpg onLLjpN6IqswyFexqkjIt4ysmSsKmu11zCwxYiIxpiX9Tim+0N1e6U8XqXTzEx5rOb3a JU/z/HxkP7rQJPO6ftwglGM+aO0L0RpcSPEs2V/sb3y9Xe/wZ4KcEHxXVB8lo+Fo1xrx GiiuvzZk2Lbu/1D5S+eINkLYXxIFyR5hCKxTOYXZiWlEt9td+JVu3hRHkhHPyqWRNyAf IYUmtKY/x/FGskHAwNMYae/B/J4IPEVoRPXeMrsVMKY3F/1pFutNzaZZ/OpTwDDHOW9C GNbg== 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=SdkwJNaJefqJ/ZJjKm4kS6H3qLqZVzmBdLqrBHeXqbM=; b=q/pZHxVEJbQ7ugBmqBpRF5O9WnfGK0S9nx0lKs4IO9qZ2Dl7mlFF6KAbf4u6M3EWWq MsyDSN0nzhfLYMJ9NkYqPt2dicgoYWyBZYoMH926rA8KDKnnsvxE/4vBEl70AvvuBP0g JybpmNYkFcczaCXaz4Bf9V+t0LD/GXvp6T6KJa3M/IAFdN5QiuG3nUy9buA/Kg8jUUZk OUHPy2sUqEIkcP9A+rvW0phgbKK3C9p+CwGyyDFcbYUVWsysdUff5aHcNUNtCDySxmZv jyBVv24ORMvX/5tkwn87BZxTk7UVXQ6/MFMpn/zI92frJbeyOUDQSZRC70NoXoGZwf+l NRdg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n8si415289edt.33.2020.05.07.23.00.35; Thu, 07 May 2020 23:00:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727975AbgEHF6d (ORCPT + 99 others); Fri, 8 May 2020 01:58:33 -0400 Received: from esa1.mentor.iphmx.com ([68.232.129.153]:38715 "EHLO esa1.mentor.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727917AbgEHF6a (ORCPT ); Fri, 8 May 2020 01:58:30 -0400 IronPort-SDR: 8J2n8sOBScXBMzr2JbISd2APSQOVuJR7j7PpnlAXbQqv3VUGqqunTJ4Qj4ygY2SETPsrzQGHhN kT0sjmLoSQlPDKuSCZBzE6xSCZAcnu7bfLnceuaMlZxCkqmNkkSvyoLKy5ygbwDGKs4V8iK00x 3bUkS0JoFnEGznIburhZ4/juwTB0NL6CYLO1JC/nJ/JsW8KRQYLCGiGMfhS2O2uyWcOco4UhcQ pE12/OSeDDyL5gZQT/4VVzSev5/hYfy4B47g/MB7zA6VLtK0IQUQeEdzuQK3ngEawjC8TZ0dFi hv0= X-IronPort-AV: E=Sophos;i="5.73,366,1583222400"; d="scan'208";a="50670088" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa1.mentor.iphmx.com with ESMTP; 07 May 2020 21:58:27 -0800 IronPort-SDR: ctqpM7UKBBCRvCgdbccvx9b28IutVdv0e2vDOz+kqyQTE9xOqdyikdV8DnKwXDF1Sghxg27jRk VoU6L5M8PA0F4c+HHc+kOuItG+nroRo8ozM7MwpGgLK6eKKRN6d0gP3tG3HZcDP0iXxVG9S5Vr QC6hKfjcEd9QjfndDf0ksLZo+cOYICoj2JStpq8C3Pew1p8meVAH7xJglVROGUcI8AJoEnql5r LsSC6y+Y3QYdHJUVM9bn1HufKKFeFgQi6MM445K8CehDj++aSX885p+iuJaGGWbntualo3HU/r voo= From: Jiada Wang To: , , , , CC: , , , , Subject: [PATCH v11 23/56] Input: atmel_mxt_ts - allow input name to be specified in platform data Date: Thu, 7 May 2020 22:56:23 -0700 Message-ID: <20200508055656.96389-24-jiada_wang@mentor.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200508055656.96389-1-jiada_wang@mentor.com> References: <20200508055656.96389-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 85b903b8d5c9..affd2bf32969 100644 --- a/drivers/input/touchscreen/atmel_mxt_ts.c +++ b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -337,6 +337,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; @@ -2413,7 +2414,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; @@ -3649,6 +3654,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