Add API for fan control.
Showing the changes to include/linux (1 of 1 file). Show all
Unified · Split
| @@ -1521,11 +1521,19 @@ struct ec_response_pwm_get_fan_rpm { · 1520 unmodified lines | ||
| 1521 | 1521 | /* Set target fan RPM */ |
| 1522 | 1522 | #define EC_CMD_PWM_SET_FAN_TARGET_RPM 0x0021 |
| 1523 | 1523 | |
| 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 { | |
| 1525 | 1526 | 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; | |
| 1526 | 1533 | } __ec_align_size1; |
| 1527 | 1534 | |
| 1528 | 1535 | /* Get keyboard backlight */ |
| 1536 | +/* OBSOLETE - Use EC_CMD_PWM_SET_DUTY */ | |
| 1529 | 1537 | #define EC_CMD_PWM_GET_KEYBOARD_BACKLIGHT 0x0022 |
| 1530 | 1538 | |
| 1531 | 1539 | struct ec_response_pwm_get_keyboard_backlight { |
| @@ -1534,6 +1542,7 @@ struct ec_response_pwm_get_keyboard_backlight { · 2 unmodified lines | ||
| 1534 | 1542 | } __ec_align1; |
| 1535 | 1543 | |
| 1536 | 1544 | /* Set keyboard backlight */ |
| 1545 | +/* OBSOLETE - Use EC_CMD_PWM_SET_DUTY */ | |
| 1537 | 1546 | #define EC_CMD_PWM_SET_KEYBOARD_BACKLIGHT 0x0023 |
| 1538 | 1547 | |
| 1539 | 1548 | struct ec_params_pwm_set_keyboard_backlight { |
| @@ -1543,10 +1552,17 @@ struct ec_params_pwm_set_keyboard_backlight { · 3 unmodified lines | ||
| 1543 | 1552 | /* Set target fan PWM duty cycle */ |
| 1544 | 1553 | #define EC_CMD_PWM_SET_FAN_DUTY 0x0024 |
| 1545 | 1554 | |
| 1546 | −struct ec_params_pwm_set_fan_duty { | |
| 1555 | +/* Version 0 of input params */ | |
| 1556 | +struct ec_params_pwm_set_fan_duty_v0 { | |
| 1547 | 1557 | uint32_t percent; |
| 1548 | 1558 | } __ec_align4; |
| 1549 | 1559 | |
| 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 | + | |
| 1550 | 1566 | #define EC_CMD_PWM_SET_DUTY 0x0025 |
| 1551 | 1567 | /* 16 bit duty cycle, 0xffff = 100% */ |
| 1552 | 1568 | #define EC_PWM_MAX_DUTY 0xffff |