From: Takashi Iwai Subject: Re: [PATCH] Palm interrupt driven touchscreen driver Date: Fri, 05 Jun 2009 12:05:11 +0200 Message-ID: References: <200906032341.03266.marek.vasut@gmail.com> <20090604085407.GB6983@rakim.wolfsonmicro.main> <20090604093737.GF6983@rakim.wolfsonmicro.main> <20090604103807.GG6983@rakim.wolfsonmicro.main> <20090605093001.GA21128@rakim.wolfsonmicro.main> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id E84F824655 for ; Fri, 5 Jun 2009 12:05:11 +0200 (CEST) In-Reply-To: <20090605093001.GA21128@rakim.wolfsonmicro.main> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Mark Brown Cc: ALSA development , Eric Miao , Marek Vasut , Russell King - ARM Linux , linux-arm-kernel@lists.arm.linux.org.uk List-Id: alsa-devel@alsa-project.org 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...? Takashi