fsl diu, edid info and i2c platform data

Kári Davíðsson kari.davidsson at marel.com
Fri Nov 27 02:11:29 EST 2009


Forgot the patch.


Kári Davíðsson wrote:
> Hi,
> 
> I am messing about with the fsl-diu-fb.c which handles the display on mpc512x platforms.
> The display panels we are using provide EDID information and I would like to use that to setup
> the display modes etc. The current fsl-diu-fb.c is hard coding display modes into the driver.
> 
> I have started this and it is working more or less but I appreciate all input from more knowledgeable people
> about how to do this "correctly" with the aim that others could benefit.
> I have the feeling I am not approaching this correctly.
> 
> One option I was looking into was to use platform data for the i2c edid driver, e.g. for the platform to provide
> default fb_mode. But I have a big problem on how to attach the platform data to the i2cedid driver.
> I tried few options and while I think using code like :
> 
>      np = of_find_compatible_node( NULL, NULL, "vesa,edid" );
>      if( np )
>      {
>          struct i2c_client * tsc2007 = NULL;
> 
>          //        tsc2007 = of_find_i2c_device_by_node( np );
>          if( tsc2007 )
>          {
>              tsc2007->dev.platform_data = &v39_edid_data;
>              put_device( &tsc2007->dev );
>          }
>          of_node_put( np );
>      }
> 
> is the correct way to do it. The function of_find_i2c_device_by_node() hangs the kernel.
> 
> Attached is the patch as I have it now. It compiles and works on our custom mpc5121 board for two different LCD panels.
> 
> rg
> kd
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev at lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: edid.patch
Type: text/x-diff
Size: 17167 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20091126/5500428a/attachment-0001.patch>


More information about the Linuxppc-dev mailing list