ARM: at91/tclib: move initialization from alloc to probe
authorGaël PORTAY <gael.portay@gmail.com>
Sat, 6 Sep 2014 17:52:35 +0000 (19:52 +0200)
committerNicolas Ferre <nicolas.ferre@atmel.com>
Mon, 8 Sep 2014 08:54:03 +0000 (10:54 +0200)
commit4930d247af29f849cd1bddd65be2400684dc886e
tree8afec844dc080e009e2e1d52e59e1e72339fe2be
parent8495497f921e73d5192d4896d55414f0304d8561
ARM: at91/tclib: move initialization from alloc to probe

Move resource retrieval from atmel_tc_alloc to tc_probe to avoid lately
reporting resource related issues when a TC block user request a TC block.

Moreover, resources retrieval are usually done in the probe function,
thus moving them add some consistency with other drivers.

Initialization is done once, ie not every time a tc block is requested.
If it fails, the device is not appended to the list of tc blocks.

Furhermore, the device id is retrieved at probe as well, avoiding parsing
DT every time the user requests of tc block.

Signed-off-by: Gaël PORTAY <gael.portay@gmail.com>
Acked-by: Thierry Reding <thierry.reding@gmail.com>
Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
drivers/clocksource/tcb_clksrc.c
drivers/misc/atmel_tclib.c
drivers/pwm/pwm-atmel-tcb.c
include/linux/atmel_tc.h
This page took 0.036097 seconds and 5 git commands to generate.