linux/drivers/pwm
Paul Cercueil 485b56f08f pwm: jz4740: Improve algorithm of clock calculation
The previous algorithm hardcoded details about how the TCU clocks work.
The new algorithm will use clk_round_rate to find the perfect clock rate
for the PWM channel.

This code relies on the fact that clk_round_rate() will always round
down, which is not a valid assumption given by the clk API, but only
happens to be true with the clk drivers used for Ingenic SoCs.

Right now, there is no alternative as the clk API does not have a
round-down function (and won't have one for a while), but if it ever
comes to light, a round-down function should be used instead.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Tested-by: Mathieu Malaterre <malat@debian.org>
Tested-by: Artur Rojek <contact@artur-rojek.eu>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
2020-03-30 18:03:09 +02:00
..
core.c pwm: Implement some checks for lowlevel drivers 2020-03-30 16:55:26 +02:00
Kconfig pwm: jz4740: Use clocks from TCU driver 2020-03-30 18:03:09 +02:00
Makefile bus/ti-pwmss: move TI PWMSS driver from PWM to bus subsystem 2019-10-17 21:17:42 +01:00
pwm-ab8500.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 194 2019-05-30 11:29:22 -07:00
pwm-atmel-hlcdc.c pwm: Ensure pwm_apply_state() doesn't modify the state argument 2019-09-21 03:25:10 +02:00
pwm-atmel-tcb.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 194 2019-05-30 11:29:22 -07:00
pwm-atmel.c pwm: atmel: Implement .get_state() 2020-01-08 13:47:46 +01:00
pwm-bcm2835.c pwm: bcm2835: Dynamically allocate base 2020-03-30 16:55:25 +02:00
pwm-bcm-iproc.c pwm: bcm-iproc: Prevent unloading the driver module while in use 2019-11-08 18:38:06 +01:00
pwm-bcm-kona.c pwm: bcm-kona: Update macros to remove braces around numbers 2019-03-04 12:52:49 +01:00
pwm-berlin.c pwm: Clear chip_data in pwm_put() 2019-05-09 17:09:54 +02:00
pwm-brcmstb.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
pwm-clps711x.c pwm: clps711x: Switch to SPDX identifier 2018-12-24 12:06:56 +01:00
pwm-crc.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
pwm-cros-ec.c pwm: cros-ec: Cache duty cycle value 2019-12-09 10:05:42 +01:00
pwm-ep93xx.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
pwm-fsl-ftm.c pwm: Ensure pwm_apply_state() doesn't modify the state argument 2019-09-21 03:25:10 +02:00
pwm-hibvt.c pwm: Ensure pwm_apply_state() doesn't modify the state argument 2019-09-21 03:25:10 +02:00
pwm-img.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 178 2019-05-30 11:29:19 -07:00
pwm-imx1.c pwm: imx: Split into two drivers 2019-01-16 08:45:33 +01:00
pwm-imx27.c pwm: imx27: Remove unused include of of_device.h 2020-03-30 16:55:26 +02:00
pwm-imx-tpm.c pwm: imx-tpm: Remove unused includes 2020-03-30 16:55:26 +02:00
pwm-jz4740.c pwm: jz4740: Improve algorithm of clock calculation 2020-03-30 18:03:09 +02:00
pwm-lp3943.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 372 2019-06-05 17:37:10 +02:00
pwm-lpc18xx-sct.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 178 2019-05-30 11:29:19 -07:00
pwm-lpc32xx.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 372 2019-06-05 17:37:10 +02:00
pwm-lpss-pci.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
pwm-lpss-platform.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
pwm-lpss.c pwm: Ensure pwm_apply_state() doesn't modify the state argument 2019-09-21 03:25:10 +02:00
pwm-lpss.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
pwm-mediatek.c pwm: mediatek: Add MT7629 compatible string 2019-09-26 13:27:50 +02:00
pwm-meson.c pwm: meson: Fix confusing indentation 2020-03-30 18:03:05 +02:00
pwm-mtk-disp.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
pwm-mxs.c pwm: mxs: Remove unused include of of_address.h 2020-03-30 16:55:27 +02:00
pwm-omap-dmtimer.c pwm: omap-dmtimer: Implement .apply callback 2020-03-30 18:03:08 +02:00
pwm-pca9685.c pwm: pca9685: Use gpio core provided macro GPIO_LINE_DIRECTION_OUT 2020-03-30 18:03:04 +02:00
pwm-puv3.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
pwm-pxa.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
pwm-rcar.c pwm: rcar: Fix late Runtime PM enablement 2020-03-30 18:03:05 +02:00
pwm-renesas-tpu.c pwm: renesas-tpu: Drop confusing registered message 2020-03-30 18:03:06 +02:00
pwm-rockchip.c pwm: Ensure pwm_apply_state() doesn't modify the state argument 2019-09-21 03:25:10 +02:00
pwm-samsung.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 178 2019-05-30 11:29:19 -07:00
pwm-sifive.c pwm: Ensure pwm_apply_state() doesn't modify the state argument 2019-09-21 03:25:10 +02:00
pwm-spear.c pwm: drop owner assignment from platform_drivers 2014-10-20 16:21:28 +02:00
pwm-sprd.c pwm: Ensure pwm_apply_state() doesn't modify the state argument 2019-09-21 03:25:10 +02:00
pwm-sti.c pwm: Remove dev_err() usage after platform_get_irq() 2019-09-21 00:58:35 +02:00
pwm-stm32-lp.c pwm: stm32-lp: Add check in case requested period cannot be achieved 2019-09-21 03:25:10 +02:00
pwm-stm32.c pwm: stm32: Remove automatic output enable 2020-01-20 13:47:36 +01:00
pwm-stmpe.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
pwm-sun4i.c pwm: sun4i: Remove redundant needs_delay 2020-03-30 18:03:08 +02:00
pwm-tegra.c pwm: tegra: Add support for Tegra194 2020-03-30 18:03:04 +02:00
pwm-tiecap.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 61 2019-05-24 17:36:45 +02:00
pwm-tiehrpwm.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 61 2019-05-24 17:36:45 +02:00
pwm-twl-led.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234 2019-06-19 17:09:07 +02:00
pwm-twl.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234 2019-06-19 17:09:07 +02:00
pwm-vt8500.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 282 2019-06-05 17:36:37 +02:00
pwm-zx.c pwm: Ensure pwm_apply_state() doesn't modify the state argument 2019-09-21 03:25:10 +02:00
sysfs.c pwm: Changes for v5.3-rc1 2019-07-09 08:57:45 -07:00