From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) (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 E77B43E9F76 for ; Tue, 2 Jun 2026 15:13:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.66 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780413219; cv=none; b=b/lm/XXUoCxX7L/VQNwS0toIPXXw8EmeF9V+CR4YZwbTwTYVa/rCBdhJmacG9YqLSu7vvFppKs4YvfD4Ov0eXFTFU0g72mF45RfPay3YinrsZI59ZFjOXv1w4ZPWselsjDY6qet6gm4s2LPBw6iQzTJXmGwSlJaymdmqD9AmTBc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780413219; c=relaxed/simple; bh=uIoxNG/ylBOK4Md2Y1TKewK40SltRXwOuLYlZ4lHLRQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=dWABMYZqXhKM0lmgA79Dxd4EcAhUHQrf7Umw0xkKpyc6Jtjhxe9v9+7TeMoQagnykDkbpt2u4M1aq22SUrJazpKC6tsdN7g5vfks3GZt49hzKZy42e4vaVYexvmWtiqJaGsm3kphK/v5LUmsQtVSjb1Ob6XkYyrB53li0oJa7Qs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=emUYCpzT; arc=none smtp.client-ip=209.85.221.66 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="emUYCpzT" Received: by mail-wr1-f66.google.com with SMTP id ffacd0b85a97d-45ef189aa1cso3731786f8f.0 for ; Tue, 02 Jun 2026 08:13:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1780413215; x=1781018015; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=K7SDYY2MPZQ+JtNCaxiWzC7XvRzNl6Gx9eXMUcPLE5Q=; b=emUYCpzTHW6lIvzXU+p3AzszTMR43mp6Bz5nHPI6jCbRbbgKrkv2lMabMHFgCWfja1 trqZNuQGkTnqZ74Qtn5bLVLWgTEuGA0au+6iFIgD37AM9RzC/GRiNm4ON7zj6I9sFrdU vpl9hGcUcyMmNjURrJUBJ4wsmue9X2cATjVSPRUGbQ1kGVj8sCixbfdJMryUGHTRpZn1 +Nf1ZNPBzEokNob/LiHJvZXgxR8GweriWHf9HjRnCgjjiq9wfWw8nyroYB73Q+GMVcEJ PCNqA4qyh/TLSnSlF5ptKv4uVqPqS2NsjCCdNf/jaLCsnUnKIEE3+vtoDS9MwuQ7r76C kf2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780413215; x=1781018015; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=K7SDYY2MPZQ+JtNCaxiWzC7XvRzNl6Gx9eXMUcPLE5Q=; b=i7uEkVC6govJYe5KYp4RgABAPYIUctTRP11xDRmisL4taF2iYOi4BmtPIza707PsNO xR06XJKZ0xHoXG2sPC6iRPPIT7XYq3BuP6a7/Z3mkPySuMX0bF+9M7x1uIvlXwAV5mfY 6hYUiT4F6dgPrTSmtZu1nIoU8qnx1Rw5M6Tm7FNNAWFdTAU7Y8yOUU6MZkrqygL0zNGX gyv30pJdDtq39OPzsSkuoUTxLQa0CH2spzMx/MJfdfYx2DgZPw1efAxkRW9KgjUb3AXt AcH/8daaWNEBn9si8lOnMf/QVaBCnw3EwgRoy2e3yqcm3lvke5U28i/OXfjSWsMWYmfB OOYQ== X-Forwarded-Encrypted: i=1; AFNElJ/FWlg9ayhZIMpa4769J+5dMOPDl9InO2XW2oGcsN1pJ0n5IXveP38pSa09hV8eZNWLmLuQtpW23uEVF9k=@vger.kernel.org X-Gm-Message-State: AOJu0YyASlNBD5mkB0at2L+Dhif34heSNBIBIOsE+DPXUjade5c253T6 Ar9SAaFDHn9YcH/mev5b8FyTJQAVM2XkgN+lwG3DwzyX/661A62aoNAc X-Gm-Gg: Acq92OFcg0AVGmbnypGxJk8ddbOwPfc/eU9+BqQaFiHFrR8lCG1C6BqBWnLdZddrBhr Fya8xQJ8j8y9vIlJqaPawybDrLnhLWUhkVqj6PRkSsj4g7Q1OOLO0U74mUWvKx0MRTHvSS18Vxx PLSYQZJJevKiH3U3ozkaK2sxDzg6gleeu5vXLArJjsZsT/32ub7BRGa/LS6tA3PYvX/c6jKB+eD /QS6ykgzLpK7hFgt/DskkAEmBPyQsWHnJfx05NkfQxeaESslToWl7LG0Ad7PXFiS/IpObSDA8ON SgS28aa2Lnj5Q9gNRjn7wc7MjbbkL9YOm1eb0mGOydU+0Sl8PDJpzWFElygPQiHHye7GaenliAL qSeSGBjrAnaoUe2SPxbBkbUj/UTS2IQLPbdzF6h8WFIY+rXr4ntULnJi1pgfm83XEQ08+TaS0Nq WlKcNangxMXVTr17Z8Qpy4T1OXiT4UYxAGkLCflLWc4hXbj16iIiT+25TuzbrtYWo+bQ== X-Received: by 2002:a05:600c:3552:b0:490:958c:46dc with SMTP id 5b1f17b1804b1-490b50928e4mr2308925e9.17.1780413214999; Tue, 02 Jun 2026 08:13:34 -0700 (PDT) Received: from machine (host-176-37-220-32.b025.la.net.ua. [176.37.220.32]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-45ef356b129sm43539336f8f.32.2026.06.02.08.13.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jun 2026 08:13:34 -0700 (PDT) From: d3z To: even.xu@intel.com, xinpeng.sun@intel.com, jikos@kernel.org, bentiss@kernel.org Cc: "Danny D ." , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, abhishektamboli9@gmail.com, sakari.ailus@linux.intel.com Subject: Re: [PATCH] HID: intel-thc-hid: intel-quickspi: reset touch IC on system resume Date: Tue, 2 Jun 2026 18:13:15 +0300 Message-ID: <20260602151317.27768-1-d3z.the.dev@gmail.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: References: <20260529222210.1532876-1-d3z.the.dev@gmail.com> <20260601213047.115271-1-d3z.the.dev@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Danny D. Hi Even, Good way to split it - "touch IC off" vs "THC power-gated" - so I ran the reset_tic()-only test you asked for. I added just reset_tic() to a pristine quickspi_resume(), with none of the THC reconfig (no thc_spi_*_config, no thc_ltr_*). On the Surface Pro 10, after an s2idle suspend/resume, the touchscreen does NOT come back - so reset_tic() alone isn't enough here. The interesting bit is why. The one new line on resume is: intel_quickspi 0000:00:10.0: THC interrupt already unquiesce That's reset_tic() -> thc_interrupt_quiesce(dev, false) finding DEVINT_QUIESCE_EN already clear - even though quickspi_suspend() set it in suspend. thc_regmap is REGCACHE_NONE, so that's the real register, not a cached value. So the THC port-control state we wrote in suspend is gone after resume. That's your second case: the THC itself loses its register context across s2idle, without ever hitting PM_SUSPEND_MEM. reset_tic()'s SPI exchange then runs against a THC whose I/O address and read/write config are wiped, so the reset never completes. Reprogramming those first (like quickspi_restore(), and like v2 on the no-wake path) is what brings touch and pen back. So on the SP10 both are needed - reset the touch IC AND reconfigure the THC - the full reconfigure looks necessary here. One note on the log: there's no fresh "Wait RESET_RESPONSE timeout" line this cycle, but that path is dev_err_once() and the box had ~12h uptime, so an earlier cycle likely already consumed it. Thanks, Danny