diff options
author | Sean Young | 2019-06-03 11:00:58 +0200 |
---|---|---|
committer | Thierry Reding | 2019-06-26 11:39:12 +0200 |
commit | 11fc4edc483bea8bf0efa0cc726886d2342f6fa6 (patch) | |
tree | 19f3bdfc1f4cc7971343688f35770b629c28b5c9 /drivers/irqchip/irq-crossbar.c | |
parent | leds: pwm: Support ACPI via firmware-node framework (diff) | |
download | kernel-qcow2-linux-11fc4edc483bea8bf0efa0cc726886d2342f6fa6.tar.gz kernel-qcow2-linux-11fc4edc483bea8bf0efa0cc726886d2342f6fa6.tar.xz kernel-qcow2-linux-11fc4edc483bea8bf0efa0cc726886d2342f6fa6.zip |
pwm: bcm2835: Improve precision of PWM
If sending IR with carrier of 455kHz using the pwm-ir-tx driver, the
carrier ends up being 476kHz. The clock is set to bcm2835-pwm with a
rate of 10MHz.
A carrier of 455kHz has a period of 2198ns, but the arithmetic truncates
this to 2100ns rather than 2200ns. So, use DIV_ROUND_CLOSEST() to reduce
rounding errors, and we have a much more accurate carrier of 454.5kHz.
Reported-by: Andreas Christ <andreas@christ-faesch.ch>
Signed-off-by: Sean Young <sean@mess.org>
Acked-by: Stefan Wahren <wahrenst@gmx.net>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'drivers/irqchip/irq-crossbar.c')
0 files changed, 0 insertions, 0 deletions