Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp5828667ybv; Wed, 12 Feb 2020 00:49:06 -0800 (PST) X-Google-Smtp-Source: APXvYqzafzNm/JYtJJIHBhiNID0lgjesHa+VppaFqRwUcdm/HdgEM4sp5Q/dOZiezKR09vGQQQYP X-Received: by 2002:a9d:7304:: with SMTP id e4mr7803545otk.99.1581497346208; Wed, 12 Feb 2020 00:49:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581497346; cv=none; d=google.com; s=arc-20160816; b=kucykCeMdYUo7dHqgDeIRttc4vlSSaCS6+t0c+azqo+v3Z9UhjcedCizPzTkD+plC5 I2Cq9VleW7y3mqJiZIucJC25rGGn4VMqVsQ8sNg7MTIBHgjaG3JgwXtTT375kzlWHUjw mJLOKHPsdVaJbABEbOma7BRCufyAA5XMylU02fFQke0L0Egi9MsFGvbTJfhjQu3nsD3J bXfXNorpAHUHk1eoQT9QJFZ+Yng3BieYfil30srIN72l17UQ7w8gP7kVCBJm6Z+0zQ7F nqL8XMbH+8ZXzRDUXo9R05o24gCJw0DOpYVXJg4PArbgtW9whni366pFFixkzWqbmYLh btog== 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=NdWUZ2revJ8c8isHNJkOU2koO7yCWQpY7ssUzPKSFyk=; b=pfPy0afKW60zuUa/8iZGCY2iihT5W5orddFMSQDvTQGdGVQLYPfLqAon+HF13MrfPz dHGSC2LAMz+sjfiP4qHk7NFXRKfD3o5Te95q1TBe3xdrWuvgHOo1EqOsFQBMSySumKp5 ZBgSMBIVUO++xhDIX2XY9FEtPSoWOX1M7Z8c9wRrX4MzpjEjkrCHAX3EFcGfo87llWnM 74xLn65FUSfGxbrsVGG2JWSntLZHRVP32XW1d/sXPrFaeXDkanYFVOnZsn9dc889jM/w MFIKB1JDTzWv4965qIaagYjpkrBs413FfQYaLIblz0bLeKUT/EI+Uhz5G7jshG5HqQbD iOHQ== 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 19si2981448oiq.128.2020.02.12.00.48.53; Wed, 12 Feb 2020 00:49:06 -0800 (PST) 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 S1728791AbgBLIrv (ORCPT + 99 others); Wed, 12 Feb 2020 03:47:51 -0500 Received: from esa4.mentor.iphmx.com ([68.232.137.252]:19943 "EHLO esa4.mentor.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728759AbgBLIrt (ORCPT ); Wed, 12 Feb 2020 03:47:49 -0500 IronPort-SDR: KHeDv6/PFXId++I34hDfzkDxsgP3W02tBQZHL9L91Z6Ng8qVmMbVwPmyw9997LsyGg7waWty0x cOvTg7LPes2wthHZJuwNGS8lthuFHP0qEy45DdtllcTwdJzVyZZCBBuORBVaNoqMUQJcjRzEFE YsKBs7z4IPLHxHh9VZX3G5qOHgy19PrjMPnCHbeqoKDoxCW0u7DOLSlOcgLrnwp7pcsZ/4Njpe EKPqqqrUybrIYPzLNKc+U30tNbkg8GnR9AyEU+8PwYL7aAOX7IEybIv4dzb9PplEKiTZChgCPt ebs= X-IronPort-AV: E=Sophos;i="5.70,428,1574150400"; d="scan'208";a="45799427" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa4.mentor.iphmx.com with ESMTP; 12 Feb 2020 00:47:49 -0800 IronPort-SDR: crhI+Zr9dSnJaKJImzi4Wl126V1h14TvjqOrT5omrd2LAs9HliCBM6Tm1lwFaQva/KLkL0XXWz BPYcqWawv7FrBH5a70JefAwoTtNOA57G+3m6y+/YIJHuydlAgkOIRwmGqKsoDzfrsgLYhLpAGv Cf21nj1W7Ec5ZYncBoW0c5HAIAdCeoX12Q3+2RaE4NJVvE6VFhmm4OMoFX5uhcbHSgDG9uGhwd TXoHS2s6dXnJ3D+BKu/zJPN47ihqK6T/4KqlWV8SHLWRlMIO99x0YRWIY8FZcNRiEzf2agu1nL /Ck= From: Jiada Wang To: , , , , , CC: , , , , Subject: [PATCH v7 44/48] Input: atmel_mxt_ts: use gpiod_set_value_cansleep for reset pin Date: Wed, 12 Feb 2020 00:42:14 -0800 Message-ID: <20200212084218.32344-45-jiada_wang@mentor.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200212084218.32344-1-jiada_wang@mentor.com> References: <20200212084218.32344-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: Balasubramani Vivekanandan In case of remote display, touch controller will be also remote. In such cases, the reset pin of the touch controller will be controlled through bridging ICs like Deserilizer and Serializer. Therefore accessing the gpio pins require transactions with the external IC. Using the function gpiod_set_value will print a warning like below WARNING: CPU: 0 PID: 576 at drivers/gpio/gpiolib.c:1441 gpiod_set_value+0x34/0x60() CPU: 0 PID: 576 Comm: modprobe Not tainted 3.14.79-08377-g84ea22f-dirty #4 Backtrace: [<80011c58>] (dump_backtrace) from [<80011e60>] (show_stack+0x18/0x1c) [<80011e48>] (show_stack) from [<8052d7ac>] (dump_stack+0x7c/0x9c) [<8052d730>] (dump_stack) from [<800241bc>] (warn_slowpath_common+0x74/0x9c) [<80024148>] (warn_slowpath_common) from [<80024288>] (warn_slowpath_null+0x24/0x2c) [<80024264>] (warn_slowpath_null) from [<8029e070>] (gpiod_set_value+0x34/0x60) [<8029e03c>] (gpiod_set_value) from [<7f492e98>] (mxt_probe+0x1e0/0x718 [atmel_mxt_ts]) [<7f492cb8>] (mxt_probe [atmel_mxt_ts]) from [<803c4d34>] (i2c_device_probe+0xcc/0xec) [<803c4c68>] (i2c_device_probe) from [<803252a0>] (driver_probe_device+0xc0/0x200) Signed-off-by: Balasubramani Vivekanandan Signed-off-by: Vladimir Zapolskiy Signed-off-by: Sanjeev Chugh Signed-off-by: George G. Davis Signed-off-by: Jiada Wang --- drivers/input/touchscreen/atmel_mxt_ts.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c index fb0941b5bd47..3784182d896f 100644 --- a/drivers/input/touchscreen/atmel_mxt_ts.c +++ b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -2487,7 +2487,7 @@ static void mxt_regulator_enable(struct mxt_data *data) if (!data->reg_vdd || !data->reg_avdd) return; - gpiod_set_value(data->reset_gpio, 0); + gpiod_set_value_cansleep(data->reset_gpio, 0); error = regulator_enable(data->reg_vdd); if (error) @@ -2505,7 +2505,7 @@ static void mxt_regulator_enable(struct mxt_data *data) * voltage */ msleep(MXT_REGULATOR_DELAY); - gpiod_set_value(data->reset_gpio, 1); + gpiod_set_value_cansleep(data->reset_gpio, 1); msleep(MXT_CHG_DELAY); retry_wait: @@ -4310,7 +4310,7 @@ static int mxt_probe(struct i2c_client *client, const struct i2c_device_id *id) disable_irq(data->irq); } else if (data->reset_gpio) { msleep(MXT_RESET_GPIO_TIME); - gpiod_set_value(data->reset_gpio, 1); + gpiod_set_value_cansleep(data->reset_gpio, 1); msleep(MXT_RESET_INVALID_CHG); } else { dev_dbg(&client->dev, -- 2.17.1