]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ENGR00269945: reset: register gpio-reset driver in arch_initcall
authorShawn Guo <shawn.guo@freescale.com>
Sun, 14 Jul 2013 12:41:00 +0000 (20:41 +0800)
committerJason Liu <r64343@freescale.com>
Wed, 30 Oct 2013 01:53:45 +0000 (09:53 +0800)
commit0a2e2731631d240123519e654dc7cd1d1f332b7b
treeeb00eb8aa8c3651a09694c0f24987b0239b9ca4f
parent22167e9f739df5619fe7b5968ab1f64e9d9ec2eb
ENGR00269945: reset: register gpio-reset driver in arch_initcall

It's a little bit late to register gpio-reset driver at module_init
time, because gpio-reset provides reset control via gpio for other
devices which are mostly probed at module_init time too.  And it
becomes even worse, when the gpio comes from IO expander on I2C bus,
e.g. pca953x.  In that case, gpio-reset needs to be ready before I2C
bus driver which is generally ready at subsys_initcall time.  Let's
register gpio-reset driver in arch_initcall() to have it ready early
enough.

The defer probe mechanism is not used here, because a reset controller
driver should be reasonably registered early than other devices.  More
importantly, defer probe doe not help in some nasty cases, e.g. the
gpio-pca953x device itself needs a reset from gpio-reset driver start
working.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
drivers/reset/gpio-reset.c