public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Imre Deak <imre.deak@solidboot.com>
To: Eduardo Valentin <edubezval@gmail.com>
Cc: Kyungmin Park <kmpark@infradead.org>,
	Linux OMAP ML <linux-omap-open-source@linux.omap.com>
Subject: Re: TSC2101/2102
Date: Mon, 2 Apr 2007 23:23:25 +0300	[thread overview]
Message-ID: <20070402202325.GA23808@bitbox> (raw)
In-Reply-To: <a0580c510704020643k6c29da26h548385a1dd1b348f@mail.gmail.com>

On Mon, Apr 02, 2007 at 09:43:58AM -0400, Eduardo Valentin wrote:
> Hi Imre Deak,
> 
> 
> 
> 
> On 3/31/07, Imre Deak <imre.deak@solidboot.com> wrote:
> >On Sat, Mar 31, 2007 at 08:52:17AM -0400, Eduardo Valentin wrote:
> >> Hello Tony,
> >>
> >>
> >>    This is an updated patch to fix lcd for H2 board. This one is
> >> applied against
> >> current linux omap (commit ).
> >>
> >>    The patch is a merge of what was discussed here and what is already
> >>    pushed.
> >>
> >> Signed-off-by: Eduardo Valentin <eduardo.valentin@indt.org.br>
> >>
> >> BR,
> >>
> >> Eduardo Valentin
> >>
> >> [...]
> >>
> >> Index: linux-omap-2.6/arch/arm/mach-omap1/board-h2.c
> >> ===================================================================
> >> --- linux-omap-2.6.orig/arch/arm/mach-omap1/board-h2.c        2007-03-30 
> >14:26:13.000000000 -0400
> >> +++ linux-omap-2.6/arch/arm/mach-omap1/board-h2.c     2007-03-30 
> >14:36:53.000000000 -0400
> >> @@ -305,6 +305,19 @@ struct {
> >>  #define TSC2101_MUX_MCLK_ON  R10_1610_MCLK_ON
> >>  #define TSC2101_MUX_MCLK_OFF R10_1610_MCLK_OFF
> >>
> >> +static void h2_lcd_dev_init(struct spi_device *tsc2101)
> >> +{
> >> +     /* The LCD is connected to the GPIO pins of the TSC2101, so
> >> +      * we have to tie them here. We can also register the LCD driver
> >> +      * first only here, where we know that the TSC driver is ready.
> >> +      */
> >> +
> >> +     device_initialize(&h2_lcd_device.dev);
> >> +
> >> +     dev_set_drvdata(&h2_lcd_device.dev, tsc2101);
> >
> >Is this really necessary? Why isn't it ok to pass it through the
> >platform_data?
> 
>   I tested also with
> h2_lcd_device.dev.platform_data = tsc2101;
> 
>   But the lcd is not initialized using this line. During the board
> boot, it prints:
> lcd_h2 lcd_h2: no platform data

Odd. Calling platform_device_add is one bug at least so that should be
fixed as follows:

+static void h2_lcd_dev_init(struct spi_device *tsc2101)
+{
+	/* The LCD is connected to the GPIO pins of the TSC2101, so
+	 * we have to tie them here. We can also register the LCD driver
+	 * first only here, where we know that the TSC driver is ready.
+	 */
+	h2_lcd_device.dev.platform_data = tsc2101;
+
+	platform_device_register(&h2_lcd_device);
+}

> 
>  I know that it is weird, but that's why I used dev_set_drvdata().

I think it's not a good thing to do, since the related field is for driver
private data.

--Imre

  reply	other threads:[~2007-04-02 20:23 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-09 14:06 TSC2101/2102 Imre Deak
2007-03-09 14:23 ` TSC2101/2102 andrzej zaborowski
2007-03-14 13:21   ` TSC2101/2102 Nishanth Menon
2007-03-14 17:09     ` TSC2101/2102 Imre Deak
2007-03-14 20:35       ` TSC2101/2102 Dirk Behme
2007-03-15  1:18       ` TSC2101/2102 Kyungmin Park
2007-03-15 10:23         ` TSC2101/2102 Imre Deak
2007-03-15 14:23           ` Regarding use of DirectFB Raja Mallik
2007-03-15 17:09             ` Cliff Brake
2007-03-16  0:28           ` TSC2101/2102 Kyungmin Park
2007-03-16  7:41             ` TSC2101/2102 Imre Deak
2007-03-16  8:05               ` TSC2101/2102 Kyungmin Park
2007-03-16  9:49                 ` TSC2101/2102 Imre Deak
2007-03-19  2:02                   ` TSC2101/2102 Kyungmin Park
2007-03-19  7:37                     ` TSC2101/2102 Jarkko Nikula
2007-03-19  8:04                       ` TSC2101/2102 Kyungmin Park
2007-03-19  8:37                         ` TSC2101/2102 Jarkko Nikula
2007-03-19 19:22                           ` TSC2101/2102 tony
2007-03-20  1:46                           ` TSC2101/2102 Kyungmin Park
2007-03-20 13:27                             ` TSC2101/2102 tony
2007-03-20 13:54                               ` TSC2101/2102 Jarkko Nikula
2007-03-20 15:38                                 ` TSC2101/2102 Tony Lindgren
2007-03-21 19:24                                   ` TSC2101/2102 Eduardo Valentin
2007-03-22  6:48                                     ` TSC2101/2102 Jarkko Nikula
2007-03-30 18:49                                       ` TSC2101/2102 Tony Lindgren
2007-03-31 12:52                                         ` TSC2101/2102 Eduardo Valentin
2007-03-31 17:01                                           ` TSC2101/2102 Imre Deak
2007-04-02 13:43                                             ` TSC2101/2102 Eduardo Valentin
2007-04-02 20:23                                               ` Imre Deak [this message]
2007-04-02 20:41                                                 ` TSC2101/2102 Eduardo Valentin
2007-04-03 11:22                                                   ` TSC2101/2102 Eduardo Valentin
2007-04-03 14:36                                                     ` TSC2101/2102 Imre Deak
2007-04-03 15:10                                                       ` TSC2101/2102 Eduardo Valentin
2007-04-03 19:23                                                         ` TSC2101/2102 Tony Lindgren
2007-03-29 20:26       ` TSC2101/2102 Tony Lindgren

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=20070402202325.GA23808@bitbox \
    --to=imre.deak@solidboot.com \
    --cc=edubezval@gmail.com \
    --cc=kmpark@infradead.org \
    --cc=linux-omap-open-source@linux.omap.com \
    /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