lkml.org 
[lkml]   [1999]   [Dec]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [linux-fbdev] i2c and fbcon

On Sun, 26 Dec 1999, Jeff Garzik wrote:

> On Sun, 26 Dec 1999, James Simmons wrote:
> > I have been looking threw the code for i2c. This code could be really
> > useful for several framebuffer drivers to do things like dual heads. Right
> > now you only have it initialized right before videodev_init. Could we have
> > it initialzed before fbmem_init? I have a patch below for this. Thank you.
>
> Have you tested this for chicken-and-egg problems?

At present no fbdev driver uses i2c. So it should be safe to move
i2c_init_all ahead of fbmem_init without breaking anything. Petr is
working on a dual head patch for the G400 which requires i2c. Right now it
has to be compiled as a module for it to work because i2c is initialized
after fbmem_init.

There is another solution Petr mentioned.

>Remove initialization from i2c_init.
>
>memset(adapter, 0, sizeof(adapters));
>memset(drivers, 0, sizeof(drivers));
>adap_count = 0;
>driver_count = 0;
>init_MUTEX(&adap_lock);
>init_MUTEX(&driver_lock);
>
>We can initialize these variables at compile (load) time and i2c is then
>ready for registration/deregistration since kernel gets SMP & kmalloc
>working. There is only one problem left after that, procfs will export
>only adapters/drivers registered after i2c procfs initialization.

James Simmons (o_
fbdev/gfx developer (o_ (o_ //\
http://www.linux-fbdev.org (/)_ (/)_ V_/_
http://linuxgfx.sourceforge.net




-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:55    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site