aboutsummaryrefslogtreecommitdiff
path: root/drivers/pwm/pwm-renesas-tpu.c
AgeCommit message (Collapse)AuthorFilesLines
2013-09-03pwm: simplify use of devm_ioremap_resourceJulia Lawall1-5/+0
Remove unneeded error handling on the result of a call to platform_get_resource when the value is passed to devm_ioremap_resource. Move the call to platform_get_resource adjacent to the call to devm_ioremap_resource to make the connection between them more clear. A simplified version of the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression pdev,res,n,e,e1; expression ret != 0; identifier l; @@ - res = platform_get_resource(pdev, IORESOURCE_MEM, n); ... when != res - if (res == NULL) { ... \(goto l;\|return ret;\) } ... when != res + res = platform_get_resource(pdev, IORESOURCE_MEM, n); e = devm_ioremap_resource(e1, res); // </smpl> Signed-off-by: Julia Lawall <[email protected]> Acked-by: Viresh Kumar <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
2013-09-03pwm: renesas-tpu: Add DT supportLaurent Pinchart1-7/+34
Specify DT bindings for the TPU PWM controller and add OF support to the driver. Signed-off-by: Laurent Pinchart <[email protected]> Acked-by: Stephen Warren <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
2013-06-26pwm: renesas-tpu: Add MODULE_ALIAS to make module auto loading workAxel Lin1-0/+1
This driver can be built as module, add MODULE_ALIAS to make module auto loading work. Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
2013-06-25pwm: renesas-tpu: fix return value check in tpu_probe()Wei Yongjun1-4/+2
In case of error, the function devm_ioremap_resource() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Signed-off-by: Wei Yongjun <[email protected]> Reviewed-by: Axel Lin <[email protected]> Acked-by: Laurent Pinchart <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
2013-06-21pwm: Add Renesas TPU PWM driverLaurent Pinchart1-0/+475
The Timer Pulse Unit (TPU) is a 4-channels 16-bit timer used to generate waveforms. This driver exposes PWM functions through the PWM API for other drivers to use. The code is loosely based on the leds-renesas-tpu driver by Magnus Damm and the TPU PWM driver shipped in the Armadillo EVA 800 kernel sources. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Axel Lin <[email protected]> Tested-by: Simon Horman <[email protected]> Signed-off-by: Thierry Reding <[email protected]>