Received: by 2002:a25:d783:0:0:0:0:0 with SMTP id o125csp750713ybg; Thu, 19 Mar 2020 08:07:54 -0700 (PDT) X-Google-Smtp-Source: ADFU+vt3HSd7foZAH5e8hyIGN8PmvLq2QdOG8+GsLelX+QDNQtusX6ee040mBQuNfkNLW3YeOV+W X-Received: by 2002:aca:c70f:: with SMTP id x15mr2614611oif.80.1584630474475; Thu, 19 Mar 2020 08:07:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584630474; cv=none; d=google.com; s=arc-20160816; b=j7JV7kTBv5aooQQZYqMZ37NgrcBjlruhet9wQemW41Vy00UMBWXrhllGPzMaKZ/SC4 9Ew2XR5nlPUoegZPRR7gl+WoYydzbcIHUIZ6L6zzax+26ZhucMsKwg9o0LVqSpCRVJc7 n1h8U30cOj3XfhMtNtBmYihtUS1NP/eaR1oamAYcWc1R9NV3Oj8ZKlXuFP7urwq22L97 4j46aHPun9W2qmU1y+Y6ug3s+hUqkVP4h/dX+eQxcL71tLTldWUshOK+WvvzithHPI1v tX0DI70Na8ubrORtLaPlLDy3WmWixOGmx3ySWDLrG3pNn8XmYtNTdmJc6E4lTEi2ya8g xakA== 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=bgQmKoWrt2HQk3EpPFlvJeBsMiM7EB31JLEv56Acdgo=; b=n4EOo3/TvWVnPyDsoMPhH4NehhsOuKz7OUJQxTZQwgzhgzgwDI+Bm3PRMLzja+prF7 8aPT0oEVnUr4GH+V7mR6Tt/PMFtrDp6I3KdpKfSKHC0ieqioqhy1Ydh5Up5hm6/n0gut 7wFY345Q/AUtkEdxYIKQ7e5Yf6El0C/FqqXu6/uyWZCoSYYmiFJO/tJed1UNNR4+AVt2 jLaY3zNwhh9GFdvcmxgt0jfzaiijPYVuf7H+pyMzYasV4H4s+azs1tRHoaKVsoZXQvlu ugQQbVSquwF3Cbe7XFYDGqksg73wsePQBx+qRL2YahVPIl1wBkBA2VXRpI/FlXn0VoEA Q7aw== 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 b197si1076418oii.198.2020.03.19.08.07.27; Thu, 19 Mar 2020 08:07: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 S1728559AbgCSPDi (ORCPT + 99 others); Thu, 19 Mar 2020 11:03:38 -0400 Received: from esa3.mentor.iphmx.com ([68.232.137.180]:32457 "EHLO esa3.mentor.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728521AbgCSPDb (ORCPT ); Thu, 19 Mar 2020 11:03:31 -0400 IronPort-SDR: IZuMOuB/mqutYeX9ljraj9pFBJVWklUyBh3gigyKEDfEkWkDzmSubFFhxzOwdrs5KEzxe+Wd1l nm98rUhFU4tpqATqI2QkI4fnnKa35WQCWDU2hgH8waS5mp3G7KzGIYZvH9nojKq2VGL3DDkz9B 8E4/BJ4Yx2oPYrpT5QHvzPsrgcoVxGBXedCRHaiwxHxCwlC90ATgiLf8eeFPlYjRw87LOfWOoE m68EwCqXWiEsQiRj2HsmDOcpDichDhuv06jILwwZeY12+sl0OYvpOl0OWij8qHF+OL52WbX0Px kfQ= X-IronPort-AV: E=Sophos;i="5.70,572,1574150400"; d="scan'208";a="46891124" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa3.mentor.iphmx.com with ESMTP; 19 Mar 2020 07:03:30 -0800 IronPort-SDR: CV6LiE4d6KH0ffSNGiX0cpuawVrzHcSJVS/u3kWOuJmR9vDrMLqESFT/fJKdVLChcMasWxt5ho 7ODM8gNvYAvyCSUz67rCLGIZzi9qiMm0WGb5OHaBTMjiBAjYQbVmGXfmOFQSOYvuWfYZvZxuKb 0xF9CyL23HsSlYZFor2Wl5ZO719L4EAsblA+QShO7lfjWDWRioMXMR3sVvOEND43nmvsSF8/F4 tlL3NWlg0PGUC29h/HyskxbAdGHNGy3Lch81CcPBcPx15/1FWb5lx8GAjFRUiLxzSQhDOPXf/6 xzk= From: Jiada Wang To: , , , , , CC: , , , , Subject: [PATCH v8 48/52] Input: atmel_mxt_ts: use gpiod_set_value_cansleep for reset pin Date: Thu, 19 Mar 2020 08:00:12 -0700 Message-ID: <20200319150016.61398-49-jiada_wang@mentor.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200319150016.61398-1-jiada_wang@mentor.com> References: <20200319150016.61398-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 0ca8308e2e8d..9d2636567513 100644 --- a/drivers/input/touchscreen/atmel_mxt_ts.c +++ b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -2489,7 +2489,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) @@ -2507,7 +2507,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: @@ -4313,7 +4313,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