Message ID | 20230211165923.17807-4-leonard.anderweit@gmail.com (mailing list archive) |
---|---|
State | Changes Requested |
Headers | show |
Series | hwmon: (aquacomputer_d5next) Add Aquacomputer Aquaero control | expand |
On 2/11/23 08:59, Leonard Anderweit wrote: > Support sending control reports to Aquacomputer Aquaero. This commit only > enables control of the temperature offset as this works in the same manner as > with already supported devices. > Also, mention temperature offset control for Aquaero in docs. > > Signed-off-by: Leonard Anderweit <leonard.anderweit@gmail.com> > --- > Documentation/hwmon/aquacomputer_d5next.rst | 4 +- > drivers/hwmon/aquacomputer_d5next.c | 62 ++++++++++++++++----- > 2 files changed, 50 insertions(+), 16 deletions(-) > > diff --git a/Documentation/hwmon/aquacomputer_d5next.rst b/Documentation/hwmon/aquacomputer_d5next.rst > index 7d0d015b1a52..de43374940b8 100644 > --- a/Documentation/hwmon/aquacomputer_d5next.rst > +++ b/Documentation/hwmon/aquacomputer_d5next.rst > @@ -25,7 +25,7 @@ communicate through proprietary USB HID protocols. > > The Aquaero devices expose eight physical, eight virtual and four calculated > virtual temperature sensors, as well as two flow sensors. The fans expose their > -speed (in RPM), power, voltage and current. > +speed (in RPM), power, voltage and current. The temperature offset can be controlled. > > For the D5 Next pump, available sensors are pump and fan speed, power, voltage > and current, as well as coolant temperature and eight virtual temp sensors. Also > @@ -75,7 +75,7 @@ Sysfs entries > > ================ ============================================================== > temp[1-20]_input Physical/virtual temperature sensors (in millidegrees Celsius) > -temp[1-4]_offset Temperature sensor correction offset (in millidegrees Celsius) > +temp[1-8]_offset Temperature sensor correction offset (in millidegrees Celsius) > fan[1-8]_input Pump/fan speed (in RPM) / Flow speed (in dL/h) > fan5_pulses Quadro flow sensor pulses > power[1-8]_input Pump/fan power (in micro Watts) > diff --git a/drivers/hwmon/aquacomputer_d5next.c b/drivers/hwmon/aquacomputer_d5next.c > index 03ef9e0258d2..95461e2907e1 100644 > --- a/drivers/hwmon/aquacomputer_d5next.c > +++ b/drivers/hwmon/aquacomputer_d5next.c > @@ -56,6 +56,7 @@ static const char *const aqc_device_names[] = { > #define SERIAL_PART_OFFSET 2 > > #define CTRL_REPORT_ID 0x03 > +#define AQUAERO_CTRL_REPORT_ID 0x0b > > /* The HID report that the official software always sends > * after writing values, currently same for all devices > @@ -67,6 +68,14 @@ static u8 secondary_ctrl_report[] = { > 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x34, 0xC6 > }; > > +/* Secondary HID report values for Aquaero */ > +#define AQUAERO_SECONDARY_CTRL_REPORT_ID 0x06 > +#define AQUAERO_SECONDARY_CTRL_REPORT_SIZE 0x07 > + > +static u8 aquaero_secondary_ctrl_report[] = { > + 0x06, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00 > +}; > + > /* Report IDs for legacy devices */ > #define POWERADJUST3_STATUS_REPORT_ID 0x03 > > @@ -94,6 +103,7 @@ static u8 secondary_ctrl_report[] = { > #define AQUAERO_NUM_VIRTUAL_SENSORS 8 > #define AQUAERO_NUM_CALC_VIRTUAL_SENSORS 4 > #define AQUAERO_NUM_FLOW_SENSORS 2 > +#define AQUAERO_CTRL_REPORT_SIZE 0xa93 > > /* Sensor report offsets for Aquaero fan controllers */ > #define AQUAERO_SENSOR_START 0x65 > @@ -106,6 +116,9 @@ static u8 secondary_ctrl_report[] = { > #define AQUAERO_FAN_SPEED_OFFSET 0x00 > static u16 aquaero_sensor_fan_offsets[] = { 0x167, 0x173, 0x17f, 0x18B }; > > +/* Control report offsets for the Aquaero fan controllers */ > +#define AQUAERO_TEMP_CTRL_OFFSET 0xdb > + > /* Specs of the D5 Next pump */ > #define D5NEXT_NUM_FANS 2 > #define D5NEXT_NUM_SENSORS 1 > @@ -441,6 +454,10 @@ struct aqc_data { > const char *name; > > int status_report_id; /* Used for legacy devices, report is stored in buffer */ > + int ctrl_report_id; > + int secondary_ctrl_report_id; > + int secondary_ctrl_report_size; > + u8 *secondary_ctrl_report; > > int buffer_size; > u8 *buffer; > @@ -513,7 +530,7 @@ static int aqc_get_ctrl_data(struct aqc_data *priv) > int ret; > > memset(priv->buffer, 0x00, priv->buffer_size); > - ret = hid_hw_raw_request(priv->hdev, CTRL_REPORT_ID, priv->buffer, priv->buffer_size, > + ret = hid_hw_raw_request(priv->hdev, priv->ctrl_report_id, priv->buffer, priv->buffer_size, > HID_FEATURE_REPORT, HID_REQ_GET_REPORT); > if (ret < 0) > ret = -ENODATA; > @@ -527,23 +544,27 @@ static int aqc_send_ctrl_data(struct aqc_data *priv) > int ret; > u16 checksum; > > - /* Init and xorout value for CRC-16/USB is 0xffff */ > - checksum = crc16(0xffff, priv->buffer + priv->checksum_start, priv->checksum_length); > - checksum ^= 0xffff; > + /* Checksum is not needed for Aquaero */ > + if (priv->kind != aquaero) { > + /* Init and xorout value for CRC-16/USB is 0xffff */ > + checksum = crc16(0xffff, priv->buffer + priv->checksum_start, > + priv->checksum_length); > + checksum ^= 0xffff; aquaero is already supported, and the checksum is so far generated and sent. Is it ignored ? Also, is it guaranteed that _all_ aquero devices don't need it ? If it is not needed and ignored, does it really add value to selectively drop it ? Either case, this change is not mentioned in the commit log, and it violates the "one logical change per patch" rule. Please split it into a separate patch and explain why the change is needed. Another change to separate is the introduction of ctrl_report_id and the secondary_ctrl_report variables, which is also done silently and not explained. That should also be a separate patch to simplify review. Thanks, Guenter > > - /* Place the new checksum at the end of the report */ > - put_unaligned_be16(checksum, priv->buffer + priv->checksum_offset); > + /* Place the new checksum at the end of the report */ > + put_unaligned_be16(checksum, priv->buffer + priv->checksum_offset); > + } > > /* Send the patched up report back to the device */ > - ret = hid_hw_raw_request(priv->hdev, CTRL_REPORT_ID, priv->buffer, priv->buffer_size, > + ret = hid_hw_raw_request(priv->hdev, priv->ctrl_report_id, priv->buffer, priv->buffer_size, > HID_FEATURE_REPORT, HID_REQ_SET_REPORT); > if (ret < 0) > return ret; > > /* The official software sends this report after every change, so do it here as well */ > - ret = hid_hw_raw_request(priv->hdev, SECONDARY_CTRL_REPORT_ID, secondary_ctrl_report, > - SECONDARY_CTRL_REPORT_SIZE, HID_FEATURE_REPORT, > - HID_REQ_SET_REPORT); > + ret = hid_hw_raw_request(priv->hdev, priv->secondary_ctrl_report_id, > + priv->secondary_ctrl_report, priv->secondary_ctrl_report_size, > + HID_FEATURE_REPORT, HID_REQ_SET_REPORT); > return ret; > } > > @@ -969,10 +990,10 @@ static const struct hwmon_channel_info *aqc_info[] = { > HWMON_T_INPUT | HWMON_T_LABEL | HWMON_T_OFFSET, > HWMON_T_INPUT | HWMON_T_LABEL | HWMON_T_OFFSET, > HWMON_T_INPUT | HWMON_T_LABEL | HWMON_T_OFFSET, > - HWMON_T_INPUT | HWMON_T_LABEL, > - HWMON_T_INPUT | HWMON_T_LABEL, > - HWMON_T_INPUT | HWMON_T_LABEL, > - HWMON_T_INPUT | HWMON_T_LABEL, > + HWMON_T_INPUT | HWMON_T_LABEL | HWMON_T_OFFSET, > + HWMON_T_INPUT | HWMON_T_LABEL | HWMON_T_OFFSET, > + HWMON_T_INPUT | HWMON_T_LABEL | HWMON_T_OFFSET, > + HWMON_T_INPUT | HWMON_T_LABEL | HWMON_T_OFFSET, > HWMON_T_INPUT | HWMON_T_LABEL, > HWMON_T_INPUT | HWMON_T_LABEL, > HWMON_T_INPUT | HWMON_T_LABEL, > @@ -1275,6 +1296,9 @@ static int aqc_probe(struct hid_device *hdev, const struct hid_device_id *id) > priv->num_flow_sensors = AQUAERO_NUM_FLOW_SENSORS; > priv->flow_sensors_start_offset = AQUAERO_FLOW_SENSORS_START; > > + priv->buffer_size = AQUAERO_CTRL_REPORT_SIZE; > + priv->temp_ctrl_offset = AQUAERO_TEMP_CTRL_OFFSET; > + > priv->temp_label = label_temp_sensors; > priv->virtual_temp_label = label_virtual_temp_sensors; > priv->calc_virt_temp_label = label_aquaero_calc_temp_sensors; > @@ -1438,6 +1462,11 @@ static int aqc_probe(struct hid_device *hdev, const struct hid_device_id *id) > priv->firmware_version_offset = AQUAERO_FIRMWARE_VERSION; > > priv->fan_structure = &aqc_aquaero_fan_structure; > + > + priv->ctrl_report_id = AQUAERO_CTRL_REPORT_ID; > + priv->secondary_ctrl_report_id = AQUAERO_SECONDARY_CTRL_REPORT_ID; > + priv->secondary_ctrl_report_size = AQUAERO_SECONDARY_CTRL_REPORT_SIZE; > + priv->secondary_ctrl_report = aquaero_secondary_ctrl_report; > break; > case poweradjust3: > priv->status_report_id = POWERADJUST3_STATUS_REPORT_ID; > @@ -1446,6 +1475,11 @@ static int aqc_probe(struct hid_device *hdev, const struct hid_device_id *id) > priv->serial_number_start_offset = AQC_SERIAL_START; > priv->firmware_version_offset = AQC_FIRMWARE_VERSION; > > + priv->ctrl_report_id = CTRL_REPORT_ID; > + priv->secondary_ctrl_report_id = SECONDARY_CTRL_REPORT_ID; > + priv->secondary_ctrl_report_size = SECONDARY_CTRL_REPORT_SIZE; > + priv->secondary_ctrl_report = secondary_ctrl_report; > + > if (priv->kind == aquastreamult) > priv->fan_structure = &aqc_aquastreamult_fan_structure; > else
On 2023-02-11 19:08:27 GMT+01:00, Guenter Roeck wrote: > > aquaero is already supported, and the checksum is so far generated > and sent. Is it ignored ? Also, is it guaranteed that _all_ aquero devices > don't need it ? Reading its sensors is currently supported, not writing to it (before these patches). The checksum is ignored and not needed for either aquaero 5 (which Leonard has) nor 6 (which I have). > > If it is not needed and ignored, does it really add value to selectively drop it ? I think we can indeed remove that check. Thanks, Aleksa > > Either case, this change is not mentioned in the commit log, and it > violates the "one logical change per patch" rule. Please split it into > a separate patch and explain why the change is needed. > > Another change to separate is the introduction of ctrl_report_id > and the secondary_ctrl_report variables, which is also done silently > and not explained. That should also be a separate patch to simplify > review. > > Thanks, > Guenter
Am 11.02.23 um 19:54 schrieb Aleksa Savic: > On 2023-02-11 19:08:27 GMT+01:00, Guenter Roeck wrote: >> >> aquaero is already supported, and the checksum is so far generated >> and sent. Is it ignored ? Also, is it guaranteed that _all_ aquero devices >> don't need it ? > > Reading its sensors is currently supported, not writing to it (before these > patches). > > The checksum is ignored and not needed for either aquaero 5 (which Leonard has) > nor 6 (which I have). > >> >> If it is not needed and ignored, does it really add value to selectively drop it ? > > I think we can indeed remove that check. I don't think that check can be removed as the checksum is not appended to the control report but is in the last two bytes. So using the checksum on Aquaero will overwrite the data at that location. It is currently unknown what these two bytes do so I do not want to overwrite them. > > Thanks, > Aleksa > >> >> Either case, this change is not mentioned in the commit log, and it >> violates the "one logical change per patch" rule. Please split it into >> a separate patch and explain why the change is needed. >> >> Another change to separate is the introduction of ctrl_report_id >> and the secondary_ctrl_report variables, which is also done silently >> and not explained. That should also be a separate patch to simplify >> review. I will separate the changes into more commits for the next version. Regards, Leonard >> >> Thanks, >> Guenter >
On 2/11/23 11:48, Leonard Anderweit wrote: > Am 11.02.23 um 19:54 schrieb Aleksa Savic: >> On 2023-02-11 19:08:27 GMT+01:00, Guenter Roeck wrote: >>> >>> aquaero is already supported, and the checksum is so far generated >>> and sent. Is it ignored ? Also, is it guaranteed that _all_ aquero devices >>> don't need it ? >> >> Reading its sensors is currently supported, not writing to it (before these >> patches). >> >> The checksum is ignored and not needed for either aquaero 5 (which Leonard has) >> nor 6 (which I have). >> >>> >>> If it is not needed and ignored, does it really add value to selectively drop it ? >> >> I think we can indeed remove that check. > > I don't think that check can be removed as the checksum is not appended to the control report but is in the last two bytes. So using the checksum on Aquaero will overwrite the data at that location. It is currently unknown what these two bytes do so I do not want to overwrite them. > The current code _does_ overwrite those bytes, or am I missing something ? If so, changing that would be a bug fix which really should not be hidden in a patch making functional changes. Thanks, Guenter >> >> Thanks, >> Aleksa >> >>> >>> Either case, this change is not mentioned in the commit log, and it >>> violates the "one logical change per patch" rule. Please split it into >>> a separate patch and explain why the change is needed. >>> >>> Another change to separate is the introduction of ctrl_report_id >>> and the secondary_ctrl_report variables, which is also done silently >>> and not explained. That should also be a separate patch to simplify >>> review. > > I will separate the changes into more commits for the next version. > > Regards, > Leonard > >>> >>> Thanks, >>> Guenter >>
On 2023-02-11 21:48:56 GMT+01:00, Guenter Roeck wrote: > On 2/11/23 11:48, Leonard Anderweit wrote: >> Am 11.02.23 um 19:54 schrieb Aleksa Savic: >>> On 2023-02-11 19:08:27 GMT+01:00, Guenter Roeck wrote: >>>> >>>> aquaero is already supported, and the checksum is so far generated >>>> and sent. Is it ignored ? Also, is it guaranteed that _all_ aquero devices >>>> don't need it ? >>> >>> Reading its sensors is currently supported, not writing to it (before these >>> patches). >>> >>> The checksum is ignored and not needed for either aquaero 5 (which Leonard has) >>> nor 6 (which I have). >>> >>>> >>>> If it is not needed and ignored, does it really add value to selectively drop it ? >>> >>> I think we can indeed remove that check. >> >> I don't think that check can be removed as the checksum is not appended >> to the control report but is in the last two bytes. So using the >> checksum on Aquaero will overwrite the data at that location. It is >> currently unknown what these two bytes do so I do not want to overwrite >> them. >> > > The current code _does_ overwrite those bytes, or am I missing something ? > > If so, changing that would be a bug fix which really should not be hidden > in a patch making functional changes. > > Thanks, > Guenter The current code indeed does that because the devices that have writing implemented work that way (D5 Next, Quadro, Octo - they have priv->fan_ctrl_offsets set, which is checked in aqc_is_visible()) plus they need the checksum. Regarding the aquaero checksum, I was under the wrong impression that its control report contained a place for it. I've just captured a few reports and it seems to contain purely settings all the way to the end. I've also compared reports before and after making changes and only the changed settings reflected in the hex dumps, showing there really is no checksum. So, to correct myself from earlier: the checksum is not getting ignored; it has no place in it at all, as the code and testing show. Thanks, Aleksa > >>> >>> Thanks, >>> Aleksa >>> >>>> >>>> Either case, this change is not mentioned in the commit log, and it >>>> violates the "one logical change per patch" rule. Please split it into >>>> a separate patch and explain why the change is needed. >>>> >>>> Another change to separate is the introduction of ctrl_report_id >>>> and the secondary_ctrl_report variables, which is also done silently >>>> and not explained. That should also be a separate patch to simplify >>>> review. >> >> I will separate the changes into more commits for the next version. >> >> Regards, >> Leonard >> >>>> >>>> Thanks, >>>> Guenter >>> >
diff --git a/Documentation/hwmon/aquacomputer_d5next.rst b/Documentation/hwmon/aquacomputer_d5next.rst index 7d0d015b1a52..de43374940b8 100644 --- a/Documentation/hwmon/aquacomputer_d5next.rst +++ b/Documentation/hwmon/aquacomputer_d5next.rst @@ -25,7 +25,7 @@ communicate through proprietary USB HID protocols. The Aquaero devices expose eight physical, eight virtual and four calculated virtual temperature sensors, as well as two flow sensors. The fans expose their -speed (in RPM), power, voltage and current. +speed (in RPM), power, voltage and current. The temperature offset can be controlled. For the D5 Next pump, available sensors are pump and fan speed, power, voltage and current, as well as coolant temperature and eight virtual temp sensors. Also @@ -75,7 +75,7 @@ Sysfs entries ================ ============================================================== temp[1-20]_input Physical/virtual temperature sensors (in millidegrees Celsius) -temp[1-4]_offset Temperature sensor correction offset (in millidegrees Celsius) +temp[1-8]_offset Temperature sensor correction offset (in millidegrees Celsius) fan[1-8]_input Pump/fan speed (in RPM) / Flow speed (in dL/h) fan5_pulses Quadro flow sensor pulses power[1-8]_input Pump/fan power (in micro Watts) diff --git a/drivers/hwmon/aquacomputer_d5next.c b/drivers/hwmon/aquacomputer_d5next.c index 03ef9e0258d2..95461e2907e1 100644 --- a/drivers/hwmon/aquacomputer_d5next.c +++ b/drivers/hwmon/aquacomputer_d5next.c @@ -56,6 +56,7 @@ static const char *const aqc_device_names[] = { #define SERIAL_PART_OFFSET 2 #define CTRL_REPORT_ID 0x03 +#define AQUAERO_CTRL_REPORT_ID 0x0b /* The HID report that the official software always sends * after writing values, currently same for all devices @@ -67,6 +68,14 @@ static u8 secondary_ctrl_report[] = { 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x34, 0xC6 }; +/* Secondary HID report values for Aquaero */ +#define AQUAERO_SECONDARY_CTRL_REPORT_ID 0x06 +#define AQUAERO_SECONDARY_CTRL_REPORT_SIZE 0x07 + +static u8 aquaero_secondary_ctrl_report[] = { + 0x06, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00 +}; + /* Report IDs for legacy devices */ #define POWERADJUST3_STATUS_REPORT_ID 0x03 @@ -94,6 +103,7 @@ static u8 secondary_ctrl_report[] = { #define AQUAERO_NUM_VIRTUAL_SENSORS 8 #define AQUAERO_NUM_CALC_VIRTUAL_SENSORS 4 #define AQUAERO_NUM_FLOW_SENSORS 2 +#define AQUAERO_CTRL_REPORT_SIZE 0xa93 /* Sensor report offsets for Aquaero fan controllers */ #define AQUAERO_SENSOR_START 0x65 @@ -106,6 +116,9 @@ static u8 secondary_ctrl_report[] = { #define AQUAERO_FAN_SPEED_OFFSET 0x00 static u16 aquaero_sensor_fan_offsets[] = { 0x167, 0x173, 0x17f, 0x18B }; +/* Control report offsets for the Aquaero fan controllers */ +#define AQUAERO_TEMP_CTRL_OFFSET 0xdb + /* Specs of the D5 Next pump */ #define D5NEXT_NUM_FANS 2 #define D5NEXT_NUM_SENSORS 1 @@ -441,6 +454,10 @@ struct aqc_data { const char *name; int status_report_id; /* Used for legacy devices, report is stored in buffer */ + int ctrl_report_id; + int secondary_ctrl_report_id; + int secondary_ctrl_report_size; + u8 *secondary_ctrl_report; int buffer_size; u8 *buffer; @@ -513,7 +530,7 @@ static int aqc_get_ctrl_data(struct aqc_data *priv) int ret; memset(priv->buffer, 0x00, priv->buffer_size); - ret = hid_hw_raw_request(priv->hdev, CTRL_REPORT_ID, priv->buffer, priv->buffer_size, + ret = hid_hw_raw_request(priv->hdev, priv->ctrl_report_id, priv->buffer, priv->buffer_size, HID_FEATURE_REPORT, HID_REQ_GET_REPORT); if (ret < 0) ret = -ENODATA; @@ -527,23 +544,27 @@ static int aqc_send_ctrl_data(struct aqc_data *priv) int ret; u16 checksum; - /* Init and xorout value for CRC-16/USB is 0xffff */ - checksum = crc16(0xffff, priv->buffer + priv->checksum_start, priv->checksum_length); - checksum ^= 0xffff; + /* Checksum is not needed for Aquaero */ + if (priv->kind != aquaero) { + /* Init and xorout value for CRC-16/USB is 0xffff */ + checksum = crc16(0xffff, priv->buffer + priv->checksum_start, + priv->checksum_length); + checksum ^= 0xffff; - /* Place the new checksum at the end of the report */ - put_unaligned_be16(checksum, priv->buffer + priv->checksum_offset); + /* Place the new checksum at the end of the report */ + put_unaligned_be16(checksum, priv->buffer + priv->checksum_offset); + } /* Send the patched up report back to the device */ - ret = hid_hw_raw_request(priv->hdev, CTRL_REPORT_ID, priv->buffer, priv->buffer_size, + ret = hid_hw_raw_request(priv->hdev, priv->ctrl_report_id, priv->buffer, priv->buffer_size, HID_FEATURE_REPORT, HID_REQ_SET_REPORT); if (ret < 0) return ret; /* The official software sends this report after every change, so do it here as well */ - ret = hid_hw_raw_request(priv->hdev, SECONDARY_CTRL_REPORT_ID, secondary_ctrl_report, - SECONDARY_CTRL_REPORT_SIZE, HID_FEATURE_REPORT, - HID_REQ_SET_REPORT); + ret = hid_hw_raw_request(priv->hdev, priv->secondary_ctrl_report_id, + priv->secondary_ctrl_report, priv->secondary_ctrl_report_size, + HID_FEATURE_REPORT, HID_REQ_SET_REPORT); return ret; } @@ -969,10 +990,10 @@ static const struct hwmon_channel_info *aqc_info[] = { HWMON_T_INPUT | HWMON_T_LABEL | HWMON_T_OFFSET, HWMON_T_INPUT | HWMON_T_LABEL | HWMON_T_OFFSET, HWMON_T_INPUT | HWMON_T_LABEL | HWMON_T_OFFSET, - HWMON_T_INPUT | HWMON_T_LABEL, - HWMON_T_INPUT | HWMON_T_LABEL, - HWMON_T_INPUT | HWMON_T_LABEL, - HWMON_T_INPUT | HWMON_T_LABEL, + HWMON_T_INPUT | HWMON_T_LABEL | HWMON_T_OFFSET, + HWMON_T_INPUT | HWMON_T_LABEL | HWMON_T_OFFSET, + HWMON_T_INPUT | HWMON_T_LABEL | HWMON_T_OFFSET, + HWMON_T_INPUT | HWMON_T_LABEL | HWMON_T_OFFSET, HWMON_T_INPUT | HWMON_T_LABEL, HWMON_T_INPUT | HWMON_T_LABEL, HWMON_T_INPUT | HWMON_T_LABEL, @@ -1275,6 +1296,9 @@ static int aqc_probe(struct hid_device *hdev, const struct hid_device_id *id) priv->num_flow_sensors = AQUAERO_NUM_FLOW_SENSORS; priv->flow_sensors_start_offset = AQUAERO_FLOW_SENSORS_START; + priv->buffer_size = AQUAERO_CTRL_REPORT_SIZE; + priv->temp_ctrl_offset = AQUAERO_TEMP_CTRL_OFFSET; + priv->temp_label = label_temp_sensors; priv->virtual_temp_label = label_virtual_temp_sensors; priv->calc_virt_temp_label = label_aquaero_calc_temp_sensors; @@ -1438,6 +1462,11 @@ static int aqc_probe(struct hid_device *hdev, const struct hid_device_id *id) priv->firmware_version_offset = AQUAERO_FIRMWARE_VERSION; priv->fan_structure = &aqc_aquaero_fan_structure; + + priv->ctrl_report_id = AQUAERO_CTRL_REPORT_ID; + priv->secondary_ctrl_report_id = AQUAERO_SECONDARY_CTRL_REPORT_ID; + priv->secondary_ctrl_report_size = AQUAERO_SECONDARY_CTRL_REPORT_SIZE; + priv->secondary_ctrl_report = aquaero_secondary_ctrl_report; break; case poweradjust3: priv->status_report_id = POWERADJUST3_STATUS_REPORT_ID; @@ -1446,6 +1475,11 @@ static int aqc_probe(struct hid_device *hdev, const struct hid_device_id *id) priv->serial_number_start_offset = AQC_SERIAL_START; priv->firmware_version_offset = AQC_FIRMWARE_VERSION; + priv->ctrl_report_id = CTRL_REPORT_ID; + priv->secondary_ctrl_report_id = SECONDARY_CTRL_REPORT_ID; + priv->secondary_ctrl_report_size = SECONDARY_CTRL_REPORT_SIZE; + priv->secondary_ctrl_report = secondary_ctrl_report; + if (priv->kind == aquastreamult) priv->fan_structure = &aqc_aquastreamult_fan_structure; else
Support sending control reports to Aquacomputer Aquaero. This commit only enables control of the temperature offset as this works in the same manner as with already supported devices. Also, mention temperature offset control for Aquaero in docs. Signed-off-by: Leonard Anderweit <leonard.anderweit@gmail.com> --- Documentation/hwmon/aquacomputer_d5next.rst | 4 +- drivers/hwmon/aquacomputer_d5next.c | 62 ++++++++++++++++----- 2 files changed, 50 insertions(+), 16 deletions(-)