On Thu, Nov 27, 2008 at 11:56:05PM +0800, stanley.miao wrote:
On Thu, 2008-11-27 at 13:19 +0000, Mark Brown wrote:
As I said in response to your original posting I'd strongly urge you to look at the s3c24xx_uda134x driver for an example of how something like this can be implemented.
I tried to make it work whether there is platform_data or not. If I write it according to s3c24xx_uda134x style, every board should register a platform_device.
Yes, exactly.
This still has the previous problem with your use of ifdefs: it means that it's not possible to build the driver for configurations that both do and don't need this.
This is why there is a SND_OMAP_TWL4030_SPECIFIC in Kconfig. If there are some board specific features, SND_OMAP_TWL4030_SPECIFIC should be selected under a board config, and omap_twl4030_specific_init() will be difined in the board specific file.
As previously mentioned this prevents building a single kernel with support for multiple boards. That would be a regression from the current situation and isn't really acceptable.