linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Kári Davíðsson" <kari.davidsson@marel.com>
To: "linuxppc-dev@ozlabs.org" <linuxppc-dev@ozlabs.org>
Subject: fsl diu, edid info and i2c platform data
Date: Thu, 26 Nov 2009 14:34:43 +0000	[thread overview]
Message-ID: <4B0E9203.7040208@marel.com> (raw)

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

             reply	other threads:[~2009-11-26 14:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-26 14:34 Kári Davíðsson [this message]
2009-11-26 15:11 ` fsl diu, edid info and i2c platform data Kári Davíðsson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B0E9203.7040208@marel.com \
    --to=kari.davidsson@marel.com \
    --cc=linuxppc-dev@ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).