will be called aht10.
config SENSORS_AQUACOMPUTER_D5NEXT
- tristate "Aquacomputer D5 Next, Octo, Quadro, Farbwerk, and Farbwerk 360"
+ tristate "Aquacomputer D5 Next, Octo, Quadro, Farbwerk, Farbwerk 360, High Flow Next"
depends on USB_HID
select CRC16
help
If you say yes here you get support for sensors and fans of
the Aquacomputer D5 Next watercooling pump, Octo and Quadro fan
- controllers, Farbwerk and Farbwerk 360 RGB controllers, where
- available.
+ controllers, Farbwerk and Farbwerk 360 RGB controllers, High Flow
+ Next sensor, where available.
This driver can also be built as a module. If so, the module
will be called aquacomputer_d5next.
// SPDX-License-Identifier: GPL-2.0+
/*
* hwmon driver for Aquacomputer devices (D5 Next, Farbwerk, Farbwerk 360, Octo,
- * Quadro)
+ * Quadro, High Flow Next)
*
* Aquacomputer devices send HID reports (with ID 0x01) every second to report
* sensor values.
#define USB_PRODUCT_ID_D5NEXT 0xf00e
#define USB_PRODUCT_ID_FARBWERK360 0xf010
#define USB_PRODUCT_ID_OCTO 0xf011
+#define USB_PRODUCT_ID_HIGHFLOWNEXT 0xf012
-enum kinds { d5next, farbwerk, farbwerk360, octo, quadro };
+enum kinds { d5next, farbwerk, farbwerk360, octo, quadro, highflownext };
static const char *const aqc_device_names[] = {
[d5next] = "d5next",
[farbwerk] = "farbwerk",
[farbwerk360] = "farbwerk360",
[octo] = "octo",
- [quadro] = "quadro"
+ [quadro] = "quadro",
+ [highflownext] = "highflownext"
};
#define DRIVER_NAME "aquacomputer_d5next"
/* Fan speed registers in Quadro control report (from 0-100%) */
static u16 quadro_ctrl_fan_offsets[] = { 0x37, 0x8c, 0xe1, 0x136 };
+/* Register offsets for the High Flow Next */
+#define HIGHFLOWNEXT_NUM_SENSORS 2
+#define HIGHFLOWNEXT_SENSOR_START 85
+#define HIGHFLOWNEXT_FLOW 81
+#define HIGHFLOWNEXT_WATER_QUALITY 89
+#define HIGHFLOWNEXT_POWER 91
+#define HIGHFLOWNEXT_CONDUCTIVITY 95
+#define HIGHFLOWNEXT_5V_VOLTAGE 97
+#define HIGHFLOWNEXT_5V_VOLTAGE_USB 99
+
/* Labels for D5 Next */
static const char *const label_d5next_temp[] = {
"Coolant temp"
"Flow speed [dL/h]"
};
+/* Labels for High Flow Next */
+static const char *const label_highflownext_temp_sensors[] = {
+ "Coolant temp",
+ "External sensor"
+};
+
+static const char *const label_highflownext_fan_speed[] = {
+ "Flow [dL/h]",
+ "Water quality [%]",
+ "Conductivity [nS/cm]",
+};
+
+static const char *const label_highflownext_power[] = {
+ "Dissipated power",
+};
+
+static const char *const label_highflownext_voltage[] = {
+ "+5V voltage",
+ "+5V USB voltage"
+};
+
struct aqc_data {
struct hid_device *hdev;
struct device *hwmon_dev;
break;
case hwmon_fan:
switch (priv->kind) {
+ case highflownext:
+ /* Special case to support flow sensor, water quality and conductivity */
+ if (channel < 3)
+ return 0444;
+ break;
case quadro:
/* Special case to support flow sensor */
if (channel < priv->num_fans + 1)
}
break;
case hwmon_power:
+ switch (priv->kind) {
+ case highflownext:
+ /* Special case to support one power sensor */
+ if (channel == 0)
+ return 0444;
+ break;
+ default:
+ if (channel < priv->num_fans)
+ return 0444;
+ break;
+ }
+ break;
case hwmon_curr:
if (channel < priv->num_fans)
return 0444;
if (channel < priv->num_fans + 2)
return 0444;
break;
+ case highflownext:
+ /* Special case to support two voltage sensors */
+ if (channel < 2)
+ return 0444;
+ break;
default:
if (channel < priv->num_fans)
return 0444;
case quadro:
priv->speed_input[4] = get_unaligned_be16(data + priv->flow_sensor_offset);
break;
+ case highflownext:
+ /* If external temp sensor is not connected, its power reading is also N/A */
+ if (priv->temp_input[1] == -ENODATA)
+ priv->power_input[0] = -ENODATA;
+ else
+ priv->power_input[0] =
+ get_unaligned_be16(data + HIGHFLOWNEXT_POWER) * 1000000;
+
+ priv->voltage_input[0] = get_unaligned_be16(data + HIGHFLOWNEXT_5V_VOLTAGE) * 10;
+ priv->voltage_input[1] =
+ get_unaligned_be16(data + HIGHFLOWNEXT_5V_VOLTAGE_USB) * 10;
+
+ priv->speed_input[0] = get_unaligned_be16(data + HIGHFLOWNEXT_FLOW);
+ priv->speed_input[1] = get_unaligned_be16(data + HIGHFLOWNEXT_WATER_QUALITY);
+ priv->speed_input[2] = get_unaligned_be16(data + HIGHFLOWNEXT_CONDUCTIVITY);
+ break;
default:
break;
}
priv->voltage_label = label_fan_voltage;
priv->current_label = label_fan_current;
break;
+ case USB_PRODUCT_ID_HIGHFLOWNEXT:
+ priv->kind = highflownext;
+
+ priv->num_fans = 0;
+ priv->num_temp_sensors = HIGHFLOWNEXT_NUM_SENSORS;
+ priv->temp_sensor_start_offset = HIGHFLOWNEXT_SENSOR_START;
+ priv->power_cycle_count_offset = QUADRO_POWER_CYCLES;
+
+ priv->temp_label = label_highflownext_temp_sensors;
+ priv->speed_label = label_highflownext_fan_speed;
+ priv->power_label = label_highflownext_power;
+ priv->voltage_label = label_highflownext_voltage;
+ break;
default:
break;
}
{ HID_USB_DEVICE(USB_VENDOR_ID_AQUACOMPUTER, USB_PRODUCT_ID_FARBWERK360) },
{ HID_USB_DEVICE(USB_VENDOR_ID_AQUACOMPUTER, USB_PRODUCT_ID_OCTO) },
{ HID_USB_DEVICE(USB_VENDOR_ID_AQUACOMPUTER, USB_PRODUCT_ID_QUADRO) },
+ { HID_USB_DEVICE(USB_VENDOR_ID_AQUACOMPUTER, USB_PRODUCT_ID_HIGHFLOWNEXT) },
{ }
};