From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) (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 C55BC37F010 for ; Mon, 1 Jun 2026 21:31:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.65 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780349466; cv=none; b=JVEZU69gL1iXjxTSCzq0d4Ag6jqL+UkNDbPpImpw1/cvlJCCU4Qdhi/EZXWnLJ4XtbsgLrE5LPbaVmPJ+k/xNY9uCb4Nr4UU2gbDm0aFpp3mm+5qi3Bp68kK5wlSv/p7Hw3TgM35xnwQ3tlZc0CZfSgKq9jTjPy1QC0Qf9NNVeE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780349466; c=relaxed/simple; bh=6MrldId2ywvvgWK0Wzo/bX3+POPDX4YKXeI/F+3Jf1k=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=az573+334VL2QzCpepk9VTVV7Nu0TqiB1d8kXsI/6ptBAo6ZBbadxVd13B9cjUqXdYftbwkeqSnwZh04GdO+DFDLdiGWaF0SHkpCDe9BPYnIVfaimvk4oNkp1X0dPrXzHLVi86oQXUNoRPVgUmmqnpVfNjiwuJH7oVra8bVqflc= 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=sc7Z/F1i; arc=none smtp.client-ip=209.85.221.65 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="sc7Z/F1i" Received: by mail-wr1-f65.google.com with SMTP id ffacd0b85a97d-45ef4223be7so1969204f8f.2 for ; Mon, 01 Jun 2026 14:31:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1780349461; x=1780954261; 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=OrI9zRVmv7V6pta/kHysc7URPMQUcr9MORYitOpV7hQ=; b=sc7Z/F1igcfrSDObNR/maw70J5GMMo6L7InBlA4c8BW6lWru63/E9ZSJ+Z9XsYMJ+s Yr6fwiygl/xjq1DUAYnOgfnBTyBtDuslF5S/1pVUpeEmfQxPcWroiH/9DQTufRn9fsyh DBBWEhGIVgxut9JZLcVIIc7Pg1T7GzSVgOdun3f6n6NL6OBDLgY5sw5BZ0r8hKWEH8ZR irS/An9glVkOeY2HWPd3duADfr8tZRMKZwXYZlSEM1BmMkNhaGRPqPlzkqZCPhWRjb7z /DgxReZ8TqUqdlO+lU5oUkyLRe7OAXqTqois4qkHPVQNA5pUkT1RBY0HUWoXoK9qIFB4 hPRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780349461; x=1780954261; 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=OrI9zRVmv7V6pta/kHysc7URPMQUcr9MORYitOpV7hQ=; b=UaDTJBMOXSA8+Z19kuJ3PKRT/UNBQxJjc4Htc77TZ3Si0M9PvfLwOQOVSAIBPpbfgm dv2lltwDz6ky7GUmfASOadRaWqEnmhRPS4lVZlFXnfGaGQ3Y86DTm5SP9yGyR+G9SR6C 0K3iS85MWtKYVOe01bj7mjsIGCTUM/mj3MPfbi9lEpf7/xFZeHXE33NdZIc0LhrU/BhL PnuXV6nLvMh26nzj2eu3rpH0m6q5Q81SH2Ih75YD8J9VVu77VKaVVglKao99u9fiV885 5yjsHcIZqiJEvGPlCQVmME8o0TkICOaHkrC58++tGKjZOd2RWjrj2liW3oe6tmFjguBR sTtg== X-Forwarded-Encrypted: i=1; AFNElJ9fYsNvcyyIKvkrwQ9UVZhIxASnEmxjs8dBQ5PXTydwqGmKxU77NjpKTb86f1sM151n+WHRdPMwPnbdWso=@vger.kernel.org X-Gm-Message-State: AOJu0YzVV2osYAMapNFs/wRjbx88YDvVwmg5ZI6djTiM07+gKgNxvyxh 62hjAZH4rVKJUMhTb+NwaOjP5KuZX1ge41Ri3M8xTQ/CLNavL5HseAh8 X-Gm-Gg: Acq92OFnxUDOBH0CjggmG5kMWna7rAO8fIUZlet82wMVOeQX26HW+kuWm8wBNaFIn6d 0IKCud3IRl3QapqNx64S/x1JAg8NkplNtVJMEnpA0Q0jYK1sMwiiIyJoSNHqMN15LJYqycVu6oy /zpo1ELdxd79Hb/sgWcz/Gq25b5nVohM0LBk+eOlBQ+3+oGAggnFMqEaIyjxtZlzGH9ZAgGUOvN 8C1mkTvDCwLJZanpwNE1jGuA4IgE82OpHGWaAOMzLRwEVO32o+dFmbVEfKkym4r83HJO1/xNtKB dIFHvj6HQdaTWaeYcWTCfeZr8oT9ds1WghfoBQV6QAQh5IWJSB+pVlwaaPaulHa6Id6Hq4E24kF sTQpmwWyRXZFwip3HKtlyGIlZtktocrPmEnZVWJw4/ye0WDwqoOUBXXLIu3S6K92Nd8WxhtoSW4 ZYCZelwppnQu4WLvO3vgjZLmgGjSnlN1cWvw/IVCS+0oxDc74+XEkaM/UTW2bHykIIx9vxgdClG 9US X-Received: by 2002:a05:600c:1988:b0:490:845e:3a6 with SMTP id 5b1f17b1804b1-490a295013bmr227426615e9.25.1780349460880; Mon, 01 Jun 2026 14:31:00 -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 5b1f17b1804b1-490b0e0f343sm19662735e9.1.2026.06.01.14.30.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Jun 2026 14:31:00 -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 00:30:46 +0300 Message-ID: <20260601213047.115271-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> 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, Thanks for the quick reply and for sharing your patch. First, the missing piece from your mail: my name is Danny D. (d3z.the.dev@gmail.com) - please use it for any Signed-off-by/Reported-by/Tested-by. One note on the starting assumption, though: in its current configuration this Surface Pro 10 doesn't go to S3 at all. /sys/power/mem_sleep only offers s2idle: $ cat /sys/power/mem_sleep [s2idle] There's no "deep" entry to select here, so every suspend goes through s2idle and never reaches PM_SUSPEND_MEM. The touch IC still loses power across that s2idle suspend - the same as over hibernation - which is what gives the "recv failed: -11" on resume. That's the catch with the attached patch: it gates the THC reconfigure on if (last_suspend_state == PM_SUSPEND_MEM) i.e. S3 only. On this machine that branch never runs, so it wouldn't bring the touchscreen back here. Happy to apply it and confirm on the device, but from the code path alone it can't help while we're s2idle-only. What I did instead was key off whether the device actually kept power rather than the suspend type: run the full reset only when the device isn't a wake source (device_may_wakeup() == false), mirroring quickspi_restore(). A wake-enabled device stays on the light path so wake-on-touch is preserved; one that lost power goes through reset_tic() re-enumeration. That fires on both s2idle and S3, which is what makes it work on the SP10. I've tested this on the Surface Pro 10 across many s2idle suspend/resume cycles - touch and pen both keep working - and just posted a v2 that adds the device_may_wakeup() gate. Could we converge on the wakeup-based condition? I'm glad to test any revision of your patch on the hardware, and equally glad for you to carry the fix with my Signed-off-by/Tested-by once it handles the s2idle case. Thanks, Danny