From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=157.90.84.7 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796124455; b=BFpcne9WrP1r+Kyp9LwP8aSaggnsX37E0F8T6ibBAqpw4cbfFAaVfLDUlPQiXKOY/y0g tbLUhvpcAQ4AcoS3BJSTxYK9tQGIKRPAa1KDc9htHwd6lYsyN9Ak6gB8iKL9sg6xxl+/j x30SPtkiivLDbgaEFyqoMzdawhv7/5ptuz4REp0tWRZ8VpeR/Vhxu8CvEhLManh3ZGpEn gUVZuB5fvRwRuCUIluUawCexkCGk4e0PY5pdhQjfFTP96e/2Mx+6YFIw8hZ8m7jekJU1Z ZfeK1eHGBl+nGshe+SeJX39ER6bb2Y+pyf6NR6yQ8WyQVhRwNLNPISuietVXaLLTcag== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796124455; h=DMARC-Filter:Received:DKIM-Signature:Message-ID:Date:MIME-Version: User-Agent:Subject:To:Cc:References:Content-Language:From:In-Reply-To: Content-Type:Content-Transfer-Encoding; bh=+9nmyU2ZtGUB5k4a5WAWH2KFk5o3UdngW4FsJvFfUb4=; b=KeSd4Ac4KS0PH2tmxQstT6iazUAB69y6McsigqOY0rsVNm3+sibVFNUgcG1WyCiwLyhC JwpeG9kQlCZ3XjcwwtjDOLQblvBM/nMfbyC1P5cGaPd+plW3r5dhqW6lmeKB4cqwGOnE5 lHH5yxrlmlHx803l9gLIT4U4NizozWzcsfc4YjeOX1vo2vnJ3j0FvcmCkhbHKmsNhQT9/ vtMm0S1D8hu3T8FnUcdHLqMZpjH3O8//+Cugmz7UGL/k1rxCJKv58fkJAM/CiDeVh2UD9 3yZcBqIi5CoaVa/uRyuCRnrHwYG4LV0+lPQIVgQ9WWHFf5NlHgUI4ymKrh8Vvkk4fYQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=tuxedocomputers.com; spf=pass smtp.mailfrom=tuxedocomputers.com; dkim=pass header.d=tuxedocomputers.com header.i=@tuxedocomputers.com header.a=rsa-sha256 header.s=default header.b=cArFBz+2; arc=none smtp.remote-ip=157.90.84.7 Received: from mail.tuxedocomputers.com (mail.tuxedocomputers.com [157.90.84.7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0CD72606A331; Tue, 1 Dec 2026 11:27:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 0CD72606A331 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=tuxedocomputers.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxedocomputers.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=tuxedocomputers.com header.i=@tuxedocomputers.com header.a=rsa-sha256 header.s=default header.b=cArFBz+2 Received: from [10.10.11.130] (business-024-134-105-141.24.134.pools.vodafone-ip.de [24.134.105.141]) (Authenticated sender: a.erhardt@tuxedocomputers.com) by mail.tuxedocomputers.com (Postfix) with ESMTPSA id 2F1A52FC004A; Tue, 1 Dec 2026 12:27:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxedocomputers.com; s=default; t=1796124451; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+9nmyU2ZtGUB5k4a5WAWH2KFk5o3UdngW4FsJvFfUb4=; b=cArFBz+2Zvkzgl2gzKB5CxWh9b9J7bi8l1QQ2aEw1v+4bppe+IMmiO3YSXEON6S3Jm60Ab G8v69Es6PnaNPH8jCEt0ZnAEnYU86In9pPwf09zsCl3G3Y1UNjb5Tg+xEAhmXD/IoIraXE DYtPkTwjKRxdl0Br4Wg2YYdZ6hM/T4g= Authentication-Results: mail.tuxedocomputers.com; auth=pass smtp.auth=a.erhardt@tuxedocomputers.com smtp.mailfrom=aer@tuxedocomputers.com Message-ID: Date: Tue, 1 Dec 2026 12:27:30 +0100 X-Mailing-List: linux-input@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v7 0/3] HID: generic: add LampArray support via hid-lamparray helper To: Jiri Kosina , Benjamin Tissoires Cc: Cristian Mazzotta , Armin Wolf , linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, linux-leds@vger.kernel.org, Tim Guttzeit , Werner Sembach , Miguel Ojeda , Hans de Goede , Pavel Machek References: <20261020-hid-lamparray-v7-0-47418b667b47@tuxedocomputers.com> Content-Language: en-US From: Aaron Erhardt In-Reply-To: <20261020-hid-lamparray-v7-0-47418b667b47@tuxedocomputers.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Am 20.10.26 um 11:51 schrieb Aaron Erhardt: > Add a new hid-lamparray helper module and integrate it with the > hid-generic driver. Since this has been sitting around for a while without any feedback by a maintainer I think it's valid to raise the question whether this will ever be merged or what changes would be required to get it merged. In particular, I would like to know whether this implementation is going into the right direction and what blockers there are. If the feedback is that LampArray should rather be handled by userspace, I'd be fine with that. Either way, I just want some clarity to move forward. +Cc: Miguel Ojeda, Hans de Goede, Pavel Machek and Werner Sembach who were part of the original LampArray discussion: https://lore.kernel.org/all/1fb08a74-62c7-4d0c-ba5d-648e23082dcb@tuxedocomputers.com/ > > While more complex lamparray handling should be done in userspace via > hidraw, providing a small module to add basic lamparray support makes it > possible for userspace software to interact with lamparrays by simply > using well-known APIs of the LED subsystem. One use-case would be to > enable desktop environments to support keyboard backlight control out of > the box for HID lamparray devices without having to implement the whole > HID protocol themselves. > > This patch is based on previous discussions: > https://lore.kernel.org/all/1fb08a74-62c7-4d0c-ba5d-648e23082dcb@tuxedocomputers.com/ > > The helper provides basic support for devices exposing a > Lighting/LampArray application collection (usage page 0x59) and > registers a single-zone RGB LED representation via the LED subsystem. > > hid-generic now checks for LampArray support after hid_parse() and > optionally registers a lamparray instance. Failures in the helper do not > abort device probe to keep the driver logic otherwise unchanged. > > LampArray resources are released on driver remove. > > This commit was successfully tested on the Microsoft MacroPad reference > implementation (https://github.com/microsoft/RP2040MacropadHidSample > 1d6c3ad) and in combination with the tuxedo_nb04_wmi driver, albeit only > fully functional with a recent fix already on > platform-drivers-x86/for-next > (https://lore.kernel.org/all/20261007080202.81694-1-aer@tuxedocomputers.com). > > Others reported the driver to work on the Acer Predator PT14-52T and the > ASUS Prime B650-Plus, with the former requiring some patches on top of > v5, which should now be included in v6. > > v7: > - Use white with zero brightness as new default > - Fix measurements in comments and commit message > v6: > - Read attribute reports synchronously (by Cristian Mazotta) > - Raise log level of fatal probe errors (by Cristian Mazotta) > - Transfer control when use_leds_uapi changes (by Cristian Mazotta) > - Blank lamps across suspend and restore on resume (by Cristian Mazotta) > - Add quirk for devices that ignore intensities (reported by Armin Wolf) > - Better locking, fixing rare races in uapi registration > - Use scope guards for locking and allocations where possible > - Remove obsolete calls to led_mc_calc_color_components and > hid_device_io_start/stop > - Updated and slightly improved documentation > v5: > - Proper hardware detection (no quirks necessary anymore) > - Add documentation for new sysfs knob > - Pass limits of the device to sysfs (intensities & brightness) > - More flexible Kconfig (use tristate) > - Improved locking > - Several memory leak and (de-)initialization fixes > - Don't read current color values from hardware (the HID spec does not > offer this option) > - Remove redundant report dump functionality > v4: > - Restrict CONFIG_HID_LAMPARRAY to built-in configurations only to fix > additional randconfig build errors > v3: > - Squash V1 and V2 into one patch > v2: > - Fix Kconfig to avoid build errors when LEDS_CLASS_MULTICOLOR is > disabled > > --- > Aaron Erhardt (2): > HID: lamparray: add new LampArray helper module > HID: generic: add LampArray support via hid-lamparray helper > > Cristian Mazzotta (1): > HID: lamparray: blank lamps across suspend and restore on resume > > .../ABI/testing/sysfs-driver-hid-lamparray | 15 + > drivers/hid/Kconfig | 18 + > drivers/hid/Makefile | 2 + > drivers/hid/hid-generic.c | 70 +- > drivers/hid/hid-lamparray.c | 912 +++++++++++++++++++++ > include/linux/hid-lamparray.h | 118 +++ > 6 files changed, 1134 insertions(+), 1 deletion(-) > --- > base-commit: f47d223627f80cb7a1eb14c585fe6cb35de5e984 > change-id: 20261020-hid-lamparray-6f76a2791e8b > > Best regards, > -- > Aaron Erhardt >