mfd: cros_ec: Add EC_PWM function definitions
authorBrian Norris <briannorris@chromium.org>
Fri, 15 Jul 2016 23:28:42 +0000 (16:28 -0700)
committerThierry Reding <thierry.reding@gmail.com>
Mon, 25 Jul 2016 08:33:03 +0000 (10:33 +0200)
commit2b66bd692c40034d42d905f37f7f20c3540f185e
tree9da4e7a642a6ea443de3ef208c78ce7eb414bf01
parent9798ac6d32c1a32d6d92d853ff507d2d39c4300c
mfd: cros_ec: Add EC_PWM function definitions

The EC_CMD_PWM_{GET,SET}_DUTY commands allow us to control a PWM that is
attached to the EC, rather than the main host SoC. The API provides
functionality-based (e.g., keyboard light, backlight) or index-based
addressing of the PWM(s). Duty cycles are represented by a 16-bit value,
where 0 maps to 0% duty cycle and U16_MAX maps to 100%. The period
cannot be controlled.

This command set is more generic than, e.g.,
EC_CMD_PWM_{GET,SET}_KEYBOARD_BACKLIGHT and could possibly used to
replace it on future products.

Let's update the command header to include the definitions.

Signed-off-by: Brian Norris <briannorris@chromium.org>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
include/linux/mfd/cros_ec_commands.h