lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AANLkTikj8yGSK5Ovud_k8f6jWloojqDJmQ_H6pD_IFgM@mail.gmail.com>
Date:	Wed, 26 May 2010 18:39:13 -0700
From:	Robert Emanuele <rob@...nuele.us>
To:	Wolfram Sang <w.sang@...gutronix.de>
Cc:	Linus Walleij <linus.ml.walleij@...il.com>,
	linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
	linux-kernel@...r.kernel.org
Subject: Re: Controlling Driver Load Order

Thank you for the suggestions but maybe I'm not describing this correctly...

In my platform's init_machine I had something like this:
{
    at91_add_device_i2c(1, my_i2c_devices, ARRAY_SIZE(my_i2c_devices));

    add_my_display();
}

Both of those calls lead to a platform_device_add.  I've tried moving
the at91_add_device_i2c into a function that was referenced by
subsys_initcall() like so:
static void __init power_control_init(void)
{
	at91_add_device_i2c(1, my_i2c_devices, ARRAY_SIZE(my_i2c_devices));
}
subsys_initcall(power_control_init);

Still the framebuffer device would initialize first and it would lack
having the i2c chips it needs ready.  That is the order I'm trying to
straighten out.

Thank you,

Rob

On Wed, May 26, 2010 at 4:52 PM, Wolfram Sang <w.sang@...gutronix.de> wrote:
> On Wed, May 26, 2010 at 11:04:01PM +0200, Linus Walleij wrote:
>> 2010/5/26 Robert Emanuele <rob@...nuele.us>:
>>
>> > On my at91sam9g45 platform I need my i2c drivers to load before the
>> > framebuffer driver.  The i2c drivers control a power management IC
>> > which is needed to enable the graphics controller.
>> >
>> > Is there a way to set up that order?
>>
>> The usual trick (which you can find in a lot of other I2C busses) is to use
>> a core_initcall() instead of module_init().
>
> Correct, but it's subsys_initcall().
>
> --
> Pengutronix e.K.                           | Wolfram Sang                |
> Industrial Linux Solutions                 | http://www.pengutronix.de/  |
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
>
> iEYEARECAAYFAkv9tE4ACgkQD27XaX1/VRsuwgCgtuBO/G43yUxbTED+MdBf6tUv
> 9hYAn0WL0L475IYsXqiOlUMzGmdrAcr7
> =KcVU
> -----END PGP SIGNATURE-----
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ