Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp2071427lqe; Tue, 9 Apr 2024 08:46:41 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUDM63peT6vKiaZfhBMwOQ6iLp4MkATrbbEJ+SO/WYFKJN1P67cZFmgtFuZJ3mR0/2IDtT2lWnwGG/fUZUgb6uP8yq1t5xHVeLGiPbh4Q== X-Google-Smtp-Source: AGHT+IGaiQXmxy9VTZ7FzTi3QCBwrg2AqvfzaJIr48QbJYY8afeaMT0WAwwVhAoec20GrY57kXI5 X-Received: by 2002:a17:906:f107:b0:a4e:3fad:b973 with SMTP id gv7-20020a170906f10700b00a4e3fadb973mr7003828ejb.65.1712677601600; Tue, 09 Apr 2024 08:46:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712677601; cv=pass; d=google.com; s=arc-20160816; b=Sup3fbAazNEgScd5KC+3GQ60N29zKZY5yKBlw5+lk1f9CCItigjVZq6XWoQVqzIM+G aIV6lhUbgVD8r/CbEz0zx3QM/z6GsS1lDSYaSXrHRjcdunuuxXGsRc1Y/oJpy+VHoMvH yQT2WI0C84Oj96fVQqJ7FPEPj4MzrMXHylze1Ax4LjR4zUN/XE3G3WyqSHMs13g3F5wp DXnrdBvEJzPsJBBBsVK/XPdIQItge/4XdraBK+5Y5QdxETscFS53lzjSVIUNyvOqGrK/ hgUKXAKx9H248KUuZstMD5OzErgZ0ERcBXpMXhido2uQYDsa+G8C1npm2LSiBUQF3nIt aYJQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=QgA7l0/rVEG47IkZ33j0JzkeLbSf6ciHstZZvcUrPtI=; fh=5WQOp/PyzKGXr3hmWcZwQ4gtgYZGXrXkDBUjGQCreys=; b=mWCfd12BAVl7EbEGILX+G/FDXqji+Ppb5OD9VAESQKksl1zBqbu5S9j46+5xRc4vGd a85RG6qXyUxJEqyWaQM60RGexHbpkRbdBpZ1o0sEslds/M1Q2U4qRC5/dsNkNxkhZTUr R6RJ72b4gZigClf63T3GP7bCIClwB5jeOaxcfJrQrR/NNu1/BjGjnr2/ZapchYwrzZBQ MA0ydqc0hkQl4fksMz9DCKRgPVR3rBdt7+6NSHIbyhV6TyraUDiYFA0U42wTu4ktD96k Ww+wknMz9g8BxCWpq5JMrUQkhcZ5eAwW3JPOjkcdwQLaMW5l+zrvGvXkibB/2LVl6Zgi xPmA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="ME3/PhR/"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-137253-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-137253-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id uz29-20020a170907119d00b00a4652723d04si4793016ejb.390.2024.04.09.08.46.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Apr 2024 08:46:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-137253-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=@kernel.org header.s=k20201202 header.b="ME3/PhR/"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-137253-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-137253-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.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 555851F25D6D for ; Tue, 9 Apr 2024 15:46:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C10011369AF; Tue, 9 Apr 2024 15:46:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ME3/PhR/" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E4D0513667F; Tue, 9 Apr 2024 15:46:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712677581; cv=none; b=IdC+H4IznzkpYbTLgRo53AfgI0HQrBdmaVmJ9wiaDywZ89nngeVoeqWnJxq72YKtDLRTwHaXE/0QtAGyrq2g4V4kTTItyif8JCy3P8SKm5brR4Pm+vzpW6r4KDuJ576rdK8+J1sC15DTo2dJFCj6nWI3OfgsMk5gK2RLbvKVZJ0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712677581; c=relaxed/simple; bh=AMqXgBQum094kgOVcj2SwYkBLHwOfKK/allxjYwE3+o=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=JKaMJjK3fP6WYtx1RWh22Qo8u1b2vLe3RD1H5EHTQOg3aNR2FQJ5aNL4pdma35njoeMWa/yEnchWq1jwvuuCYM2vHVArl9axSr03eRaOF2FOuIhE2TfZyumXbN7cGOEEzdoSpKLJdBqefjDiJ9wyZcBUhvSsdUx+wwHHUKuvTzw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ME3/PhR/; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6C1CFC433C7; Tue, 9 Apr 2024 15:46:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712677580; bh=AMqXgBQum094kgOVcj2SwYkBLHwOfKK/allxjYwE3+o=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ME3/PhR/h55ot5LNZCP2rRlhgrTbr7UeqHe86M6NdUn7tNhxqz/Mi2YYEB2Mltvor 0m4tTNuT0NyzxdWBgK12nxsp8ciAmeXE4OcDbQzXHWhs1xOXsMMzsIxr+Ne2lTuopm EP3DZ4x5P3Ka6J+iAKOpG/6CJ/nYE90Ovc2Ad8CaTHU6JzLvdKlJhCqqmmeKp7LOoe igV529SqxDWzS/u05SxAnloc1kPd45fhO5+iyK895NLzMnT/jBCf4wnHtERY0aEcNe ksLoqmqaJU5YWGOC5kqX+Rc/iis2gKZdbpGGnf4XfITqON1zOtbDcF9eqVCgn56w0i o0BHFC5i6Ruqg== Received: from johan by xi.lan with local (Exim 4.97.1) (envelope-from ) id 1ruDfr-0000000038F-1wBX; Tue, 09 Apr 2024 17:46:16 +0200 Date: Tue, 9 Apr 2024 17:46:15 +0200 From: Johan Hovold To: =?utf-8?Q?=C5=81ukasz?= Majczak 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 Subject: Re: [PATCH v2] HID: i2c-hid: wait for i2c touchpad deep-sleep to power-up transition Message-ID: References: <20240405102436.3479210-1-lma@chromium.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Tue, Apr 09, 2024 at 12:53:43PM +0200, Ɓukasz Majczak wrote: > > Can you please explain why this would not a problem for all future > > transactions as well? > 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. Sure, but what about other transactions that are initiated by the host (e.g. SET_POWER)? Perhaps this hack at probe is enough for your use case, but is an incomplete hack and at a minimum you'd need to add a comment explaining why it is there. Johan