History

mfd: cros_ec: Add PWM_SET_DUTY API

Add API for fan control.

Gwendal Grignou committed 7 years ago

Commit 89193a01 parent 3c46ae61 file · +18 −2Browse files

Showing the changes to include/linux (1 of 1 file). Show all

Unified · Split

include/linux/mfd/cros_ec_commands.h+18−2
@@ -1521,11 +1521,19 @@ struct ec_response_pwm_get_fan_rpm { · 1520 unmodified lines
15211521 /* Set target fan RPM */
15221522 #define EC_CMD_PWM_SET_FAN_TARGET_RPM 0x0021
15231523
1524−struct ec_params_pwm_set_fan_target_rpm {
1524+/* Version 0 of input params */
1525+struct ec_params_pwm_set_fan_target_rpm_v0 {
15251526 uint32_t rpm;
1527+} __ec_align4;
1528+
1529+/* Version 1 of input params */
1530+struct ec_params_pwm_set_fan_target_rpm_v1 {
1531+ uint32_t rpm;
1532+ uint8_t fan_idx;
15261533 } __ec_align_size1;
15271534
15281535 /* Get keyboard backlight */
1536+/* OBSOLETE - Use EC_CMD_PWM_SET_DUTY */
15291537 #define EC_CMD_PWM_GET_KEYBOARD_BACKLIGHT 0x0022
15301538
15311539 struct ec_response_pwm_get_keyboard_backlight {
@@ -1534,6 +1542,7 @@ struct ec_response_pwm_get_keyboard_backlight { · 2 unmodified lines
15341542 } __ec_align1;
15351543
15361544 /* Set keyboard backlight */
1545+/* OBSOLETE - Use EC_CMD_PWM_SET_DUTY */
15371546 #define EC_CMD_PWM_SET_KEYBOARD_BACKLIGHT 0x0023
15381547
15391548 struct ec_params_pwm_set_keyboard_backlight {
@@ -1543,10 +1552,17 @@ struct ec_params_pwm_set_keyboard_backlight { · 3 unmodified lines
15431552 /* Set target fan PWM duty cycle */
15441553 #define EC_CMD_PWM_SET_FAN_DUTY 0x0024
15451554
1546−struct ec_params_pwm_set_fan_duty {
1555+/* Version 0 of input params */
1556+struct ec_params_pwm_set_fan_duty_v0 {
15471557 uint32_t percent;
15481558 } __ec_align4;
15491559
1560+/* Version 1 of input params */
1561+struct ec_params_pwm_set_fan_duty_v1 {
1562+ uint32_t percent;
1563+ uint8_t fan_idx;
1564+} __ec_align_size1;
1565+
15501566 #define EC_CMD_PWM_SET_DUTY 0x0025
15511567 /* 16 bit duty cycle, 0xffff = 100% */
15521568 #define EC_PWM_MAX_DUTY 0xffff

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t