hwmon: (aquacomputer_d5next) Add support for reading the +12V voltage sensor on D5 Next
Subsystems (2)
Aleksa Savic
maintainerPATCH 1/1 hwmon: (aquacomputer_d5next) Add support for reading the +12V voltage sensor on D5 Next
Add support for reading the +12V voltage that the D5 Next pump receives.
Signed-off-by Aleksa Savic <[email protected]>
--- drivers/hwmon/aquacomputer_d5next.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
drivers/hwmon/aquacomputer_d5next.c +6 -3
@@ -71,6 +71,7 @@ static u8 secondary_ctrl_report[] = {#define D5NEXT_PUMP_OFFSET 0x6c#define D5NEXT_FAN_OFFSET 0x5f#define D5NEXT_5V_VOLTAGE 0x39 +#define D5NEXT_12V_VOLTAGE 0x37#define D5NEXT_CTRL_REPORT_SIZE 0x329static u8 d5next_sensor_fan_offsets[] = {D5NEXT_PUMP_OFFSET ,D5NEXT_FAN_OFFSET };
@@ -114,7 +115,8 @@ static const char *const label_d5next_power[] = {static const char *const label_d5next_voltages[] = {"Pump voltage" ,"Fan voltage" , -"+5V voltage" +"+5V voltage" , +"+12V voltage" };static const char *const label_d5next_current[] = {
@@ -340,8 +342,8 @@ static umode_t aqc_is_visible(const void *data, enum hwmon_sensor_types type, u3case hwmon_in:switch (priv->kind) {case d5next: -/* Special case to support voltage sensor */ -if (channel < priv->num_fans +1 ) +/* Special case to support +5V and +12V voltage sensors */ +if (channel < priv->num_fans +2 )return 0444 ;break ;default :
@@ -574,6 +576,7 @@ static int aqc_raw_event(struct hid_device *hdev, struct hid_report *report, u8switch (priv->kind) {case d5next: priv->voltage_input[2 ] =get_unaligned_be16 (data +D5NEXT_5V_VOLTAGE ) *10 ; + priv->voltage_input[3 ] =get_unaligned_be16 (data +D5NEXT_12V_VOLTAGE ) *10 ;break ;default :break ;
Signature · 1 line
2.37.1
Quoted 3 lines · Aleksa Savic
Add support for reading the +12V voltage that the D5 Next pump receives.
Signed-off-by Aleksa Savic <[email protected]>
Applied.
Thanks,
Guenter
Quoted 45 lines
--- drivers/hwmon/aquacomputer_d5next.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)drivers/hwmon/aquacomputer_d5next.c +6
-3@@ -71,6 +71,7 @@ static u8 secondary_ctrl_report[] = {#define D5NEXT_PUMP_OFFSET 0x6c#define D5NEXT_FAN_OFFSET 0x5f#define D5NEXT_5V_VOLTAGE 0x39 +#define D5NEXT_12V_VOLTAGE 0x37#define D5NEXT_CTRL_REPORT_SIZE 0x329static u8 d5next_sensor_fan_offsets[] = {D5NEXT_PUMP_OFFSET ,D5NEXT_FAN_OFFSET };@@ -114,7 +115,8 @@ static const char *const label_d5next_power[] = {static const char *const label_d5next_voltages[] = {"Pump voltage" ,"Fan voltage" , -"+5V voltage" +"+5V voltage" , +"+12V voltage" };static const char *const label_d5next_current[] = {@@ -340,8 +342,8 @@ static umode_t aqc_is_visible(const void *data, enum hwmon_sensor_types type, u3case hwmon_in:switch (priv->kind) {case d5next: -/* Special case to support voltage sensor */ -if (channel < priv->num_fans +1 ) +/* Special case to support +5V and +12V voltage sensors */ +if (channel < priv->num_fans +2 )return 0444 ;break ;default :@@ -574,6 +576,7 @@ static int aqc_raw_event(struct hid_device *hdev, struct hid_report *report, u8switch (priv->kind) {case d5next: priv->voltage_input[2 ] =get_unaligned_be16 (data +D5NEXT_5V_VOLTAGE ) *10 ; + priv->voltage_input[3 ] =get_unaligned_be16 (data +D5NEXT_12V_VOLTAGE ) *10 ;break ;default :break ;