Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp3340044lqp; Tue, 26 Mar 2024 06:47:19 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWuC6n3EnZpMiVhvvr0ImCDRls/55K78azF+gWvxJnjt2o0UicNqGgh4jl4704P2C7XbDE5vxi1cf9TP16GBP3wIU/LQcBPBmEWKInErA== X-Google-Smtp-Source: AGHT+IE4OPZb6h3/PswO9OKlYigETDWrQN1HlSW6ONOITNiwL1Z0wgU7gWoWO25V8vYdbdzM9fUc X-Received: by 2002:a17:907:9722:b0:a47:48b0:922e with SMTP id jg34-20020a170907972200b00a4748b0922emr8203816ejc.23.1711460839824; Tue, 26 Mar 2024 06:47:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711460839; cv=pass; d=google.com; s=arc-20160816; b=RE1SRYHsxRieYLzjsiXX3mDYKIhYWfQvRu0uK4OdNPSGx7Wlf2ccZ19mcZtnGepzz5 msSOtUfAnmflCv/gIJnMm5zV6Vz+bIRR80OorP/BOpf6AQ7Fqu1Uv1Wqrixhuy54Kmih pAqnLFoAtcSPNf6MRUnc0JPxSDNLxzzHZOUR+q0uuVM1B7HKBX5GHf5qCOd0pbbEC3DF JzG7BPlAnXAwRJc1opte9CngRdAT6u2rSuo53FGV4cNe4e8s6BN60tYQHlc+twCgzZZn yU6TNDRWJtXLcjdFCbxatGO73HbmipPkS86l6AtBkS0rlonc4vwqC1nFDMTgEhAcqU8J 4WJA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=ruCfZHq43zIiPZrKz5ByYkrM7Dnhqu1J3mZX9CrPvSQ=; fh=e9ecj+Ue5iIA3Pg1i8HXsMsumdFlsFsPiROJHcqpt+s=; b=YV/I7cGa/DhEUOujk3LQWW0z/FtIsuV935dhTvwpDPn48m6HFehR1mYJ7h6RVNMPXS Gc5nFcoCyQ7mdxSxkf2gERNJuezsdZnWnma0UvTA6q8I2tZmGH5kp8qNhJ8JeBh7Ixg0 d3hWDNz9euaCA8wGIBOF2BKTD0SAHKe49eNbLpqjoA6i9r6ERP2JiIs+0hTcD4dg7IGi dy7/+i9p8cCpCPq0/F+SiiUnOisixWjRX5NyaFqIRkhkHVzysHPNcw+P8YkWFc2OwVe7 N0T4tLYZNm5TgopB0uEaJezSIWzCewmz0n2HrvadOBjhVl98X0e/IIkaBFUIFzQaCjFv +ddw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="LZmL/4d/"; 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-119087-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-119087-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id ch7-20020a170906c2c700b00a46bb8aed85si3516469ejb.168.2024.03.26.06.47.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Mar 2024 06:47:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-119087-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="LZmL/4d/"; 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-119087-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-119087-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 8A9F21F333A3 for ; Tue, 26 Mar 2024 13:47:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 399DF7641C; Tue, 26 Mar 2024 13:43:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="LZmL/4d/" Received: from mail-qv1-f51.google.com (mail-qv1-f51.google.com [209.85.219.51]) (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 A6AFE70CC2 for ; Tue, 26 Mar 2024 13:43:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711460625; cv=none; b=AIFSmmlaiCDUp/CUp3inImMCEj4pdOQKXKZqUbkOrsEtc/8laiqOZmNQNLuSyXXhknx8QLm+3Cawgsihw3xhOXmpV4RsI6x37B9WVyLrF8St9rLTehkHMCljiD8nb/leTcGGSyXBofqvX+vcl88WCy+/Vzi71sfJaYxWygqIlS4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711460625; c=relaxed/simple; bh=ljMe5J3C6/sjNT1yUQPJWicsFLE8AOz/s4ig62CFcoA=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=WGO1a9D5TeCl6bUDtvbKGLJVMrbQVuXVFff7kcBnFwHM8VjiGA93uRRG2qaH+WIViKYTGVrpV0J0XyN2JNP/b1/ulODaAU0wfP0VJ3nBDwZUC0rBBaSbmSJAZ3Y9Lg0UhjN3MhpTmHIBlh44EAbZMIAhwpTDlkWQYHG8f/7ws/E= 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=LZmL/4d/; arc=none smtp.client-ip=209.85.219.51 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-qv1-f51.google.com with SMTP id 6a1803df08f44-696719f8dfcso24638686d6.0 for ; Tue, 26 Mar 2024 06:43:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1711460620; x=1712065420; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=ruCfZHq43zIiPZrKz5ByYkrM7Dnhqu1J3mZX9CrPvSQ=; b=LZmL/4d/skmyJLELh6oIodn308sOvBbo35hv7F4qbyCgp9kE8hbUvwNc4W4LtGCLV9 5Pl3eSsOxbezpOlTcDr2X6Rdc83EHvbjFYqBbmEYHRKUdxg+eTgtHrCLBop50KYW0ZZK OZCPF7VgNvWIQ30p7ErPVL65QdJZL/uXjMwJo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711460620; x=1712065420; h=content-transfer-encoding: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=ruCfZHq43zIiPZrKz5ByYkrM7Dnhqu1J3mZX9CrPvSQ=; b=QgUEcYgp1VUsOO/ikZ6VgbvORQRGAoOMqeQeFTe5w3/URVauVpLr23E8X/siM2kbTO bNKuVfsnlbQ1c9Y6bU4xK14Vo0PIk3fUPsUeIvH6BKRGYx9t0pxykcVKuNW7BM1KN0uw rG3KiKkHcA/ejoSCjEl0+DZcB5R+jYC3lXNy6xUEsz7yqjk2Y/0AdU9nx5yF9mnKTrcw bEr2Q/vxRI7H5fnlIBAE0NYN37xsRNLAf18lJwpWThCeSVGKGYk/n50WIjl86wYBzk5M bSWLDGFsFLZ3W3jvquauYHfgynSt04/wimNDZpCy+O+luENQHx9QWcvnerNopz8MzRhf 2lCQ== X-Forwarded-Encrypted: i=1; AJvYcCUOC7bTJq+U4omeGLb7DjXnagOFDJjECUhffofN2TnCXLY+x5eJLsVviCIBfwtrzdQMNjpW95eQdAQQv8jVimyb4Gy3rvI0hD7cgWht X-Gm-Message-State: AOJu0Yzf1P9IIldj0HTBs7bitLmIoFw7mweWeWcfj+durku27rEKH/vO Gl3oVr5ZTeBOYl3ATS93XZHvpDHqchpqRq/wsEIlUF8uatumlI0Fe729F4ZDZGT1TsepC1o27Pw = X-Received: by 2002:a05:6214:20a6:b0:696:3a48:1278 with SMTP id 6-20020a05621420a600b006963a481278mr11948528qvd.52.1711460620178; Tue, 26 Mar 2024 06:43:40 -0700 (PDT) Received: from mail-qt1-f174.google.com (mail-qt1-f174.google.com. [209.85.160.174]) by smtp.gmail.com with ESMTPSA id pt9-20020a056214048900b0068ff0778895sm5195823qvb.81.2024.03.26.06.43.39 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 26 Mar 2024 06:43:39 -0700 (PDT) Received: by mail-qt1-f174.google.com with SMTP id d75a77b69052e-428405a0205so304771cf.1 for ; Tue, 26 Mar 2024 06:43:39 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCUQHScTtuxZErGQhCrFNwUnCbp2VEE9dCVxX7gp6Bfe2IuawbD3Hhh99A097CdGdkwbig5ZlS+2K/JACDZpxUFJFCh05fxOOO7PmULV X-Received: by 2002:a05:622a:248c:b0:431:5ac0:a1e0 with SMTP id cn12-20020a05622a248c00b004315ac0a1e0mr246953qtb.12.1711460618700; Tue, 26 Mar 2024 06:43:38 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240325105452.529921-1-lma@chromium.org> In-Reply-To: From: Doug Anderson Date: Tue, 26 Mar 2024 06:43:21 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] HID: i2c-hid: wait for i2c touchpad deep-sleep to power-up transition To: =?UTF-8?Q?=C5=81ukasz_Majczak?= Cc: Jiri Kosina , Dmitry Torokhov , Benjamin Tissoires , 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" Content-Transfer-Encoding: quoted-printable Hi, On Tue, Mar 26, 2024 at 1:58=E2=80=AFAM =C5=81ukasz Majczak wrote: > > > nit: checkpatch should have yelled at you saying that you should > > specify a commit in the format: > > > > commit b3a81b6c4fc6 ("HID: i2c-hid: check if device is there before > > really probing") > > > I will do it, but I did run the checkpatch (with --strict option) and > it didn't complain about anything. Weird that checkpatch didn't yell, but perhaps somehow your commit message didn't trigger its regex. ;-) > > nit: I believe your sign off should be last. It's also unclear why two > > signoffs. Did Radoslaw author it and you changed it? ...or was it > > Co-Developed-by, or ...? You'll probably need to adjust your tags a > > bit depending on the answers. > > > Yes, we've discussed this patch together and the original > investigation was done by Rad. Sounds good. Probably the best way to tag is these tags in this order: Co-developed-by: Radoslaw Biernacki Signed-off-by: Radoslaw Biernacki Signed-off-by: Lukasz Majczak > > Having both ends of the usleep be 400 is iffy. In this case it's at > > probe time so I wonder if udelay() is better? If not, maybe give at > > least _some_ margin? > > > > > > > + } while (tries-- > 0 && ret < 0); > > > According to Documentation/timers/timers-howto.rst: > " SLEEPING FOR ~USECS OR SMALL MSECS ( 10us - 20ms): > * Use usleep_range" > It was also pointed out by checkpath (when I initially used msleep). > I think giving some margin (eg. 400,500) would be ok. Yeah, usleep_range(400, 500) would be fine. udelay(400) would also be OK. The later would be more "accurate" but also more wasteful of CPU cycles. Given that this is at probe time and only run a small handful of times, it probably doesn't matter lots though perhaps the sleeping function would allow more parallelism of other running probes. -Doug