[lkml]   [2008]   [Oct]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 4/7] gpiolib: implement dev_gpiochip_{add,remove} calls
On Wednesday 22 October 2008, Anton Vorontsov wrote:
> > > The board info has another problem though. We can't remove it, thus
> > > we can't implement module_exit() for the 'OF glue'.

That's not a problem. Why would you want to remove it?

> > And try to solve this problem... maybe then things will begin to
> > move forward.
> There is another problem: board infos are scanned at the controller
> registration time only.

Right. Such board description data should be made available
early in boot. As a rule: before arch_initcall() finishes,
so that subsys_initcall() code can use the associated GPIOs.

(It's fairly well acknowledged that init dependency handling
has a lot of problems. Until that's fixed ... for GPIOs, the
general advice is to make sure everything is available by
subsys_initcall time, so the subsystems which rely on GPIOs
to initialize -- power switches, resets, etc -- can initialize.
That can require i2c adapter drivers to use subsys_initcall,
for example.)

> So if we register the board infos after
> the controller registered, then nobody will probe the board infos.

See above. If you're doing it right, there's no problem.
That is, scan the OF tables early. Just like PNP tables
get scanned early, for example.

- Dave

 \ /
  Last update: 2008-10-22 23:09    [W:0.092 / U:9.488 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site