From patchwork Wed Apr 17 17:50:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksa Savic X-Patchwork-Id: 13633700 Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 06F1A171678; Wed, 17 Apr 2024 17:51:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713376280; cv=none; b=NVx6H+P3ojRD8XAVd+PZsFZiIbwmFUt79PwiWjskHn4pIg7h+EHGK1Y20E4Q7/JrWG37tVJk+LnARTO0sC0KdqACaSRM1E2wuRNxvM4Wc+0AoI2bW6YtDOCj7GGjM7TRtLJnn+oLd9PvVXJ+onf1rSDtkaTZa9SiCPPoDzYvfN0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713376280; c=relaxed/simple; bh=NmylBIEaAwYTT2EFOS+5DddC7LLpxKKVE8Pro8PU9kQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=WXmYkoI/0e0BPRrSFQrnS0doy0pNc4ExrMFJMKKfDzPUzPBKDunid/+jvO2PpdEXkT31JRwxdcM+Rt1WuwfDSqUvFxkP4Eq+wy62rrpqSucbyKZYRws0hyx4SP4vjVl84ZYx0PpqlskJMWifSOc7Z8ydZp7Mjk2NwEpMrh6oXqI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=ZT/9C7CI; arc=none smtp.client-ip=209.85.128.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ZT/9C7CI" Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-418d10e6630so70515e9.1; Wed, 17 Apr 2024 10:51:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713376276; x=1713981076; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=gCAwGt1/GtnUE+EPRZRBvhp7rEsyAUw1E8IyUXERHcw=; b=ZT/9C7CIqqa5UreXQxLOMxezNNvo5zihdTFAQii1ePc9WvOK8A477gtXBzh8pwZnRY ZYn8CEgOxGij/OLeDxwcOnOq6QtNQ865UfrP9ZzTCzCylQ0KaaDIOzYaX2aLWkczYPfy lr9aNA0ZG62guIti/IXqCIsUewmce2GgcS//r6M4g5AoBqnBA5hBGKhRzGaZlWShitY/ ouyDgV2e9q0iFnXWugTSLB4J4yKhtR7sgTOarOiSRqlPiUwBQVQNz6wf/yfEJ3WJONLj /SMNNfpDdXic/ukIRm4iwG779/fSb+V1QM32qUlmcfA8oEiPvzR2RARRZaGHmLMctK04 TB7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713376276; x=1713981076; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gCAwGt1/GtnUE+EPRZRBvhp7rEsyAUw1E8IyUXERHcw=; b=Oq2Cdz7cpJrZqK8xNoHy9ksHdksE4dE9voboPW4scP1inLUTIEcDK6d9fSESnaCoHG Y8IhXi/zr8dFwXA+RnVibhSLEwpJQ0mE+OejAMG84jU4EfXo2UFj5p+7wlFNBTSKyxX+ a5FFHM93ROg7pikUe2hpnB0lUOdZNYhvaNM0qwkVKJi9jr3SPfnlD2HraHVCh8t0wkG/ XKGqnKHU5wd6ZH8QAXCbeRtl5Jy56jseOU8HPIR/Tyb6ACcUTHE3IsepXVYPgP07RteA aBN2JoyqIy23ftLABSBNYTCmxhvKS6z5jI8bjy8f8ZBJ7J6fZO/4YyM8X2Ha38fcuaRc 8UMw== X-Forwarded-Encrypted: i=1; AJvYcCV7m94zPAGhOD3bq4qJUZBCUtLSKFKtzuBR3iQ8q5fcwbKrfwx6uquhzJgBcYeJion9tqORFa9R9SO4P3a35+CuxY/UVXt+7nxKLN6ehcINZcLeI5i7mjXkkBW7NdB/2HOdHk51ETtV X-Gm-Message-State: AOJu0Ywfx3VGl4ocbIuJGW2aprhqkt+1Ce6Lsn3YmCTZMMnLcb4saFy0 /yYjSASlpz7wVZDKErK5D7RZ7L7NMm/muk9jzrCOPjIUUGNTG+w9L0exes/jGj8= X-Google-Smtp-Source: AGHT+IGMvUXOVf3pqXKWKTjdLeglWCvkL7rKPuuOYrIu/jnWNKeewEL8z7o3gGr+I5/5ho31vJ4gPw== X-Received: by 2002:a05:600c:1e0b:b0:418:9b4e:8963 with SMTP id ay11-20020a05600c1e0b00b004189b4e8963mr269525wmb.16.1713376276615; Wed, 17 Apr 2024 10:51:16 -0700 (PDT) Received: from fedora.. (cable-178-148-234-71.dynamic.sbb.rs. [178.148.234.71]) by smtp.gmail.com with ESMTPSA id v7-20020a05600c470700b00418916f5848sm3569866wmo.43.2024.04.17.10.51.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Apr 2024 10:51:16 -0700 (PDT) From: Aleksa Savic To: linux-hwmon@vger.kernel.org Cc: David Flemstrom , Aleksa Savic , Jack Doan , Jean Delvare , Guenter Roeck , Jonathan Corbet , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] hwmon: (aquacomputer_d5next) Add support for Octo flow sensor Date: Wed, 17 Apr 2024 19:50:35 +0200 Message-ID: <20240417175037.32499-2-savicaleksa83@gmail.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240417175037.32499-1-savicaleksa83@gmail.com> References: <20240417175037.32499-1-savicaleksa83@gmail.com> Precedence: bulk X-Mailing-List: linux-hwmon@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Add support for reading the flow sensor value on the Aquacomputer Octo. Implemented by David Flemstrom [1]. [1] https://github.com/aleksamagicka/aquacomputer_d5next-hwmon/pull/95 Originally-from: David Flemstrom Signed-off-by: Aleksa Savic --- Documentation/hwmon/aquacomputer_d5next.rst | 8 ++--- drivers/hwmon/aquacomputer_d5next.c | 34 +++++++++++++-------- 2 files changed, 25 insertions(+), 17 deletions(-) diff --git a/Documentation/hwmon/aquacomputer_d5next.rst b/Documentation/hwmon/aquacomputer_d5next.rst index cb073c79479c..f84b6a5e4373 100644 --- a/Documentation/hwmon/aquacomputer_d5next.rst +++ b/Documentation/hwmon/aquacomputer_d5next.rst @@ -45,9 +45,9 @@ seems to require sending it a complete configuration. That includes addressable RGB LEDs, for which there is no standard sysfs interface. Thus, that task is better suited for userspace tools. -The Octo exposes four physical and sixteen virtual temperature sensors, as well as -eight PWM controllable fans, along with their speed (in RPM), power, voltage and -current. +The Octo exposes four physical and sixteen virtual temperature sensors, a flow sensor +as well as eight PWM controllable fans, along with their speed (in RPM), power, voltage +and current. The Quadro exposes four physical and sixteen virtual temperature sensors, a flow sensor and four PWM controllable fans, along with their speed (in RPM), power, @@ -95,7 +95,7 @@ Sysfs entries ================ ============================================================== temp[1-20]_input Physical/virtual temperature sensors (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) +fan[1-9]_input Pump/fan speed (in RPM) / Flow speed (in dL/h) fan1_min Minimal fan speed (in RPM) fan1_max Maximal fan speed (in RPM) fan1_target Target fan speed (in RPM) diff --git a/drivers/hwmon/aquacomputer_d5next.c b/drivers/hwmon/aquacomputer_d5next.c index 2efe97f8d003..166044e01921 100644 --- a/drivers/hwmon/aquacomputer_d5next.c +++ b/drivers/hwmon/aquacomputer_d5next.c @@ -202,12 +202,14 @@ static u16 aquastreamult_sensor_fan_offsets[] = { AQUASTREAMULT_FAN_OFFSET }; #define OCTO_NUM_FANS 8 #define OCTO_NUM_SENSORS 4 #define OCTO_NUM_VIRTUAL_SENSORS 16 +#define OCTO_NUM_FLOW_SENSORS 1 #define OCTO_CTRL_REPORT_SIZE 0x65F /* Sensor report offsets for the Octo */ #define OCTO_POWER_CYCLES 0x18 #define OCTO_SENSOR_START 0x3D #define OCTO_VIRTUAL_SENSORS_START 0x45 +#define OCTO_FLOW_SENSOR_OFFSET 0x7B static u16 octo_sensor_fan_offsets[] = { 0x7D, 0x8A, 0x97, 0xA4, 0xB1, 0xBE, 0xCB, 0xD8 }; /* Control report offsets for the Octo */ @@ -363,18 +365,6 @@ static const char *const label_aquaero_calc_temp_sensors[] = { "Calc. virtual sensor 4" }; -/* Labels for Octo and Quadro (except speed) */ -static const char *const label_fan_speed[] = { - "Fan 1 speed", - "Fan 2 speed", - "Fan 3 speed", - "Fan 4 speed", - "Fan 5 speed", - "Fan 6 speed", - "Fan 7 speed", - "Fan 8 speed" -}; - static const char *const label_fan_power[] = { "Fan 1 power", "Fan 2 power", @@ -408,6 +398,19 @@ static const char *const label_fan_current[] = { "Fan 8 current" }; +/* Labels for Octo fan speeds */ +static const char *const label_octo_speeds[] = { + "Fan 1 speed", + "Fan 2 speed", + "Fan 3 speed", + "Fan 4 speed", + "Fan 5 speed", + "Fan 6 speed", + "Fan 7 speed", + "Fan 8 speed", + "Flow speed [dL/h]", +}; + /* Labels for Quadro fan speeds */ static const char *const label_quadro_speeds[] = { "Fan 1 speed", @@ -844,6 +847,7 @@ static umode_t aqc_is_visible(const void *data, enum hwmon_sensor_types type, u3 return 0444; break; case aquaero: + case octo: case quadro: case highflow: /* Special case to support flow sensors */ @@ -1289,6 +1293,7 @@ static const struct hwmon_channel_info * const aqc_info[] = { HWMON_F_INPUT | HWMON_F_LABEL | HWMON_F_PULSES, HWMON_F_INPUT | HWMON_F_LABEL, HWMON_F_INPUT | HWMON_F_LABEL, + HWMON_F_INPUT | HWMON_F_LABEL, HWMON_F_INPUT | HWMON_F_LABEL), HWMON_CHANNEL_INFO(power, HWMON_P_INPUT | HWMON_P_LABEL, @@ -1658,6 +1663,9 @@ static int aqc_probe(struct hid_device *hdev, const struct hid_device_id *id) priv->temp_sensor_start_offset = OCTO_SENSOR_START; priv->num_virtual_temp_sensors = OCTO_NUM_VIRTUAL_SENSORS; priv->virtual_temp_sensor_start_offset = OCTO_VIRTUAL_SENSORS_START; + priv->num_flow_sensors = OCTO_NUM_FLOW_SENSORS; + priv->flow_sensors_start_offset = OCTO_FLOW_SENSOR_OFFSET; + priv->temp_ctrl_offset = OCTO_TEMP_CTRL_OFFSET; priv->buffer_size = OCTO_CTRL_REPORT_SIZE; @@ -1667,7 +1675,7 @@ static int aqc_probe(struct hid_device *hdev, const struct hid_device_id *id) priv->temp_label = label_temp_sensors; priv->virtual_temp_label = label_virtual_temp_sensors; - priv->speed_label = label_fan_speed; + priv->speed_label = label_octo_speeds; priv->power_label = label_fan_power; priv->voltage_label = label_fan_voltage; priv->current_label = label_fan_current; From patchwork Wed Apr 17 17:50:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksa Savic X-Patchwork-Id: 13633701 Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9F798174ECD; Wed, 17 Apr 2024 17:51:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713376285; cv=none; b=kOa3A9ge8FFTpzB2X4e1xUXHc8bUQEGgHJwZXHuMXZfl0NizU0z9pA7JtcamenoUF/4hN3esWdEh5UidFaD7pS3Q1HgVjmF3xrXARMQg9BaaVk0U/3/FseRC4Qldejlq2JStS5VYSVL1kFHWjfdEhNpIWlfVUxZOw2WFQPfXsu8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713376285; c=relaxed/simple; bh=UtXbvqhE7xD5plrDZFZ6E8KDK4bDTVwFxnGb3CZpD1E=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=grIUUuPtHNAO8v7eQvjTb1BQ5Lx+v0+sHSIfFYnxLTsV4IhmKswnHhP7NzHp5u24cp56fv0AoP2fUpva1Yw1CVno5MBpFV004/zxg3vC5Imn6l1N2+0Tks7cgqmzrcllHBPEbJYG74LxeUDk4jIHP+9L+znhArbiEdFZXjqxifs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=VFGy9vSf; arc=none smtp.client-ip=209.85.128.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="VFGy9vSf" Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-418a2de4d8fso23785e9.2; Wed, 17 Apr 2024 10:51:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713376281; x=1713981081; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ft5wsqvMDGwoTIQ2TLrexp9TcOahaFf12PegEvKDN5c=; b=VFGy9vSfp6a/46g+eu7WnMybwJLZEmb3EZfLXAPR+Eni6tET5b4+X+9QOWIq2Oujvw Zzwj4Yuag7RPs1vav6tHig5QzAEpNEMFq8QggriuSkKrO9IqOClcLq2lDK0N5PGFPZ7y 01ak5umtyjGOGWpiACW+BPmlpc0wYEW7KkVwKr8yZpFXtazHoM5iibojSwCGMs63mSid 3IaHnOfYGogqpvF5zNvyAX+4j8pmUUxD6/VkeFXcD332veDKGRmIccJ1DdgY06xYaOKG go9whl7xlP54r7jRcW7mj44eKJmMNUysUVNax8a+Ti75amT7c3OcOH/7H+SS9BJ5sife I13g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713376281; x=1713981081; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ft5wsqvMDGwoTIQ2TLrexp9TcOahaFf12PegEvKDN5c=; b=eXRUkA29h6S3Wl3OoBl6wQ8Wn9lKzZOyTHdxajTtUzInDOrVKECEWB2UkBJJ9UjB3V iVwI18cKSB8vVBUUrjpUzPS2FSF4+4FJXzy9SEYTuqzebPXSivBIyLjSH4cNQ/IxIEZQ aACCAcVMfAPegp+xaGPclufC88ft4PohBzulvjvDSm/xebQkWXXJIrSZFiBgeNQ8u7dn dRFq/MTeKOG4sF7JMolbbS3obLAyXdFY6i7GAl+Cz8Ycu2oHK8M0J04MDF29AKMpbwUm oYuApxOib1P2fYde7ZngOnkYWf3FnCrcZz/NA9GU9H+xEA90Nc7OXYEuSeeOaHy2pw6I 9DUg== X-Forwarded-Encrypted: i=1; AJvYcCUX6gA/bJ81mYpeAPBD8HsMa1RaGfpU0LnM4n9DnLGU4OiiNe4V7ZcqtRjb8vuEXEfGUyLhJk5XTte+/5ctPJHed3vmQ0iJf7NTLHka9H3JWjGroDpmRETVhfFw79TowJ5NaIIgGG19 X-Gm-Message-State: AOJu0YwtYNlIHCtZUKkCywLO49rUjIk9mGKx/nQCROnPQL1iNxYSAPi3 SFxTPn8t2GaTKn4uppL7A8vJWk+EcjkW5ulhPLIJegf+vGcCeImRySBHZFVfo64= X-Google-Smtp-Source: AGHT+IHk2VAMi49T+4077Go5Hlx6VJT8wTCmuQe1qUocMLKqn83srsiJL/JS/9CTW/Evw911UOROpw== X-Received: by 2002:a05:600c:3b27:b0:418:32f7:e87 with SMTP id m39-20020a05600c3b2700b0041832f70e87mr203669wms.32.1713376281460; Wed, 17 Apr 2024 10:51:21 -0700 (PDT) Received: from fedora.. (cable-178-148-234-71.dynamic.sbb.rs. [178.148.234.71]) by smtp.gmail.com with ESMTPSA id v7-20020a05600c470700b00418916f5848sm3569866wmo.43.2024.04.17.10.51.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Apr 2024 10:51:21 -0700 (PDT) From: Aleksa Savic To: linux-hwmon@vger.kernel.org Cc: David Flemstrom , Aleksa Savic , Jack Doan , Jean Delvare , Guenter Roeck , Jonathan Corbet , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] hwmon: (aquacomputer_d5next) Add support for Octo flow sensor pulses Date: Wed, 17 Apr 2024 19:50:36 +0200 Message-ID: <20240417175037.32499-3-savicaleksa83@gmail.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240417175037.32499-1-savicaleksa83@gmail.com> References: <20240417175037.32499-1-savicaleksa83@gmail.com> Precedence: bulk X-Mailing-List: linux-hwmon@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Add support for reading and writing the flow sensor pulses on the Aquacomputer Octo. Implemented by David Flemstrom [1]. [1] https://github.com/aleksamagicka/aquacomputer_d5next-hwmon/pull/95 Originally-from: David Flemstrom Signed-off-by: Aleksa Savic --- Documentation/hwmon/aquacomputer_d5next.rst | 3 ++- drivers/hwmon/aquacomputer_d5next.c | 17 +++++++++++++---- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/Documentation/hwmon/aquacomputer_d5next.rst b/Documentation/hwmon/aquacomputer_d5next.rst index f84b6a5e4373..49163f387b90 100644 --- a/Documentation/hwmon/aquacomputer_d5next.rst +++ b/Documentation/hwmon/aquacomputer_d5next.rst @@ -47,7 +47,7 @@ better suited for userspace tools. The Octo exposes four physical and sixteen virtual temperature sensors, a flow sensor as well as eight PWM controllable fans, along with their speed (in RPM), power, voltage -and current. +and current. Flow sensor pulses are also available. The Quadro exposes four physical and sixteen virtual temperature sensors, a flow sensor and four PWM controllable fans, along with their speed (in RPM), power, @@ -100,6 +100,7 @@ fan1_min Minimal fan speed (in RPM) fan1_max Maximal fan speed (in RPM) fan1_target Target fan speed (in RPM) fan5_pulses Quadro flow sensor pulses +fan9_pulses Octo flow sensor pulses power[1-8]_input Pump/fan power (in micro Watts) in[0-7]_input Pump/fan voltage (in milli Volts) curr[1-8]_input Pump/fan current (in milli Amperes) diff --git a/drivers/hwmon/aquacomputer_d5next.c b/drivers/hwmon/aquacomputer_d5next.c index 166044e01921..8e55cd2f46f5 100644 --- a/drivers/hwmon/aquacomputer_d5next.c +++ b/drivers/hwmon/aquacomputer_d5next.c @@ -214,6 +214,7 @@ static u16 octo_sensor_fan_offsets[] = { 0x7D, 0x8A, 0x97, 0xA4, 0xB1, 0xBE, 0xC /* Control report offsets for the Octo */ #define OCTO_TEMP_CTRL_OFFSET 0xA +#define OCTO_FLOW_PULSES_CTRL_OFFSET 0x6 /* Fan speed offsets (0-100%) */ static u16 octo_ctrl_fan_offsets[] = { 0x5B, 0xB0, 0x105, 0x15A, 0x1AF, 0x204, 0x259, 0x2AE }; @@ -861,9 +862,16 @@ static umode_t aqc_is_visible(const void *data, enum hwmon_sensor_types type, u3 } break; case hwmon_fan_pulses: - /* Special case for Quadro flow sensor */ - if (priv->kind == quadro && channel == priv->num_fans) - return 0644; + /* Special case for Quadro/Octo flow sensor */ + if (channel == priv->num_fans) { + switch (priv->kind) { + case quadro: + case octo: + return 0644; + default: + break; + } + } break; case hwmon_fan_min: case hwmon_fan_max: @@ -1294,7 +1302,7 @@ static const struct hwmon_channel_info * const aqc_info[] = { HWMON_F_INPUT | HWMON_F_LABEL, HWMON_F_INPUT | HWMON_F_LABEL, HWMON_F_INPUT | HWMON_F_LABEL, - HWMON_F_INPUT | HWMON_F_LABEL), + HWMON_F_INPUT | HWMON_F_LABEL | HWMON_F_PULSES), HWMON_CHANNEL_INFO(power, HWMON_P_INPUT | HWMON_P_LABEL, HWMON_P_INPUT | HWMON_P_LABEL, @@ -1671,6 +1679,7 @@ static int aqc_probe(struct hid_device *hdev, const struct hid_device_id *id) priv->buffer_size = OCTO_CTRL_REPORT_SIZE; priv->ctrl_report_delay = CTRL_REPORT_DELAY; + priv->flow_pulses_ctrl_offset = OCTO_FLOW_PULSES_CTRL_OFFSET; priv->power_cycle_count_offset = OCTO_POWER_CYCLES; priv->temp_label = label_temp_sensors;