Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3366818ybb; Tue, 31 Mar 2020 03:55:19 -0700 (PDT) X-Google-Smtp-Source: ADFU+vturURbWfnetqADR4KLaQiQ96px3bjicjKvCODQaqQEg3tDh7hO/FA4cgE9fEMXJf/RXMsO X-Received: by 2002:aca:fcd8:: with SMTP id a207mr1705081oii.56.1585652119463; Tue, 31 Mar 2020 03:55:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585652119; cv=none; d=google.com; s=arc-20160816; b=BqwRX8OQFFA+v5L8fkaUjqF7R3Ge/C5ul9DsfmTsf6NlTLVL29Jd3vW9LjRv9fFbw3 4O7x5tcvB6KkdYpPA6CKhOjrUEWdPokIbnhxFLzTiOKhrbUcpA18xZry7agyhoRFPX6z ndrfTAOHruAo9pdl9vVNRng3/c0WrNw3d+yj/octTekQj6wBl+BcHqoGFqKxXDv6Qqx6 PigQdh13xys0VT/bDBvFLhlU6KUI1WB2T/HA+GX9pReCFFEkblm43yOkBQGTdKRSxAZ2 9q26Pu3fmYXk8u4sEhtsgy1iD0h8uL9zz97M75qaywY5A+XgmfjCwi8c6i4rzg2dzKk0 p1xQ== 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=YoBXMEei+3c92tfe/5f5hsKi2h972qLICRPlj/uyH8c=; b=micMuY9tdjxeadj/GvO5sGgvBV2G1VuFFmJ3F/5qnLnqj4gfnvOA5VleOZkr9I+OC+ TYwRSG2+yNvjEVaqbOcglINcq8GpZdYlJ894vy8OAb7wJnd4xOj1QixZfVeOWWAfBR98 3Qqv+27Szx9ewCEtf70WLOgrxb1TVfm0Z1exvBaHoXiWWRs/HYw4RghK7LXdXWDVdBei X/tkMfZtToNF3m4KB5Ir2W64O9SYuJxrV3BfMCF3C519slzVmXTB1dBKlz1K3u7rquaq nLSd1rwI4xaEXI/Tq4rQP1RhKA1BybfRGXyxzGGsIYJ2K3tFTO9f4VaKorCRicrwY9nT q/9Q== 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 a14si6750942otr.170.2020.03.31.03.55.06; Tue, 31 Mar 2020 03:55:19 -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 S1730507AbgCaKyL (ORCPT + 99 others); Tue, 31 Mar 2020 06:54:11 -0400 Received: from esa3.mentor.iphmx.com ([68.232.137.180]:28112 "EHLO esa3.mentor.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731003AbgCaKyJ (ORCPT ); Tue, 31 Mar 2020 06:54:09 -0400 IronPort-SDR: alxmDvh0FafmYVMXv7UyRuridcJ0rq3HCbMe1/vo9n/I2cXcRskRsX7c/HIvfmP9N6TctUaNOE T1naFE3SF3EVGR+HZgllCP+9XnLB/ldfiDFE3m0X+gs7HVxq6/BKyO1OEPrzwDLhYwYvAxwP9t NsKZPOJWBRoiYvcz11PVUCdXGJc3fAT7wmGTgD2grAVkOxKiSCnOdCTgCY9/a9p7B4QE8tJyPR LTpurufxb+xX7HZ4NYXQp1MoAW6P9b8rgpvugIMqR2US9dBnecxEVnB8hyr4RzOzoThqx7Ay3E p8E= X-IronPort-AV: E=Sophos;i="5.72,327,1580803200"; d="scan'208";a="47293534" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa3.mentor.iphmx.com with ESMTP; 31 Mar 2020 02:54:08 -0800 IronPort-SDR: z1E/6+0M3w90X/x0Gk9SjGdYFvjrRG5Tg9+mVJmAB6UtaXlP9Mi0pVBcr7B7uTwLg1k/xRM9DI GCPFJAJwqHMTLEjCC/gOIO6ZtSMCXYZHVDzTHZecBTZmsMjW4KpFzFFZ507NLrsqCBG8Mv4io7 xvkl5gCUO4CajN383XhSw7M2mzT4XbwRSI2ooKA0kiL1tAownCxRgyLLsqofFmctqb0q21sW+b LB1UKZTK/U8rBhfpSdKSrQY3cgxEPAlxIV1taP7BQRIZHA25dQKwp5inNRQLm8CilxjNujpqyZ fkA= From: Jiada Wang To: , , , , CC: , , , , Subject: [PATCH v10 51/55] Input: atmel_mxt_ts: use gpiod_set_value_cansleep for reset pin Date: Tue, 31 Mar 2020 03:50:47 -0700 Message-ID: <20200331105051.58896-52-jiada_wang@mentor.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200331105051.58896-1-jiada_wang@mentor.com> References: <20200331105051.58896-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 1cabe75df562..14bd64d194b0 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: @@ -4321,7 +4321,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