Re: [PATCH 5/6] Driver for WM97xx touchscreens in streaming modeon PXA2xx systems
From: Mark Brown
Date: Mon Jan 14 2008 - 11:36:08 EST
On Mon, Jan 14, 2008 at 04:06:46PM +0100, Marc Kleine-Budde wrote:
> Mark Brown wrote:
> > On Mon, Jan 14, 2008 at 10:56:06AM +0100, Marc Kleine-Budde wrote:
> > The driver really isn't intended to cope with them. As you say, other
> > boards may have things wired up differently and therefore require
> > different configuration of the wm97xx and other bits of the system. The
> > expectation is that other systems will have their own driver.
> What bits have to setup in a different way? Only the stuff in
> wm97xx_acc_startup() or other things aswell. An irq can be put as utual
The main thing for pxa2xx would be the interrupt enable callback and
possibly also the acc_shutdown() function depending on what the startup
function had to do for the board. If there were platform data then at
least some of the module options (AC97 link slot, for example) ought to
have at least defaults supplied that way too. However...
> into a device's resouce, Setting up bits may be done like other stuff on
> pxa, too. e.g. pxa_set_ohci_info.
It's straightforward for something discovered using the platform bus but
unfortunately these controllers are AC97 devices and are discovered via
the AC97 bus. This makes life harder - I can't see any sensible way of
getting platform data to describe the machine to the driver. Hopefully
I'm missing something here but if not the options are limited.
> With my limited understanding of the pxa-wm97xx.c file, the only board
> dependent stuff is done in wm97xx_acc_startup() so a different "driver"
> for other boards would result in code duplication.
That's a concern I share - you'll likely end up with either that or
ifdefs, neither of which is ideal. Being able to use platform data
would be much nicer for all these drivers, not just pxa2xx-wm97xx.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/