Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp1893626lqe; Tue, 9 Apr 2024 03:54:06 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU3o8IFB7v0Pp42GKEM/UQif/P/TxcoaqLVnkpEwRmzH1ElYMviLW15psOtBZgAVIUnFHFAyrJc2DXYFNnrqL9dA27B9RkiAssQBYVXGQ== X-Google-Smtp-Source: AGHT+IGUHrzSFQpHAzT9Oizu2rgTsA7Rv9+Ds3t+JvR9HWs56nmix3DzxnW561jYZdoQM4yb9Jp2 X-Received: by 2002:a05:6a20:244d:b0:1a9:11f8:4a8f with SMTP id t13-20020a056a20244d00b001a911f84a8fmr376531pzc.0.1712660046382; Tue, 09 Apr 2024 03:54:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712660046; cv=pass; d=google.com; s=arc-20160816; b=VeINR8p5j8HQWUBjsb9PxGbVTZIzWaQ0fxk7CBUEBgu7bink0QnSwVVfv12Jahbs0o CDtmMtED7dZTUQMf+ESvn0g9cb1YW0aSXIfAvfdNDL2DLSYt/a2qzzf3LkYFeE/5w9+v HLxe+ipLonbBwgy+JW7fxfZ4oOB2aBt1T5G47JlDDtIfKApZAY8rM9OFTYqkSsH+y555 x/Y1z+ZCXh2n42WPUv0qm19gZnG/6GW2qOJtScnuZ3DDQFmTlD/aG/YxzAVMkOAf6S+j gMHTA6Ik+CBTpN6RzfdaDwdnqD0l54cTpIVUEakyTHpOQmHhzG0TI8VBN74kIkpEamww vBlQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=d9SLtzD51uda5U7BOlp7uyL+uUypQJx04HhbXDep8Hg=; fh=ikuQYI72PqibhVffLnKaT5FHxpfn2yR4zfD0PK9Jj6w=; b=os/0/4ZtqwqId18LMYSzeW8K9CTwLmpLH3bQIGDYep0q5uaObWpP9IUv3iB20JShT6 VyzVnNOtTi1JvpTRjSySWifjAs0PA5Awc3hapovwPGYc5fPVmTZKZJ2B9VdG7RGjJoZB eqe/kZR7a1eeAD3H6oXW9x37eccZB2T+jNxJAq2VyHmSL3+/dMjOrIqKSh+pvi369G8r gDK78JPcL/U4VHifQ1kONmLOWp/hjw7lSjM5mNBFlCojNJlJw9jfNjrMDZY9e0U9EeT9 pxdMw80l2XV1kGPmHK535CyD5tMfZu1rlQr9r7jUy1kx3mrLFh592c65F0+2v/ZYnx8C EQ3Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="RWt+Yv/F"; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-136706-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-136706-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id b27-20020a631b5b000000b005dc4ce8d29fsi8435538pgm.818.2024.04.09.03.54.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Apr 2024 03:54:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-136706-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="RWt+Yv/F"; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-136706-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-136706-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 08F5228688A for ; Tue, 9 Apr 2024 10:54:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 71B5783A09; Tue, 9 Apr 2024 10:53:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="RWt+Yv/F" Received: from mail-lj1-f178.google.com (mail-lj1-f178.google.com [209.85.208.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 04AAE81725 for ; Tue, 9 Apr 2024 10:53:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712660037; cv=none; b=Wyn7cCR5vwI9yGklMgxShKiEROi7El0jr3CLmVCBMp9oNzXi39nJiExJzInKPBYNGN7WQgbXUje12/XnQsx82I+O3fLRgZEbRA8HqoL9yUrssVQNHSc2vesux0BcEaR1x3PQF0uVXB7a2b/OsDaMns+hMzV1V9HTQ4oh1WGkuf4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712660037; c=relaxed/simple; bh=d9SLtzD51uda5U7BOlp7uyL+uUypQJx04HhbXDep8Hg=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=HJp56bnMXvJviBdhuyhpi1UzPlsiS2kSrwJPSCiTqdZxKQteR4IFZ0iawD5ds3vFZlug/k6FBkAsQ5XlsyGWtvRUv+E/eNacP82bidng+9ZxRiQe8yDBuOyaSjIFc1KEbin/I3NJx3Y2KC/k7r+zxBCH75HFrh7tm6+U+H3Vz98= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=RWt+Yv/F; arc=none smtp.client-ip=209.85.208.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-lj1-f178.google.com with SMTP id 38308e7fff4ca-2d87660d5c9so31139881fa.2 for ; Tue, 09 Apr 2024 03:53:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1712660034; x=1713264834; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=d9SLtzD51uda5U7BOlp7uyL+uUypQJx04HhbXDep8Hg=; b=RWt+Yv/Fxj+ZWLQC+WOj+QgMKzq4mRVGRqw0/4FVaBHH+LxsqQYsbRLeiB29ZdI8F9 NGvxzHHqaynfid/ubi8TARqqflvGkmZBxn7oIa2sWg050HRQ1YFssNFI76OVc9W/D1c0 H407Zv6y2glJxKwkBgJHFsdPtDsRbtEkfIgJ0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712660034; x=1713264834; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=d9SLtzD51uda5U7BOlp7uyL+uUypQJx04HhbXDep8Hg=; b=vJRTxQtS3lvMaRgWfnSi7k0svLj2rJr9QrLZ9HTlhQd7fGzop12lxIHhTsxiFMO4H6 l5ykvb0fOZmK5hGPhjyRRE1M6b8FM1SVcK59cch+5XmW/rok283+Fw2TN+nbW7xE6Mcx 6HcYy1/QY18HNipCfVsk9GiRvwFa/uNL2Tpe57NtV3LROZ8q7KmKN0a9IteWqr3TvdZp vot3v7lT1cLLBEiZIxhqGDU/S8j5K1ElTbEFLUoX9ClaHVqp64x5TSUVp1Gl1CDWmwkY QD0AMtXGgL1/aSr2kWYzcIZeqf9ARjzrlQmcHxcTc9m38chYeWeYk+mVPpugWlotG6Hr hulw== X-Forwarded-Encrypted: i=1; AJvYcCVu/SzynGTxZkHKSJC91Y6qqTLvTJlli9lNGercROyaD1ex7BoZKpknuUP1gajCY54y0pzvIdrePcURYnFVJXHvE920UIP23IHUaEwu X-Gm-Message-State: AOJu0YwYpycJOhBzVhjq6U7uDcsj3qb1h4max3OQzHl7/Prn3+JZGjAt TWqAGrwqJLp0MGSpkrSgp6V9ieaMBmRu4rCnGHCAx8YwmVZ79xvcCoeBNmTwBafJJPNAOMuXWGL 3ezLEUIDVB3mbzSBeBy4styxcfAgQY/7ZQr6r X-Received: by 2002:a2e:9d07:0:b0:2d8:8b9e:8e9b with SMTP id t7-20020a2e9d07000000b002d88b9e8e9bmr4336666lji.11.1712660034170; Tue, 09 Apr 2024 03:53:54 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240405102436.3479210-1-lma@chromium.org> In-Reply-To: From: =?UTF-8?Q?=C5=81ukasz_Majczak?= Date: Tue, 9 Apr 2024 12:53:43 +0200 Message-ID: Subject: Re: [PATCH v2] HID: i2c-hid: wait for i2c touchpad deep-sleep to power-up transition To: Johan Hovold Cc: Jiri Kosina , Dmitry Torokhov , Benjamin Tissoires , Douglas Anderson , Hans de Goede , Maxime Ripard , Kai-Heng Feng , Johan Hovold , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Radoslaw Biernacki Content-Type: text/plain; charset="UTF-8" Hi Johan, > > Can you please explain why this would not a problem for all future > transactions as well? > > If it is, then it sounds like this needs to be addressed in the i2c > driver. If not, then perhaps the problem is really that you just need a > delay after enabling the power supplies? > The problem is that the probe function calling i2c_smbus_read_byte() is not aware that uC on the other end is in a deep sleep state so the first read will fail and so the whole probe. In a normal scenario, when a user touches the touchpad (when it is in a deep sleep), the touch will first wake up the uC and then generate an interrupt to AP, so in this case the touchpad is fully awake and operational. > Nit: move above the 'ret' declaration to maintain reverse xmas style > ordering. > > Johan Will do so. Kind regards, Lukasz