Files
OpenCellular/util
Shawn Nematbakhsh d1beddc463 pwm: Modify new PWM host commands to take 16-bit duty cycle
EC_CMD_PWM_SET_DUTY / EC_CMD_PWM_GET_DUTY were recently added and are
not yet in use. Future-proof these commands by taking a 16-bit duty
cycle parameter and converting it between the [0-100] percent used by
internal EC functions.

BUG=chromium:615109
BRANCH=None
TEST=Manual on chell.
`ectool pwmsetduty kb 65535` - Verify KB backlight goes to 100%
`ectool pwmgetduty kb` - Prints 65535
`ectool pwmgetduty 0` - Prints 65535
`ectool pwmsetduty 0 0` - Verify KB backlight goes to 0%
`ectool pwmgetduty kb` - Prints 0
`ectool pwmgetduty disp` - Error res 3 (unsupported PWM type)
`ectool pwmsetduty 1` - Error res 3 (non-existent PWM index)
`ectool pwmsetduty kb 6550` +
`ectool pwmgetduty kb` - Prints 6553 (round up)
`ectool pwmsetduty kb 6560` +
`ectool pwmgetduty kb` - Prints 6553 (round down)

Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Change-Id: Ic6996fc6e1e69359274b2f9a1120ee7002db991c
Reviewed-on: https://chromium-review.googlesource.com/347608
Commit-Ready: Shawn N <shawnn@chromium.org>
Tested-by: Shawn N <shawnn@chromium.org>
Tested-by: Brian Norris <briannorris@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Reviewed-by: Brian Norris <briannorris@chromium.org>
2016-05-27 18:08:58 -07:00
..
2013-07-01 16:14:16 -07:00
2015-06-18 19:07:00 +00:00
2015-12-08 12:28:57 -08:00
2015-09-18 16:34:18 -07:00
2015-07-25 01:22:32 +00:00
2016-02-10 18:19:24 -08:00
2012-11-01 14:09:34 -07:00
2016-05-20 17:08:34 -07:00
2016-02-05 06:02:49 -08:00
2014-02-17 17:35:43 +00:00
2014-01-15 04:52:54 +00:00
2015-12-08 12:28:57 -08:00
2016-02-05 06:02:49 -08:00