diff options
author | Wilken Gottwalt <wilken.gottwalt@posteo.net> | 2023-06-24 13:14:07 +0300 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2023-06-24 18:47:29 +0300 |
commit | 741ed0856d5ef94c2dbdbf58cb13d262d89505bb (patch) | |
tree | 577431b25a9a79715f83a39e3f446c00984116d6 /drivers/hwmon/corsair-psu.c | |
parent | b54c4b02abd1578132712eae5b294a9c77e7422b (diff) | |
download | linux-741ed0856d5ef94c2dbdbf58cb13d262d89505bb.tar.xz |
hwmon: (corsair-psu) update Series 2022 and 2023 support
The series 2022/2023 reports slightly longer vendor/product strings
and shares USB ids. Technically the reply size is the USB HID packet
size (64 bytes) but all the supported commands do not use more than 8
bytes and replies reporting back strings do not use more then 24 bytes
(vendor and product are in one string in the newer devices now). The
rest of the reply is always filled with '\0'. Also update comments
and documentation accordingly.
Signed-off-by: Wilken Gottwalt <wilken.gottwalt@posteo.net>
Link: https://lore.kernel.org/r/ZJbB72CAPmLflhHG@monster.localdomain
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon/corsair-psu.c')
-rw-r--r-- | drivers/hwmon/corsair-psu.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/hwmon/corsair-psu.c b/drivers/hwmon/corsair-psu.c index 9e3e3c0a3bdd..904890598c11 100644 --- a/drivers/hwmon/corsair-psu.c +++ b/drivers/hwmon/corsair-psu.c @@ -42,12 +42,15 @@ * - the driver supports debugfs for values not fitting into the hwmon class * - not every device class (HXi or RMi) supports all commands * - if configured wrong the PSU resets or shuts down, often before actually hitting the - * - reported critical temperature + * reported critical temperature + * - new models like HX1500i Series 2023 have changes in the reported vendor and product + * strings, both are slightly longer now, report vendor and product in one string and are + * the same now */ #define DRIVER_NAME "corsair-psu" -#define REPLY_SIZE 16 /* max length of a reply to a single command */ +#define REPLY_SIZE 24 /* max length of a reply to a single command */ #define CMD_BUFFER_SIZE 64 #define CMD_TIMEOUT_MS 250 #define SECONDS_PER_HOUR (60 * 60) @@ -880,7 +883,7 @@ static const struct hid_device_id corsairpsu_idtable[] = { { HID_USB_DEVICE(0x1b1c, 0x1c0c) }, /* Corsair RM850i */ { HID_USB_DEVICE(0x1b1c, 0x1c0d) }, /* Corsair RM1000i */ { HID_USB_DEVICE(0x1b1c, 0x1c1e) }, /* Corsair HX1000i Series 2023 */ - { HID_USB_DEVICE(0x1b1c, 0x1c1f) }, /* Corsair HX1500i Series 2022 */ + { HID_USB_DEVICE(0x1b1c, 0x1c1f) }, /* Corsair HX1500i Series 2022 and 2023 */ { }, }; MODULE_DEVICE_TABLE(hid, corsairpsu_idtable); |