[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACRpkdYjUKimX+R0nZv5v+rhdUxAUtKv4pPu0dtGAYhEP1Ri7Q@mail.gmail.com>
Date: Tue, 24 Jan 2017 14:02:48 +0100
From: Linus Walleij <linus.walleij@...aro.org>
To: Ian Pilcher <arequipeno@...il.com>
Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>
Subject: Re: How to ensure other module/driver is initialized?
On Thu, Dec 15, 2016 at 8:50 PM, Ian Pilcher <arequipeno@...il.com> wrote:
> I maintain an out-of-tree kernel module that enables the front-panel
> LEDs on the Thecus N5550 NAS.
>
> https://github.com/ipilcher/n5550/blob/master/modules/n5550_board.c
Generally I'm not very happy about boardfiles and such stuff being
maintained out-of-tree.
Is there work ongoing to:
(A) work upstream with this stuff
(B) convert the whole platform to use device tree
Because that is what is needed for long-term maintenance.
The file you point to corresponds to just a few lines of device tree
code. c.f. my recent submission of Gemini patches:
http://marc.info/?l=linux-arm-kernel&m=148508801709983&w=2
I know it is a bit up upfront work, but hey, it's fun.
> The drive activity LEDs are connected to GPIO pins on the ICH10R, so
> the gpio_ich driver must be loaded and initialized before my module is
> loaded. Unfortunately, the "and initialized" part is giving me trouble
> after a recent CentOS kernel update.
>
> My modprobe configuration includes:
>
> install n5550_board /sbin/modprobe gpio_ich; /sbin/modprobe i2c_i801;
> /sbin/modprobe --ignore-install n5550_board
>
> But although the gpio_ich module does get loaded, it apparently hasn't
> finished initializing when my module is loaded. The result looks like
> this:
I have no idea how modprobe works, but a SoC GPIO driver is often
such a critical component of a system (often provididing an irqchip
as well) that their Kconfig should be made bool and set to 'y' in the
config so it is compiled-in to the kernel.
Then any dependent modules can happily utilize it.
If this doesn't work, it should make use of deferred probe I guess?
Yours,
Linus Walleij
Powered by blists - more mailing lists