Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp4316105ybc; Fri, 22 Nov 2019 00:29:39 -0800 (PST) X-Google-Smtp-Source: APXvYqxTN66WlrMseKCWHLQcTHpvm7K9y6STn718JaPyeWQu+u2xt1ZzIA6u/Gt+gna53ibWQ8xC X-Received: by 2002:a05:600c:2253:: with SMTP id a19mr14968030wmm.97.1574411378993; Fri, 22 Nov 2019 00:29:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574411378; cv=none; d=google.com; s=arc-20160816; b=0rnV9wBuvIPJhQXtO0tOaebJZdKwPXCGJnUGuFy9lDYM1pUzL2PERVTCU6jUb9AZ32 VtwucQPeViSimu7zTgTrkVS0De/mJdgWTO1NG0VjllK6EQqZlSQZ8LBvYDoG9yT1h0zy LNrcUnG3auW6+Ju+kApG/2luJ6kZ6A/mJ4Ed4Iea2Fwg2vsm1T6e3qt0S6P3XgXRomL7 GYKDtY9vTPNmpWn50YK4F+A3ZaZ78R3xgSDsePqfGDZjuQcGh2T5SVEzgtFxUsuEkD9Y YjGE7bk4rqL56oRVOw46ZrehYHNe7PZ5BVGReKnO58RGMVARNM30dpoMJExktHRuz7Pu MUFQ== 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=8jSD2BelrYJMzZFOAMzZkEBP3FLxmdDOu/SFY41vtKE=; b=f70LE3/ymaOJZPV2yX28x0XZYDq48aIqKDToMJcxhERw/WYYMPjwoRW1rKTkcEMghm qM9o37wRav/vlqssJEVIjLFf6t2yVZSrJ9k+FUOeIljDZ7RXuJT+ol4rpV2/PjeCoPY2 CxKKFo6khTGf4VBdhhg/wFQa6bmSVzKFGOvgeO3+ow9uhkf42HUib5NDUrh14NZYGe+E MzJaczRitVzD5iy6uqlxapIlYGXncQE8GLk0PMcB998G8zmAkQQOdQ3N8f+sE3uYztW3 8NX9se8siiKSbkSeJSzL11flOpxcFyyTzjWjZRwTC10mpcdSmLsyPCh+rPlRajKOq0Pp 45Mw== 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 by4si4291514edb.87.2019.11.22.00.29.15; Fri, 22 Nov 2019 00:29:38 -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 S1727745AbfKVI0w (ORCPT + 99 others); Fri, 22 Nov 2019 03:26:52 -0500 Received: from esa4.mentor.iphmx.com ([68.232.137.252]:62619 "EHLO esa4.mentor.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727072AbfKVI0u (ORCPT ); Fri, 22 Nov 2019 03:26:50 -0500 IronPort-SDR: jpUFIyIQEBPfuQmA8XEoNm7PTEtv4Fc+Sfmd9j3IiPsJrH+91ZBTXYQ/SP/eSsXsoFU3csoLhj J4AJRxKv6i6VhJbk0eAxHYY3o3C6pidv+qtqC6ujHy4yUVrcbBr1Z4MXhYKtp70OSHF/tbP1Ph baAzIvbPoDsT5cbVgNGEGA6HVMeZeC0cbGyGhiOmYbVB6oNWp40TuT491BHUeL8cKBUBB4HeGH cP1LQ4Beh3DCHvJV20Ccia0CKbczybIq4CoZ7TgrStQr0vsbs7T90FzRBRqHlUxGZBsqo6OYsE Pq4= X-IronPort-AV: E=Sophos;i="5.69,229,1571731200"; d="scan'208";a="43457655" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa4.mentor.iphmx.com with ESMTP; 22 Nov 2019 00:26:49 -0800 IronPort-SDR: qConjet9okaLhLlqlQgHx8OwITqHCYCmT43hNJlIKqK8RAQYJlIumZXQ2hYRO8anrLXkMynRJI pI7Eb9cTk3ipbbmhLe38YlWRnojOHc8hoxuY5EoPMk4rXZqEptteN6fHFHfIoKearnvfhmRRzy GSV/OVxgzSPrRN6zxrYng5zcnBeCk7sjvhY9jmevNFyS3h9aEez+x8uv6EYfnsUNdphXFbuGtk ciiK3H7Qz3JpCEISBNmM9XiFT7eAa+sDupap9iQD/cJwZ4rUVNQVb298/o0P4Qc9Elf9KyF5eU PG8= From: Jiada Wang To: , , , , CC: , , , , Subject: [PATCH v6 44/48] Input: atmel_mxt_ts: use gpiod_set_value_cansleep for reset pin Date: Fri, 22 Nov 2019 17:23:58 +0900 Message-ID: <20191122082402.18173-45-jiada_wang@mentor.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191122082402.18173-1-jiada_wang@mentor.com> References: <20191122082402.18173-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 0e4a870fafa5..78903806c0b4 100644 --- a/drivers/input/touchscreen/atmel_mxt_ts.c +++ b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -2490,7 +2490,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) @@ -2508,7 +2508,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