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
..
2016-04-18 17:32:40 -07:00
2016-05-26 16:17:26 -07:00
2015-12-11 11:22:01 -08:00
2016-04-18 17:32:40 -07:00
2013-09-27 23:07:21 +00:00
2016-04-18 17:32:40 -07:00
2016-05-27 18:08:50 -07:00
2016-04-18 17:32:40 -07:00
2016-04-18 17:32:40 -07:00
2015-09-08 13:49:09 -07:00
2016-05-24 15:46:01 -07:00
2016-05-24 15:46:01 -07:00
2016-01-06 18:48:11 -08:00
2016-04-13 18:37:18 -07:00
2014-05-21 20:32:17 +00:00
2014-11-18 05:19:47 +00:00
2015-05-19 02:46:27 +00:00
2016-03-22 19:54:46 -07:00
2016-02-23 22:40:17 -08:00
2016-03-18 22:16:53 -07:00
2014-08-08 03:11:38 +00:00
2016-05-27 18:08:50 -07:00
2015-07-17 03:17:50 +00:00
2015-11-17 14:40:26 -08:00
2016-04-18 17:32:40 -07:00
2016-03-30 04:37:39 -07:00
2015-12-09 06:36:22 -08:00
2015-12-09 06:36:22 -08:00
2016-05-26 16:17:26 -07:00
2016-02-08 13:47:49 -08:00
2015-09-29 11:28:40 -07:00
2016-04-27 14:04:07 -07:00
2016-04-27 14:04:07 -07:00
2016-04-19 12:23:52 -07:00
2015-11-09 12:49:43 -08:00
2016-04-17 12:23:07 -07:00
2016-05-26 22:25:17 -07:00
2014-10-24 01:37:58 +00:00
2014-03-06 21:33:09 +00:00
2016-05-24 19:23:27 -07:00
2016-04-18 17:32:40 -07:00
2015-07-17 03:18:03 +00:00
2015-08-28 18:09:06 -07:00
2015-08-31 22:59:52 -07:00
2016-04-01 00:21:35 -07:00
2013-03-22 11:24:29 -07:00
2015-09-25 09:13:34 -07:00
2014-01-14 09:19:45 +00:00
2016-05-18 15:08:28 -07:00
2016-03-02 13:39:47 -08:00
2016-04-18 17:32:40 -07:00
2016-01-06 18:48:11 -08:00
2015-10-13 05:28:54 -07:00
2015-10-13 21:58:01 -07:00
2015-10-13 05:28:54 -07:00
2015-10-13 05:28:54 -07:00
2016-03-01 08:25:58 -08:00
2016-04-03 10:27:36 -07:00
2016-03-10 06:03:08 -08:00
2015-11-25 18:15:38 -08:00
2015-12-01 01:11:11 -08:00
2016-05-26 18:08:57 -07:00
2013-08-02 18:22:57 -07:00
2016-04-14 17:28:17 -07:00
2015-11-08 10:07:38 -08:00
2015-11-11 12:58:37 -08:00
2016-01-06 18:48:11 -08:00
2016-04-18 17:32:40 -07:00
2015-10-19 13:45:49 -07:00
2012-07-26 16:25:34 -07:00
2015-12-04 01:20:33 -08:00
2016-05-27 18:08:58 -07:00
2015-06-11 00:08:49 +00:00
2015-07-15 21:57:36 +00:00
2014-11-15 06:00:02 +00:00
2015-09-25 19:36:37 -07:00
2014-05-17 20:14:17 +00:00
2016-05-05 19:16:50 -07:00
2015-02-24 00:27:42 +00:00
2016-03-21 16:35:33 -07:00
2015-11-19 02:18:10 -08:00
2016-05-19 18:18:05 -07:00
2016-03-30 17:10:17 -07:00
2016-01-28 21:45:37 +00:00
2016-04-18 17:32:40 -07:00
2016-04-08 12:34:29 -07:00
2015-01-14 03:15:41 +00:00
2016-02-03 15:00:50 -08:00
2015-12-03 02:22:01 -08:00
2016-04-14 17:28:17 -07:00
2015-09-21 01:13:54 -07:00
2016-04-27 18:12:25 -07:00
2016-04-27 10:10:02 -07:00
2016-05-13 23:34:51 -07:00
2016-04-18 17:32:40 -07:00
2016-04-18 17:32:40 -07:00
2016-04-25 21:04:41 -07:00
2014-05-21 20:32:17 +00:00
2016-03-24 00:03:07 -07:00
2016-03-07 21:56:04 -08:00
2016-04-18 17:32:40 -07:00
2015-10-13 05:28:54 -07:00
2015-09-24 12:46:28 -07:00
2016-01-25 21:46:48 -08:00
2014-02-22 00:50:37 +00:00