From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dy1-f171.google.com (mail-dy1-f171.google.com [74.125.82.171]) (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 9AC4747CC96 for ; Tue, 16 Jun 2026 18:57:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781636222; cv=none; b=THxwuxgmWGi38Hcsz14LwRObusFpAD+iqLudEuXQ3/oWoBPQUt/NwEWhTGQoExXn7i1tOG0m+UKAEbFY66tpwbHrSs80DhhAw2nfcllEDwJuO032+UEt9tGTFW0rQByRxxK5Q24/5JIfW5nKr3COS7VS7CIAhSXghtgE9iePCnw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781636222; c=relaxed/simple; bh=4CElZiTPHGArORKYD+4KHH07uAFYrw8mEUdxEdUCaTg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=heku1CvEq7C2EyAO/yum2KF3HG0CO7ExO70C432d5iB9W+TINNS+yqIJ1BiJj9KQYocX+fkccor8SLyKcFwWGwGVPPRo4E/m9aPImIA8WDv1z8GA+MNBqBSp9xFGynLNOARRHK05MoEHbnJjrp8UwREQDAE2vmNM6N1GBSr0pDE= 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=Y6FIHJgT; arc=none smtp.client-ip=74.125.82.171 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="Y6FIHJgT" Received: by mail-dy1-f171.google.com with SMTP id 5a478bee46e88-304e83724bfso6812359eec.0 for ; Tue, 16 Jun 2026 11:57:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1781636221; x=1782241021; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=Ysnj9WdUwSfcQFI+hBHALQ1tHbNJvuivqwhgA0jRGmc=; b=Y6FIHJgT8JZPDCLxk85eVxcKAgvsT+Ya8MYCHYPyFVRJDiSS/RIWJAtOZe4Cqh3tew TDJxwGmAamPr3Kf/uEy7qWMih1CjSsFiiML5FYc4KEPimo5IPkMNAiddCNAocG9XBA9i cgjXkI8XYdBz6DF7+Mh9x5x/CaJms0uKVpzJbReRB7G7Q06eElrOdTAGFtLxVtnR066+ Vb50U5yp7mhqFaoUzcMnZTsMwQZKxx1RncrC++DavnDyjEE9//dBR0EH5KSbFUwS2SID 7NDzooo3lFoUlCD+t+I9wkKT+n/L8AdcdOZS1CpJMzrEamZcy/bR3vAFyMuyDTrcTWpd pMpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781636221; x=1782241021; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Ysnj9WdUwSfcQFI+hBHALQ1tHbNJvuivqwhgA0jRGmc=; b=iBsOO0O51VD+KILvH7RKgqC9t+K+bUy+YOZwl62KLMOIRiQc4hEUfQcykYjyfVaiDB uv/xIrB8Xszlr2Q6ZhbTVF/XyCYMdCj6clzg2UxpbieJ0ZZdEKjodwMwVuhpzlkPnUSQ 8zMGqzHNwKm4gxAeaqlMOmrOg+3jr1oPHGM4j/zqnZR+PxNcnNYbc7+lxpZdcUcZardy eNEfMUG2mFcKG4ZbbqR4wkJYaP69UlV6vZ73QtHGELq82uS5RPWczwdGYq5pLK88zSoY gwlSPOizhw0N3VUsBiaMCHL5WOCYqF0KUlYl5kxfmCyI0nivK/OBwvZKrorezRUUoZEi b2AQ== X-Forwarded-Encrypted: i=1; AFNElJ8uaPrhzIG6BxQVmoOCEzhaJkhhBd0snsN3bssWhd2s2m6+Kv9Fes3I0xoUCfwXCrAdUWBBFtukkzDMzMo=@vger.kernel.org X-Gm-Message-State: AOJu0YzwbLuMY6KINv4a/kiMyJPusOv0fnb7MucT9JXvWIqAkKQz9I1K L6LQoqCpvGqEP2mjHHzGHLSfCY/EfmRwQI43tGHeIw3U72NQWSjaDiig X-Gm-Gg: Acq92OFNSL9vTPajaGyl8lZEPOAtm5AqLb6HD/CoYO1D7hIBegas/KXiTSnrM4qseJo 3jmAJ4xy8CD83X1dHaWnWVeHsZ8K2oKPjglhOVJGpmfFnzVQwqz9lbMTvlVWZa7SYLwmzA8QmYo v/3LlGWjxsk8tdz1d4czLwg3YqBgATyNZK0QHu/meD5jT5/WU/1sL8vXfAvjr4JH6ooKQ+1MN9B VkRmptWfCUO44s99i3+S2fsau1omLMde9LmpoFKGpPpknHXc8vuEjsdKu5/wCyConHlREznuNmv xASAcpreObV7fXGOc5gdcO80dAWp/A9SSpVtzIqnNo10YsrO4esqUjj7PB7mvm5sw4Fe4bhUhfG d/WnigUNastaST0OphGPCWg64HC39smC28eEYQfwOsNhFxW1lsB8Sdi6RQFSleZm4UllF0LKqE8 r4ZpSYsRkvey/F5GwCJsjkiXMl7cLJ8H/cCGi0q2E1FWE6ZuzvZ3snzoV+GHp3DFM= X-Received: by 2002:a05:7300:8182:b0:30a:e530:ebc6 with SMTP id 5a478bee46e88-30bc9ce896amr406960eec.12.1781636220591; Tue, 16 Jun 2026 11:57:00 -0700 (PDT) Received: from google.com ([2a00:79e0:2ebe:8:cbae:d24:189c:2cb9]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-3081e91f878sm19888556eec.17.2026.06.16.11.56.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jun 2026 11:56:59 -0700 (PDT) Date: Tue, 16 Jun 2026 11:56:56 -0700 From: Dmitry Torokhov To: Rong Zhang Cc: Jiri Kosina , Benjamin Tissoires , Peter Hutterer , linux-input , LKML Subject: Re: [RFC] Adding device-initiated haptic feedback knobs for pressurepads Message-ID: References: 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=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Hi Rong, On Tue, Jun 16, 2026 at 11:34:45PM +0800, Rong Zhang wrote: > Hi all, > > A pressurepad is a MT touchpad that simulates haptic feedback. The > haptic feedback may be either device-initiated or host-initiated. While > drivers/hid/hid-haptic.c [1] provides comprehensive support for host- > initiated ones, device-initiated ones are currently not configurable at > all. > > According to Microsoft's Input Device Haptics Implementation Guide [2], > pressurepads with device-initiated haptic feedback can support > SET_FEATURE reports to allow users to customize the intensity of the > haptic feedback (usage page 0x0e Haptics, usage 0x23 Intensity) and/or > the force required to trigger a button press (usage page 0x0d > Digitizers, usage 0xb0 Button Press Threshold). Each knob should occupy > a dedicated report ID. > > The first knob maps to "ClickForceSensitivity" in Windows registry and > "Touchpad feedback" => "Intensity" in Windows Settings [3]. The second > knob maps to "ClickForceSensitivity" in Windows registry. > > The pressurepad on my laptop supports the first knob: > > # 0x05, 0x0e, // Usage Page (Haptic) 595 > # 0x09, 0x01, // Usage (Simple Haptic Controller) 597 > # 0xa1, 0x02, // Collection (Logical) 599 > # 0x09, 0x23, // Usage (Intensity) 601 > # 0x85, 0x09, // Report ID (9) 603 > # 0x15, 0x00, // Logical Minimum (0) 605 > # 0x25, 0x64, // Logical Maximum (100) 607 > # 0x75, 0x08, // Report Size (8) 609 > # 0x95, 0x01, // Report Count (1) 611 > # 0xb1, 0x02, // Feature (Data,Var,Abs) 613 > # 0xc0, // End Collection 615 > > I hardly use Windows but the last time I booted it I did see "Touchpad > feedback" => "Intensity" in Windows Settings. > > On Linux, I can tune the knob by setting the corresponding feature > report via HIDRAW. The pressurepad remembers the knob value until it > loses power. However, getting the feature report returns garbage data > (probably from the last input report in the buffer), which makes some > sense as the implementation guide only requires SET_FEATURE support. > > I'd like to add device-initiated haptic feedback configurations for > Linux. For now, I only focus on the first knob, i.e., Haptics Intensity, > since it's supported on my device. If I somehow get a device with the > second knob I may work on it too. The question is why would we want to support device-initiated feedback instead of enhancing userspace to fully control it. For the record on ChromeOS we tried implementing support for device-initiated feedback but it made the kernel code very cumbersome and left a lot of gaps/rough edges when combining device- and host-initiated haptic effects. I'd prefer it all being driven from userspace. Thanks. -- Dmitry