diff options
author | Shawn Nematbakhsh <shawnn@chromium.org> | 2014-09-23 14:19:47 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-09-24 08:56:21 +0000 |
commit | 981836f44ce53fd76c4861c651f4d4152be4f2a4 (patch) | |
tree | b235f3bd6d217188220f470a5e715e3d26920194 /chip/stm32/pwm_chip.h | |
parent | 51bc6645da1fd946a76fe49ca8e562920afd1f29 (diff) | |
download | chrome-ec-981836f44ce53fd76c4861c651f4d4152be4f2a4.tar.gz |
stm32: Fix PWM driver
STM32F and STM32F0 series require an MOE bit to be set to enable PWM
output. In addition, require that the PWM alternate function # be
manually specified for STM32F0 -- there seems to be no logical mapping
here, unlike other STM32* parts.
BUG=chrome-os-partner:32089
TEST=Manual on samus-pd. Set ILIM PWM output to 50% duty cycle with pwm
driver functions, probe and verify avg. 1.62V on pin.
BRANCH=None
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Change-Id: Icb13a153fa3eee52be938d76a6c980fe6fd2bb3e
Reviewed-on: https://chromium-review.googlesource.com/219570
Reviewed-by: Alexandru Stan <amstan@chromium.org>
Tested-by: Alexandru Stan <amstan@chromium.org>
Reviewed-by: Alec Berg <alecaberg@chromium.org>
Diffstat (limited to 'chip/stm32/pwm_chip.h')
-rw-r--r-- | chip/stm32/pwm_chip.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/chip/stm32/pwm_chip.h b/chip/stm32/pwm_chip.h index d588dabeaa..4e15e612c1 100644 --- a/chip/stm32/pwm_chip.h +++ b/chip/stm32/pwm_chip.h @@ -24,6 +24,8 @@ struct pwm_t { uint32_t flags; /* GPIO pin corresponding to the PWM channel */ enum gpio_signal pin; + /* GPIO alternate function - only needed for STM32F0 family */ + int gpio_alt_func; }; extern const struct pwm_t pwm_channels[]; |