Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp1573586lqp; Mon, 15 Apr 2024 10:09:22 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWkUmnIorcyyLs70rmEfhk+YcJCUq9KULB/ln7y1pnJU846wSqMq6a4ljfkYKIXK4wSOWgTjPf67oybLRD+1R6lOJyzqSTcDtIn4G+mZQ== X-Google-Smtp-Source: AGHT+IGFmpcNwSQdJamUGbXvCLrWuC5CKnA2waWHcM+osCzDtidRHivTdyE4US8A2suESO8A9Nny X-Received: by 2002:a17:90a:1190:b0:2a2:d48:9d50 with SMTP id e16-20020a17090a119000b002a20d489d50mr9560701pja.44.1713200962210; Mon, 15 Apr 2024 10:09:22 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713200962; cv=pass; d=google.com; s=arc-20160816; b=abv8JSSUY8uUuaPi3hax6oBF2ovHnzPtNVNtF4XIr1ZAmafkJ1XbzT+iyf+DkAp/WD F/UG4R05jwEn/T3hVIcczd0xnpUsJt3F1rt7MW48Yw37EmGA01ys5CeH93khC8NK+3ev MtKohKeXRAA0VXH85ZD9Gna174mB1cMoHcpf5Pryz243vkh+UwZ8TQGcOenvb7HYaH5x 2gbGcefbj2TdRbHz+6IFTCkPk8Z93/zOs1G4AIj+KfDtS9AFetXG80JtDojoVXS/1fdL C6DVagoVHD/dsp+9XXJuTDiDiewPz29a6VCs5fuHdXZniz6gU9EXCX5e28NP1o+lo7zk xf9g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:to:from :dkim-signature; bh=vYtZG9K1Trvb7w2cPdmyV/p+et001gDB2BFj0NoQYVo=; fh=jQGUmjI18alFtDLjDaM2zundwvQZHBUVx7nrAZMPErY=; b=kX2kgSQfaKoa7sMhPyswicwde/P4AIw+tihUa6BsbwXulT+mxLnTjNITC3YiiNeDMt 4JfhXGVaCf5P4/7VytlNORxltrc9W+zKZMAY1QeP2G2ju5lrBCsGfC05TKOv5ktNej6m renuTb0VcIdUDZ33ZB9JiJrXYuUrVzxeHZu1xz1gU7MqGeiOexREmIzFVoQM0wbt5yMl GTQcHhaF7sYI5ebR+M+1yHjbJUeMnCbWXaI8vqrxalQwBlgMFNs/Ri5/k1mUmDDMC7mh ZzbdNavLhpQTKI76XRercZZQcxxJJwdZARiYHNNXbqZwrFKQb4WLC7jKgC4RkodBh1GL DINw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kl.wtf header.s=key1 header.b=eW4pnujL; arc=pass (i=1 spf=pass spfdomain=kl.wtf dkim=pass dkdomain=kl.wtf dmarc=pass fromdomain=kl.wtf); spf=pass (google.com: domain of linux-kernel+bounces-145626-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-145626-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=kl.wtf Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id a15-20020a17090a740f00b0029cf40e2b43si10390736pjg.143.2024.04.15.10.09.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 10:09:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-145626-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=@kl.wtf header.s=key1 header.b=eW4pnujL; arc=pass (i=1 spf=pass spfdomain=kl.wtf dkim=pass dkdomain=kl.wtf dmarc=pass fromdomain=kl.wtf); spf=pass (google.com: domain of linux-kernel+bounces-145626-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-145626-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=kl.wtf 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 C44A52839AE for ; Mon, 15 Apr 2024 17:09:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AE1BA86ADC; Mon, 15 Apr 2024 17:05:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kl.wtf header.i=@kl.wtf header.b="eW4pnujL" Received: from out-174.mta1.migadu.com (out-174.mta1.migadu.com [95.215.58.174]) (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 E0DAE82D91 for ; Mon, 15 Apr 2024 17:05:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.174 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713200752; cv=none; b=uGOBSaQMuUsJ+k1oahLqw9KbGpnFY93IRacXSjMpTTyzvCvOOztB22A90ofYykjKuNnpPmXiHHBc2dgC8nnuBOal51Z4ZoT9JdBRlpL2Wm6Twb7HpbqDI5DBo4CSM2FNKkGN4/EsbZBZqqb+m1UaTWSlZdD3TjdIyJLyLHybQbo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713200752; c=relaxed/simple; bh=vYtZG9K1Trvb7w2cPdmyV/p+et001gDB2BFj0NoQYVo=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=mtHcZrjs18Cz1fJDifAz4Ldl863ZRJunAf6Qhv5ulrP9I4TCjTKDpRnnHf8PMV7GjPaNlAkIc0WWC7oy0RkAw5KPMcw0OIa5pLxX0l3kMcaclRoUuH6WWcGxke+nzwOheOr+dS0pDgItLbiZAUdx12VG1DPmdNHyXutOprRqX1Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=kl.wtf; spf=pass smtp.mailfrom=kl.wtf; dkim=pass (2048-bit key) header.d=kl.wtf header.i=@kl.wtf header.b=eW4pnujL; arc=none smtp.client-ip=95.215.58.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=kl.wtf Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kl.wtf X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kl.wtf; s=key1; t=1713200748; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=vYtZG9K1Trvb7w2cPdmyV/p+et001gDB2BFj0NoQYVo=; b=eW4pnujLvEmq/veRjZlBygY2zWbBi3iK/Y+GkE6aY9pZ52UPg+ikzZK0IRNA+7IKdNBhJu NGl3ZoPgYQmCTN2rWfW7hCBKI+be1OfHgUFjpUvMDxNrzHXTG3EV6SqOAszMEtU/lO7kuQ z2SfDVN2jrCNm4KfmlXC14TAfpdX0EtE2+rcKTi+fJ3I0hwlILSirKylPZkLCjvaLHZbeA fYC9RRhrSwt++2sib0AVdikbj2JU6+S72jmV/LXWqRRc7+iAneu7ZT63H5s5eMOjXG/4uw H3QHDTgXLeLUfBvDTuGEl9aROiXJwmBtr0dNC6J6Jw57ya86DwCJ3E9PbdY4SQ== From: Kenny Levinsen To: 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 , Lukasz Majczak Subject: [PATCH 0/3] HID: i2c-hid: Probe and wake device with HID descriptor fetch Date: Mon, 15 Apr 2024 19:04:10 +0200 Message-ID: <20240415170517.18780-1-kl@kl.wtf> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT This is in response to https://lore.kernel.org/all/Zh0qKeI-YPDE-NVT@hovoldconsulting.com/ Instead of extending the existing smbus probe to include a retry loop, this patch takes the same approach as i2c_hid_set_power() by retrying on EREMOTEIO. This maintains the "silent" error in case no device is present without having to send any dummy commands. Tested with a disconnected touchpad on a Dell XPS 13. I left out the particular sleep. If one is needed, it should also be added to i2c_hid_set_power() which is where we'd wake the device after resuming from suspend. Lukasz and Radoslaw, can you please test if this still does the trick?