public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Richard Purdie <rpurdie@rpsys.net>
To: Russell King <rmk+lkml@arm.linux.org.uk>
Cc: Andrew Morton <akpm@osdl.org>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [-mm patch 2/5] SharpSL: Add cxx00 support to the Corgi LCD driver
Date: Thu, 08 Sep 2005 16:06:10 +0100	[thread overview]
Message-ID: <1126191970.8147.79.camel@localhost.localdomain> (raw)
In-Reply-To: <20050908133408.F31595@flint.arm.linux.org.uk>

On Thu, 2005-09-08 at 13:34 +0100, Russell King wrote: 
> On Tue, Sep 06, 2005 at 12:53:48PM +0100, Richard Purdie wrote:
> > +/*
> > + * Corgi/Spitz Touchscreen to LCD interface
> > + */
> > +unsigned long inline corgi_get_hsync_len(void) 
> > +{
> > +	if (machine_is_corgi() || machine_is_shepherd() || machine_is_husky()) {
> > +#ifdef CONFIG_PXA_SHARP_C7xx
> > +		return w100fb_get_hsynclen(&corgifb_device.dev);
> > +#endif
> > +	} else if (machine_is_spitz() || machine_is_akita() || machine_is_borzoi()) {
> > +#ifdef CONFIG_PXA_SHARP_Cxx00
> > +		return pxafb_get_hsync_time(&pxafb_device.dev);
> > +#endif
> 
> This means you have to force these drivers to be built (since this file
> will always be built for sharp stuff.)  This doesn't seem like a good
> solution.

It was made inline so in theory only the touchscreen drivers had the
dependency. I then moved it to another file which kind of breaks things.

Would using symbol_put and symbol_get be a better solution? I was warned
off those functions in the past but this would appear to be an ideal use
as if the framebuffer drivers aren't loaded, we don't care about this.

> > +#define SyncHS(x)   while((GPLR(x) & GPIO_bit(x)) == 0); while((GPLR(x) & GPIO_bit(x)) != 0);
> 
> That's particularly gruesome - firstly, two statements inside a macro.
> Secondly, no barrier() or cpu_relax() in there (as the kernel janitors
> like to see.)  It won't make any difference to the generated code, but
> makes other folk happier.

This needs to be a fast piece of code as its in an interrupt handler and
we go to great lengths to time things to avoid interference from the
lcd. I need to check what timing overhead those functions have...

Richard


      reply	other threads:[~2005-09-08 15:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-06 11:53 [-mm patch 2/5] SharpSL: Add cxx00 support to the Corgi LCD driver Richard Purdie
2005-09-06 12:10 ` Pekka Enberg
2005-09-06 12:14   ` Pekka Enberg
2005-09-08 12:34 ` Russell King
2005-09-08 15:06   ` Richard Purdie [this message]

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=1126191970.8147.79.camel@localhost.localdomain \
    --to=rpurdie@rpsys.net \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmk+lkml@arm.linux.org.uk \
    /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