[alsa-devel] [PATCH] Palm interrupt driven touchscreen driver

Takashi Iwai tiwai at suse.de
Fri Jun 5 12:05:11 CEST 2009

At Fri, 5 Jun 2009 10:30:02 +0100,
Mark Brown wrote:
> On Fri, Jun 05, 2009 at 11:16:12AM +0200, Takashi Iwai wrote:
> > I couldn't find it.  But IIRC, the original patch was to add "int irq"
> > field to struct snd_ac97.  I would accept it because it can do any
> > harm.
> Ah, yes - I do remember that proposal.  The problem with that is that it
> doesn't scale up to all the platform data you might want to pass in.
> The WM97xx battery and touchscreen drivers are the main things I'm
> interested in here - the platform data for the WM97xx touch driver is
> struct wm97xx_mach_ops in include/linux/wm97xx.h for example.
> > But, adding a generic "void *driver_data" instead of "int irq" can
> > play a bad game.  It can be dangerous when the creator and the user of
> > this pointer are different drivers.  That was my argument.
> There is potential risk involved in these interfaces but it's the
> standard idiom for doing this on embedded systems.  The buses definitely
> don't want to know anything about the random data that drivers may need
> and since you're not dealing with pluggable or variable hardware in the
> same way as you do on PCs the risks of mismatched data aren't such a big
> deal - you'd generally only be able to encounter problems if you're
> building your own kernel.

Well, but you know that can be broken :)

BTW, can't it be simply driver_data/platform_data of ac97.dev...?


More information about the Alsa-devel mailing list