Skip to content

Commit b54c4b0

Browse files
wgottwaltgroeck
authored andcommitted
hwmon: (corsair-psu) various cleanups
Fix some typos, adjust documentation and comments to current state of knowledge and update coding style to be more uniform. Signed-off-by: Wilken Gottwalt <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Guenter Roeck <[email protected]>
1 parent 0d67bbc commit b54c4b0

File tree

2 files changed

+13
-14
lines changed

2 files changed

+13
-14
lines changed

Documentation/hwmon/corsair-psu.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ Supported devices:
1515

1616
Corsair HX850i
1717

18-
Corsair HX1000i (revision 1 and 2)
18+
Corsair HX1000i (Series 2022 and Series 2023)
1919

2020
Corsair HX1200i
2121

22-
Corsair HX1500i
22+
Corsair HX1500i (Series 2022)
2323

2424
Corsair RM550i
2525

drivers/hwmon/corsair-psu.c

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,17 @@
3232
* but it is better to not rely on this (it is also hard to parse)
3333
* - the driver uses raw events to be accessible from userspace (though this is not really
3434
* supported, it is just there for convenience, may be removed in the future)
35-
* - a reply always start with the length and command in the same order the request used it
35+
* - a reply always starts with the length and command in the same order the request used it
3636
* - length of the reply data is specific to the command used
3737
* - some of the commands work on a rail and can be switched to a specific rail (0 = 12v,
3838
* 1 = 5v, 2 = 3.3v)
3939
* - the format of the init command 0xFE is swapped length/command bytes
4040
* - parameter bytes amount and values are specific to the command (rail setting is the only
41-
* for now that uses non-zero values)
42-
* - there are much more commands, especially for configuring the device, but they are not
43-
* supported because a wrong command/length can lockup the micro-controller
41+
* one for now that uses non-zero values)
4442
* - the driver supports debugfs for values not fitting into the hwmon class
45-
* - not every device class (HXi, RMi or AXi) supports all commands
46-
* - it is a pure sensors reading driver (will not support configuring)
43+
* - not every device class (HXi or RMi) supports all commands
44+
* - if configured wrong the PSU resets or shuts down, often before actually hitting the
45+
* - reported critical temperature
4746
*/
4847

4948
#define DRIVER_NAME "corsair-psu"
@@ -254,8 +253,8 @@ static int corsairpsu_get_value(struct corsairpsu_data *priv, u8 cmd, u8 rail, l
254253
/*
255254
* the biggest value here comes from the uptime command and to exceed MAXINT total uptime
256255
* needs to be about 68 years, the rest are u16 values and the biggest value coming out of
257-
* the LINEAR11 conversion are the watts values which are about 1200 for the strongest psu
258-
* supported (HX1200i)
256+
* the LINEAR11 conversion are the watts values which are about 1500 for the strongest psu
257+
* supported (HX1500i)
259258
*/
260259
tmp = ((long)data[3] << 24) + (data[2] << 16) + (data[1] << 8) + data[0];
261260
switch (cmd) {
@@ -629,7 +628,7 @@ static const struct hwmon_ops corsairpsu_hwmon_ops = {
629628
.read_string = corsairpsu_hwmon_ops_read_string,
630629
};
631630

632-
static const struct hwmon_channel_info * const corsairpsu_info[] = {
631+
static const struct hwmon_channel_info *const corsairpsu_info[] = {
633632
HWMON_CHANNEL_INFO(chip,
634633
HWMON_C_REGISTER_TZ),
635634
HWMON_CHANNEL_INFO(temp,
@@ -873,15 +872,15 @@ static const struct hid_device_id corsairpsu_idtable[] = {
873872
{ HID_USB_DEVICE(0x1b1c, 0x1c04) }, /* Corsair HX650i */
874873
{ HID_USB_DEVICE(0x1b1c, 0x1c05) }, /* Corsair HX750i */
875874
{ HID_USB_DEVICE(0x1b1c, 0x1c06) }, /* Corsair HX850i */
876-
{ HID_USB_DEVICE(0x1b1c, 0x1c07) }, /* Corsair HX1000i revision 1 */
875+
{ HID_USB_DEVICE(0x1b1c, 0x1c07) }, /* Corsair HX1000i Series 2022 */
877876
{ HID_USB_DEVICE(0x1b1c, 0x1c08) }, /* Corsair HX1200i */
878877
{ HID_USB_DEVICE(0x1b1c, 0x1c09) }, /* Corsair RM550i */
879878
{ HID_USB_DEVICE(0x1b1c, 0x1c0a) }, /* Corsair RM650i */
880879
{ HID_USB_DEVICE(0x1b1c, 0x1c0b) }, /* Corsair RM750i */
881880
{ HID_USB_DEVICE(0x1b1c, 0x1c0c) }, /* Corsair RM850i */
882881
{ HID_USB_DEVICE(0x1b1c, 0x1c0d) }, /* Corsair RM1000i */
883-
{ HID_USB_DEVICE(0x1b1c, 0x1c1e) }, /* Corsair HX1000i revision 2 */
884-
{ HID_USB_DEVICE(0x1b1c, 0x1c1f) }, /* Corsair HX1500i */
882+
{ HID_USB_DEVICE(0x1b1c, 0x1c1e) }, /* Corsair HX1000i Series 2023 */
883+
{ HID_USB_DEVICE(0x1b1c, 0x1c1f) }, /* Corsair HX1500i Series 2022 */
885884
{ },
886885
};
887886
MODULE_DEVICE_TABLE(hid, corsairpsu_idtable);

0 commit comments

Comments
 (0)