From patchwork Mon Mar 22 22:13:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 406182 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp3929984jai; Mon, 22 Mar 2021 15:14:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy0Olwkp8UXM4M6DmZcOL0DBBWRT74ClqzelXdx5Z9tnljvPBX9uck5leXL/4vfULsWJOy0 X-Received: by 2002:aa7:da48:: with SMTP id w8mr1670793eds.81.1616451298594; Mon, 22 Mar 2021 15:14:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616451298; cv=none; d=google.com; s=arc-20160816; b=LRfMgq6KbI3GuuoMyRD86nxzbvsRO9xMgkSELkEXr/7zexdOb0RdvXOWFEsXAh1RLr nzN/1p3o9csVCO5kYfcZm4o++RBFDHNJpTAdQowNAS/e15+8Qrtkglby8xok/b8fy5z3 JkbIuZ4V2gh1S1M4REW1t6mAty5BZKdeEECwAjAa+dYhjPYEWRUUVKXg5mHYW0Lg2icl 9dtU0g/XZecWF3IS60Np2Vla+T49MPzqI6M2imZ1wpKJg9X9Nmni2qQdPg8jrtwAC3bZ 8AYppveNCo5ivdzs7rkps9Rv+W5dc+Uio7MyLROxeI1sHKvSMx6mXfunGSG5HTFkRMs1 3Omg== 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=QG4pJPzpaQNgceNKTVM3fAPhn89r0E2revH+Of2LXuo=; b=amBMs9uv5VXUrDbrdJqZHzxaj8BBMW4ubifyREhi+tB4WUm6HUP/2fxO25+IUSWFIx BG3U7+dw3X0i7pVv/wLwKCYP3Ntykq0mj0aYWrxbBoflnOrjo253jsEc8n5IgRfx3HdM yyg9RSPtH9FgiVP9/0I1/WFdm6wMroP5Tu8zYjc0S+qFPWIh4ZltpV3/bCTvfrtReKR/ h7pwAq+mfyoAGmSfZ0tWN3DIvlEPev7BEPV+qgaoDtcd+NcmTVYeh0gtqJuUYe3hAD+D /bV0uLTgYE5qNWfvZ89nDqoGj0+/Psi+NuaFXTY6lL54FhTgcYK6m0sOo0zhrWtUVmE0 Ea7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FczkD41g; spf=pass (google.com: domain of linux-input-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-input-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b26si12607825eja.162.2021.03.22.15.14.58; Mon, 22 Mar 2021 15:14:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-input-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FczkD41g; spf=pass (google.com: domain of linux-input-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-input-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229933AbhCVWO0 (ORCPT + 1 other); Mon, 22 Mar 2021 18:14:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36650 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230008AbhCVWNy (ORCPT ); Mon, 22 Mar 2021 18:13:54 -0400 Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A9A45C061574 for ; Mon, 22 Mar 2021 15:13:53 -0700 (PDT) Received: by mail-lf1-x12c.google.com with SMTP id g8so16579825lfv.12 for ; Mon, 22 Mar 2021 15:13:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=QG4pJPzpaQNgceNKTVM3fAPhn89r0E2revH+Of2LXuo=; b=FczkD41gsRJbUoAKiQ02Pu/9OECmGnQjTQlg580HvxxH24QuLVv8VL1dxrBjCa9ikv m6L2Boo7s0dCjQH3tb5QbkIfnIeWdGSLv5JJhrl95/9h0XNfyrcN/EMZDnfcXijPXvIs wsJHaGhz5617YOE1wKsjL/oJ1NcstWXoL3bbICPr/JJpgCEPw7LlIS7VQNlv/VhstkCb rWSf3c5H9U6gAZXfjUv7lh4WBKWy/vihzwTu77k8zvr1YwMacWpTXmaKC/jhF0umTQ1s 5RrvUuyt0ZzcaUZa4YQlHk6ZQNgTZBHdPXXTanRKGPKzf/ALfOzfHERRr7NsHWe5aUfB T+kA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=QG4pJPzpaQNgceNKTVM3fAPhn89r0E2revH+Of2LXuo=; b=FnDEdqQPrbj/7fWzFlIYlCx9DSTf/MjTTrvLdUyOefyO1uD6NkLvIP/IyNN/EFbT2g 7LwnkPc6+qxD24E0/JxIPn51vdSVUIqrFLiN3lb72EwU1lwGnfVTBOlfRUGsYtL4X5pv 36E7OgWazEaixsF3v9ehH72bIpsMeTM+Qz5EkOC9MavdLe7slpG+yInjBnxPcswVcX2y 9Z3tC2sJgZLcB/NLJq72fiVkb37A+chXYB2pekITQM9U3FzAkPZU1f/Zwi0zd8E2YEoU b/BCDv2CKr5qZ02OpsPITmjBRsISWGlxtJqgqY+pWh8B8gwuLPEy+9gmTUIiGWln5Vjv QYIg== X-Gm-Message-State: AOAM5306tuH9rPqELgzcQ3yBSG1Gm1cDHOQv1ay7Fyb8e7GpTOtnuyNL DtRj//RBUF85jPaSipoaMeN59QSKbLZxU0tLJ2Y= X-Received: by 2002:ac2:5a1b:: with SMTP id q27mr748665lfn.189.1616451232145; Mon, 22 Mar 2021 15:13:52 -0700 (PDT) Received: from localhost.localdomain (c-d7cb225c.014-348-6c756e10.bbcust.telenor.se. [92.34.203.215]) by smtp.gmail.com with ESMTPSA id y11sm2133366ljc.18.2021.03.22.15.13.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Mar 2021 15:13:51 -0700 (PDT) From: Linus Walleij To: Ferruh Yigit , Dmitry Torokhov , linux-input@vger.kernel.org Cc: Henrik Rydberg , Linus Walleij Subject: [PATCH] Input: cyttsp - Verbose error on soft reset Date: Mon, 22 Mar 2021 23:13:49 +0100 Message-Id: <20210322221349.1116666-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org The first thing the Cypress driver does when starting up is to try a soft reset. This is the first point where the driver SPI/I2C communication can fail, so put out some nice debug text: cyttsp-spi spi2.0: failed to send soft reset Instead of just: cyttsp-spi: probe of spi2.0 failed with error -5 This is more helpful. Cc: Ferruh Yigit Signed-off-by: Linus Walleij --- drivers/input/touchscreen/cyttsp_core.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) -- 2.29.2 diff --git a/drivers/input/touchscreen/cyttsp_core.c b/drivers/input/touchscreen/cyttsp_core.c index 73c854f35f33..b9772192b5ea 100644 --- a/drivers/input/touchscreen/cyttsp_core.c +++ b/drivers/input/touchscreen/cyttsp_core.c @@ -248,12 +248,16 @@ static int cyttsp_soft_reset(struct cyttsp *ts) enable_irq(ts->irq); retval = ttsp_send_command(ts, CY_SOFT_RESET_MODE); - if (retval) + if (retval) { + dev_err(ts->dev, "failed to send soft reset\n"); goto out; + } timeout = wait_for_completion_timeout(&ts->bl_ready, msecs_to_jiffies(CY_DELAY_DFLT * CY_DELAY_MAX)); retval = timeout ? 0 : -EIO; + if (retval) + dev_err(ts->dev, "timeout waiting for soft reset\n"); out: ts->state = CY_IDLE_STATE;