aboutsummaryrefslogtreecommitdiff
path: root/drivers/pwm/pwm-lpc18xx-sct.c
AgeCommit message (Collapse)AuthorFilesLines
2016-09-08pwm: lpc-18xx: use pwm_set_chip_data[email protected]1-4/+8
The lpc-18xx driver currently manipulates the pwm_device struct directly rather than using the pwm_set_chip_data() function. While the current method may save a clock cycle or two, using the explicit function call makes it more obvious that data is set to the local chip data pointer. Signed-off-by: Olliver Schinagl <[email protected]> Reviewed-by: Ariel D'Alessandro <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
2016-05-17pwm: Use pwm_get/set_xxx() helpers where appropriateBoris Brezillon1-1/+1
Use pwm_get/set_xxx() helpers instead of directly accessing the pwm->xxx field. Doing that will ease adaptation of the PWM framework to support atomic update. Signed-off-by: Boris Brezillon <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
2016-03-23pwm: lpc18xx-sct: Test clock rate to avoid division by 0Wolfram Sang1-0/+5
The clk API may return 0 on clk_get_rate(), so we should check the result before using it as a divisor. Signed-off-by: Wolfram Sang <[email protected]> Acked-by: Joachim Eastwood <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
2015-09-09pwm: NXP LPC18xx PWM/SCT driverAriel D'Alessandro1-0/+465
This commit adds support for NXP LPC18xx PWM/SCT. NXP LPC SoCs family, which includes LPC18xx/LPC43xx, provides a State Configurable Timer (SCT) which can be configured as a Pulse Width Modulator. Other SoCs in that family may share the same hardware. The PWM supports a total of 16 channels, but only 15 can be simultaneously requested. There's only one period, global to all the channels, thus PWM driver will refuse setting different values to it, unless there's only one channel requested. Signed-off-by: Ariel D'Alessandro <[email protected]> [[email protected]: remove excessive padding of fields] Signed-off-by: Thierry Reding <[email protected]>