[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Md8ia1ZjpstTm9kuqiUEtIwdxPZxV00hZMofLzz_UeUt6wVg46xETQH8h7PdQ2awHOuyPRjrDVw2f_dg4N1pXPHmnnzHM-2_IACD7fRaxlk=@hughsie.com>
Date: Fri, 04 Jul 2025 16:08:22 +0000
From: Richard Hughes <richard@...hsie.com>
To: Mario Limonciello <superm1@...nel.org>
Cc: Benjamin Tissoires <bentiss@...nel.org>, "Derek J. Clark" <derekjohn.clark@...il.com>, Richard Hughes <hughsient@...il.com>, Jiri Kosina <jikos@...nel.org>, Xino Ni <nijs1@...ovo.com>, Zhixin Zhang <zhangzx36@...ovo.com>, Mia Shao <shaohz1@...ovo.com>, Mark Pearson <mpearson-lenovo@...ebb.ca>, "Pierre-Loup A . Griffais" <pgriffais@...vesoftware.com>, linux-input@...r.kernel.org, linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 0/6] HID: Add Legion Go S Driver
On Friday, July 4th, 2025 at 2:58 AM, Mario Limonciello <superm1@...nel.org> wrote:
> If HID_UNIQ is the right way to get the firmware version but some
> drivers encode a serial+firmware and others encode firmware that's going
> to make for a very messy "generic" property to read the firmware version
> of a device.
I think I've also changed my mind on HID_UNIQ -- IIUC the whole point of HID_UNIQ is to be unique comparing devices with the same VID&PID. If I plug in two identical devices with the same firmware version then HID_UNIQ would be the same -- so I think HID_UNIQ should probably always be the serial number. I think HID_UNIQ should also stay the same during the firmware update too, so we don't want to jam two things into one property like "HID_UNIQ=serial:1234,fwver=12.34"
Certainly exposing the firmware version as a HID property makes enumerating devices much easier in fwupd; the kernel driver often just knows the firmware version already and for userspace to re-query the firmware version using a per-device custom protocol seems pointless at best and dangerous at worse -- given we're typically doing a SetReport and GetReport with no sequence number available.
I don't have much to comment on wrt the implementation, but providing a way for the hidraw kernel driver to export the current firmware version up to userspace makes a lot of sense to me.
Richard
Powered by blists - more mailing lists