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
1521/* Set target fan RPM */1521/* Set target fan RPM */
1522#define EC_CMD_PWM_SET_FAN_TARGET_RPM 0x00211522#define EC_CMD_PWM_SET_FAN_TARGET_RPM 0x0021
1523 1523
1524struct ec_params_pwm_set_fan_target_rpm {1524/* Version 0 of input params */
1525struct ec_params_pwm_set_fan_target_rpm_v0 {
1525 uint32_t rpm;1526 uint32_t rpm;
1527} __ec_align4;
1528
1529/* Version 1 of input params */
1530struct ec_params_pwm_set_fan_target_rpm_v1 {
1531 uint32_t rpm;
1532 uint8_t fan_idx;
1526} __ec_align_size1;1533} __ec_align_size1;
1527 1534
1528/* Get keyboard backlight */1535/* Get keyboard backlight */
1536/* OBSOLETE - Use EC_CMD_PWM_SET_DUTY */
1529#define EC_CMD_PWM_GET_KEYBOARD_BACKLIGHT 0x00221537#define EC_CMD_PWM_GET_KEYBOARD_BACKLIGHT 0x0022
1530 1538
1531struct ec_response_pwm_get_keyboard_backlight {1539struct ec_response_pwm_get_keyboard_backlight {
@@ -1534,6 +1542,7 @@ struct ec_response_pwm_get_keyboard_backlight { · 2 unmodified lines
1534} __ec_align1;1542} __ec_align1;
1535 1543
1536/* Set keyboard backlight */1544/* Set keyboard backlight */
1545/* OBSOLETE - Use EC_CMD_PWM_SET_DUTY */
1537#define EC_CMD_PWM_SET_KEYBOARD_BACKLIGHT 0x00231546#define EC_CMD_PWM_SET_KEYBOARD_BACKLIGHT 0x0023
1538 1547
1539struct ec_params_pwm_set_keyboard_backlight {1548struct ec_params_pwm_set_keyboard_backlight {
@@ -1543,10 +1552,17 @@ struct ec_params_pwm_set_keyboard_backlight { · 3 unmodified lines
1543/* Set target fan PWM duty cycle */1552/* Set target fan PWM duty cycle */
1544#define EC_CMD_PWM_SET_FAN_DUTY 0x00241553#define EC_CMD_PWM_SET_FAN_DUTY 0x0024
1545 1554
1546struct ec_params_pwm_set_fan_duty {1555/* Version 0 of input params */
1556struct ec_params_pwm_set_fan_duty_v0 {
1547 uint32_t percent;1557 uint32_t percent;
1548} __ec_align4;1558} __ec_align4;
1549 1559
1560/* Version 1 of input params */
1561struct ec_params_pwm_set_fan_duty_v1 {
1562 uint32_t percent;
1563 uint8_t fan_idx;
1564} __ec_align_size1;
1565
1550#define EC_CMD_PWM_SET_DUTY 0x00251566#define EC_CMD_PWM_SET_DUTY 0x0025
1551/* 16 bit duty cycle, 0xffff = 100% */1567/* 16 bit duty cycle, 0xffff = 100% */
1552#define EC_PWM_MAX_DUTY 0xffff1568#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