[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190509211353.213194-12-gwendal@chromium.org>
Date: Thu, 9 May 2019 14:13:34 -0700
From: Gwendal Grignou <gwendal@...omium.org>
To: enric.balletbo@...labora.com, bleung@...omium.org,
groeck@...omium.org, lee.jones@...aro.org, jic23@...nel.org,
broonie@...nel.org, cychiang@...omium.org, tiwai@...e.com
Cc: linux-iio@...r.kernel.org, alsa-devel@...a-project.org,
linux-kernel@...r.kernel.org,
Gwendal Grignou <gwendal@...omium.org>
Subject: [PATCH v3 11/30] mfd: cros_ec: Add PWM_SET_DUTY API
Add API for fan control.
Acked-by: Enric Balletbo i Serra <enric.balletbo@...labora.com>
Acked-by: Benson Leung <bleung@...omium.org>
Signed-off-by: Gwendal Grignou <gwendal@...omium.org>
---
include/linux/mfd/cros_ec_commands.h | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/include/linux/mfd/cros_ec_commands.h b/include/linux/mfd/cros_ec_commands.h
index 3d1d26f62bd3..2b3a94a4f0f4 100644
--- a/include/linux/mfd/cros_ec_commands.h
+++ b/include/linux/mfd/cros_ec_commands.h
@@ -1521,11 +1521,19 @@ struct ec_response_pwm_get_fan_rpm {
/* Set target fan RPM */
#define EC_CMD_PWM_SET_FAN_TARGET_RPM 0x0021
-struct ec_params_pwm_set_fan_target_rpm {
+/* Version 0 of input params */
+struct ec_params_pwm_set_fan_target_rpm_v0 {
uint32_t rpm;
+} __ec_align4;
+
+/* Version 1 of input params */
+struct ec_params_pwm_set_fan_target_rpm_v1 {
+ uint32_t rpm;
+ uint8_t fan_idx;
} __ec_align_size1;
/* Get keyboard backlight */
+/* OBSOLETE - Use EC_CMD_PWM_SET_DUTY */
#define EC_CMD_PWM_GET_KEYBOARD_BACKLIGHT 0x0022
struct ec_response_pwm_get_keyboard_backlight {
@@ -1534,6 +1542,7 @@ struct ec_response_pwm_get_keyboard_backlight {
} __ec_align1;
/* Set keyboard backlight */
+/* OBSOLETE - Use EC_CMD_PWM_SET_DUTY */
#define EC_CMD_PWM_SET_KEYBOARD_BACKLIGHT 0x0023
struct ec_params_pwm_set_keyboard_backlight {
@@ -1543,10 +1552,17 @@ struct ec_params_pwm_set_keyboard_backlight {
/* Set target fan PWM duty cycle */
#define EC_CMD_PWM_SET_FAN_DUTY 0x0024
-struct ec_params_pwm_set_fan_duty {
+/* Version 0 of input params */
+struct ec_params_pwm_set_fan_duty_v0 {
uint32_t percent;
} __ec_align4;
+/* Version 1 of input params */
+struct ec_params_pwm_set_fan_duty_v1 {
+ uint32_t percent;
+ uint8_t fan_idx;
+} __ec_align_size1;
+
#define EC_CMD_PWM_SET_DUTY 0x0025
/* 16 bit duty cycle, 0xffff = 100% */
#define EC_PWM_MAX_DUTY 0xffff
--
2.21.0.1020.gf2820cf01a-goog
Powered by blists - more mailing lists