diff options
author | Shawn Nematbakhsh <shawnn@chromium.org> | 2015-11-30 16:30:59 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2015-12-04 01:20:33 -0800 |
commit | 743a9ea7cd39dffc4f1dc104803f767ba774372b (patch) | |
tree | a31b89a803f213a2421cbef449fff19cae5c5f5e /board/strago | |
parent | 6b75bfee7e66ff2061b3ca114ec52fada16af731 (diff) | |
download | chrome-ec-743a9ea7cd39dffc4f1dc104803f767ba774372b.tar.gz |
pwm: Add common initialization for PWM pins
Rather than having various PWM module groups initialized from various
HOOK_INIT functions, group them all into a single module and initialize
them all from a common function in pwm.c.
BUG=chromium:563708
TEST=Manual on samus / samus_pd (with CONFIG_ADC enabled). Verify that
samus fan + KB backlight control is functional and samus_pd correctly
sets PWM output.
BRANCH=None
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Change-Id: I9f9b09bfa544cd9bc6b7a867e77757dff0505941
Reviewed-on: https://chromium-review.googlesource.com/314882
Commit-Ready: Shawn N <shawnn@chromium.org>
Tested-by: Shawn N <shawnn@chromium.org>
Reviewed-by: Alec Berg <alecaberg@chromium.org>
Diffstat (limited to 'board/strago')
-rw-r--r-- | board/strago/gpio.inc | 4 | ||||
-rw-r--r-- | board/strago/led.c | 3 |
2 files changed, 2 insertions, 5 deletions
diff --git a/board/strago/gpio.inc b/board/strago/gpio.inc index 016d687401..9eaf13e783 100644 --- a/board/strago/gpio.inc +++ b/board/strago/gpio.inc @@ -135,8 +135,8 @@ ALTERNATE(PIN_MASK(5, 0x10), 1, MODULE_SPI, 0) ALTERNATE(PIN_MASK(16, 0x10), 1, MODULE_SPI, 0) ALTERNATE(PIN_MASK(15, 0x08), 1, MODULE_SPI, 0) /* 153: CLK */ -ALTERNATE(PIN_MASK(13, 0x48), 1, MODULE_PWM_LED, GPIO_OUTPUT) /* 133: PWM0, 136: PWM1 */ -ALTERNATE(PIN_MASK(14, 0x02), 1, MODULE_PWM_LED, GPIO_OUTPUT) /* 141: PWM3 */ +ALTERNATE(PIN_MASK(13, 0x48), 1, MODULE_PWM, GPIO_OUTPUT) /* 133: PWM0, 136: PWM1 */ +ALTERNATE(PIN_MASK(14, 0x02), 1, MODULE_PWM, GPIO_OUTPUT) /* 141: PWM3 */ ALTERNATE(PIN_MASK(5, 0x40), 1, MODULE_ADC, 0) /* 56: temperature sensor 1 */ ALTERNATE(PIN_MASK(6, 0x01), 1, MODULE_ADC, 0) /* 60: PC_MON, 62: temperature sensor 3 */ diff --git a/board/strago/led.c b/board/strago/led.c index 74c5da3598..3549e09c11 100644 --- a/board/strago/led.c +++ b/board/strago/led.c @@ -129,9 +129,6 @@ static void strago_led_set_battery(void) static void led_init(void) { - /* Configure GPIOs */ - gpio_config_module(MODULE_PWM_LED, 1); - /* * Enable PWMs and set to 0% duty cycle. If they're disabled, * seems to ground the pins instead of letting them float. |