From patchwork Fri Dec 2 10:57:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rasmus Villemoes X-Patchwork-Id: 28866 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp763937wrr; Fri, 2 Dec 2022 02:59:43 -0800 (PST) X-Google-Smtp-Source: AA0mqf4Oqm6wifduZwU4hJTyyBOBuPIqCH3I5vf3wfyhjAuAlRP3XOVJ0/NfYCTPjqbqUi8MX0SE X-Received: by 2002:a17:906:90c9:b0:7b2:b783:f26b with SMTP id v9-20020a17090690c900b007b2b783f26bmr56527976ejw.406.1669978783158; Fri, 02 Dec 2022 02:59:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669978783; cv=none; d=google.com; s=arc-20160816; b=WebsxaU+T5R/Q4by1mJcJ0LPyZyDBdzBt6HMILWQqg/eWsilgAPlQAhRUzjqPGJmIn 4I7q+NEgFsD92p0bqTIFuG1EuAgLvv5PW/102rbnTWKb21dfFbGl2hItL74jKdxhZhpG xqQmPYUDoiZAhIdeybzrMN3NM6Yxu7EGlXIpO4tN+F7PphcholCJ7o4zFoyVgfsH8mI2 ymMEkHGfpTLRQ9U7Dd/e1fWF3pyTzDO8otlZToiAS7l0hV0P1ZIyCAsNswidN0+bmYOd MWpE0kDGs4a6chByCuGmdLkpiTuJUCS8nJSq0bOJ69QQc/5yx3Px+2uPQtra3FFz2inL p64A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=asePIDAduz3wjwHekIjxIWyoaIECGFH8vErA/u3bLN4=; b=xPG85KE9OCrO63TTdgxgiHygHxkLHV8PgDI1ls2GZkGY0fmagnd6ZZ3v4UxlNBDHaV sYhH3+KQKeTAam4q8Z5EQjK4hj1E4fmcu/PEtkuiEIo3dd7Fpvbdh3/+3AgKObRZGc0F mwPz7pYDr6VKFyk92ozh7c2af4cE9IjvhZGuEe6wdfU3N1Q256ZZ8jGG0ouvhK7OH8W7 bxVa4+7kVMK7WehypadPl3db0YuJherLMqTq0JcRtxV0JTeqjxOF+pM3XbCp/sdBBlNf Jh43KNiEk3zBKgQc7YsA+N3B9mEI/eNOEWAOzUdIERuWzuF6Aw708WIUvLm0tC56qxOM L5iw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=bWhJrmXj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r21-20020a170906705500b0079744630e4asi582241ejj.780.2022.12.02.02.59.19; Fri, 02 Dec 2022 02:59:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=bWhJrmXj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232312AbiLBK6R (ORCPT + 99 others); Fri, 2 Dec 2022 05:58:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43684 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231929AbiLBK6O (ORCPT ); Fri, 2 Dec 2022 05:58:14 -0500 Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1CB40716DD for ; Fri, 2 Dec 2022 02:58:12 -0800 (PST) Received: by mail-lf1-x136.google.com with SMTP id c1so6839447lfi.7 for ; Fri, 02 Dec 2022 02:58:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=asePIDAduz3wjwHekIjxIWyoaIECGFH8vErA/u3bLN4=; b=bWhJrmXjdq55NOaGcwX/Atz3vFl/oz3eIvphok+SzkjhWZydkEk9JsO4pC/rGw+HYG QfdTuTpMRYZ1UnLUhZhmULmAksl2y3p2hSV8ijlP/U58/H0R5fn5WeXxpnDVSq31K/5E Kvnnijeqp+AfgnM5QnHt/scqsVOJL/T7KmJgY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=asePIDAduz3wjwHekIjxIWyoaIECGFH8vErA/u3bLN4=; b=mxfPxhrW6NbJg9WAptjPxh+vKwPiUyLWHduTvTv9m10bKpj3INfXa2AQMYJ6SxmLWY DKGPk5QjjLk5+dbBoYztyaVMeog5O5W1KhkUKtVJtc7QPVcwjZv1XEJE4ouLM4NctbRg 4H6rI8dnO4QgyPkyALyC8Ua7w7blLGZRTAg6d/l2Jxwk+nQs4U2KJxn00tJSpF0HUeSP hm+dJxDpXbzYyGM87DDmPzEG3VBi/Ij79QytQEqdyR5aePnD99h1fm0YIidc/7E5MCcQ gVqe/g0oTziQA5Hv7VSSISwr+ZO01TOfJ/Pq0NZTY2/hg3a5SIiQmUL4M3fUA5xoOG3+ oq7A== X-Gm-Message-State: ANoB5pmpC1E/ESezkqXTIoiAv+33SEjuMUUghksTWXfdwDDKWqdX1Q+p 2YNvuoLq/Jp1wt1KwvxQJsI9Nw== X-Received: by 2002:a05:6512:b8d:b0:4b4:ec87:ef9d with SMTP id b13-20020a0565120b8d00b004b4ec87ef9dmr15987504lfv.70.1669978690303; Fri, 02 Dec 2022 02:58:10 -0800 (PST) Received: from prevas-ravi.prevas.se ([81.216.59.226]) by smtp.gmail.com with ESMTPSA id dw8-20020a0565122c8800b004998d9ccb62sm982682lfb.99.2022.12.02.02.58.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Dec 2022 02:58:09 -0800 (PST) From: Rasmus Villemoes To: Dmitry Torokhov Cc: Dario Binacchi , Oliver Graute , Rasmus Villemoes , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] Input: edt-ft5x06 - always do msleep(300) during initialization Date: Fri, 2 Dec 2022 11:57:59 +0100 Message-Id: <20221202105800.653982-1-linux@rasmusvillemoes.dk> X-Mailer: git-send-email 2.37.2 MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751099672324628029?= X-GMAIL-MSGID: =?utf-8?q?1751099672324628029?= We have a board with an FT5446, which is close enough to a FT5506 (i.e. it also supports up to 10 touch points and has similar register layout) for this driver to work. However, on our board the iovcc and vcc regulators are indeed controllable (so not always-on), but there is no reset or wakeup gpio hooked up. Without a large enough delay between the regulator_enable() calls and edt_ft5x06_ts_identify(), the first edt_ft5x06_ts_readwrite() call fails with -ENXIO and thus the device fails to probe. So unconditionally do an mdelay(300) instead of only when a reset-gpio is present. Signed-off-by: Rasmus Villemoes Reviewed-by: Jeff LaBundy --- drivers/input/touchscreen/edt-ft5x06.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c index 9ac1378610bc..8bafa123083c 100644 --- a/drivers/input/touchscreen/edt-ft5x06.c +++ b/drivers/input/touchscreen/edt-ft5x06.c @@ -1239,8 +1239,8 @@ static int edt_ft5x06_ts_probe(struct i2c_client *client, if (tsdata->reset_gpio) { usleep_range(5000, 6000); gpiod_set_value_cansleep(tsdata->reset_gpio, 0); - msleep(300); } + msleep(300); input = devm_input_allocate_device(&client->dev); if (!input) {