aboutsummaryrefslogtreecommitdiff
path: root/drivers/pwm/pwm-bcm-kona.c
AgeCommit message (Collapse)AuthorFilesLines
2020-07-30pwm: bcm-kona: Remove impossible comparison when validating duty cycleLee Jones1-1/+1
'dc' here is an unsigned long, thus checking for <0 will always evaluate to false. Fixes the following W=1 warning: drivers/pwm/pwm-bcm-kona.c:141:35: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] Cc: Florian Fainelli <[email protected]> Cc: Ray Jui <[email protected]> Cc: Scott Branden <[email protected]> Cc: [email protected] Cc: [email protected] Signed-off-by: Lee Jones <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
2019-03-04pwm: bcm-kona: Update macros to remove braces around numbersSheetal Tigadoli1-8/+8
Parentheses are not needed around integer literals in macros. Remove them. Signed-off-by: Sheetal Tigadoli <[email protected]> Acked-by: Uwe Kleine-König <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
2017-01-04pwm: Remove .can_sleep from struct pwm_chipThierry Reding1-1/+0
All PWM devices have been marked as "might sleep" since v4.5, there is no longer a need to differentiate on a per-chip basis. Signed-off-by: Thierry Reding <[email protected]>
2015-08-17pwm: kona: Modify settings application sequenceJonathan Richardson1-9/+38
Update the driver so that settings are applied in accordance with the most recent version of the hardware spec. The revised sequence clears the trigger bit, waits 400ns, writes settings, sets the trigger bit, and waits another 400ns. This corrects an issue where occasionally a requested change was not properly reflected in the PWM output. Reviewed-by: Arun Ramamurthy <[email protected]> Reviewed-by: Scott Branden <[email protected]> Tested-by: Scott Branden <[email protected]> Reviewed-by: Tim Kryger <[email protected]> Signed-off-by: Jonathan Richardson <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
2015-07-20pwm: Make use of pwm_get_xxx() helpers where appropriateBoris Brezillon1-1/+2
Use the pwm_get_xxx() helpers instead of directly accessing the fields in struct pwm_device. This will allow us to smoothly move to the atomic update approach. Signed-off-by: Boris Brezillon <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
2015-07-20pwm: Add the pwm_is_enabled() helperBoris Brezillon1-2/+2
Some PWM drivers are testing the PWMF_ENABLED flag. Create a helper function to hide the logic behind enabled test. This will allow us to smoothly move from the current approach to an atomic PWM update approach. Signed-off-by: Boris Brezillon <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
2015-06-12pwm: bcm-kona: Don't set polarity in probeArun Ramamurthy1-6/+3
Omit setting the polarity to normal during probe and instead use the new pwmchip_add_with_polarity() function to register a PWM chip with inverse polarity by default for all channels to reflect the hardware default. Signed-off-by: Arun Ramamurthy <[email protected]> Reviewed-by: Ray Jui <[email protected]> Signed-off-by: Scott Branden <[email protected]> Signed-off-by: Tim Kryger <[email protected]> Signed-off-by: Jonathan Richardson <[email protected]> [[email protected]: use pwmchip_add_with_polarity()] Signed-off-by: Thierry Reding <[email protected]>
2014-04-28pwm: kona: Introduce Kona PWM controller supportTim Kryger1-0/+318
Add support for the six-channel Kona PWM controller found on Broadcom mobile SoCs like bcm281xx. Signed-off-by: Tim Kryger <[email protected]> Reviewed-by: Alex Elder <[email protected]> Reviewed-by: Markus Mayer <[email protected]> Signed-off-by: Thierry Reding <[email protected]>