2011/5/4 Vladimir Pantelic <vladoman@xxxxxxxxx>: > Enric Balletbà i Serra wrote: >> >> Hi guys, >> I'm thinking probably in a crazy idea, I hope someone can help me or >> kill definitely this idea from my mind. >> >> I'll explain a little more, the real problem is I don't know how to >> add support for an expansion board for IGEP v2 board. I see most of >> boards adds the support inside the board-xxxxx.c file, for example if >> the expansion board has a Touchscreen interface using ADS7846/TSC2046 >> they register ads7846 platform data in board-xxxx.c file. This is ok >> beacause the ads7846 can be detected and if expansion board is not >> present Âthe detection fails, but maybe other devices in expansion >> board can't be detected (for example an I/O expansion). So which is >> the best form to do this ? >> >> I'm thinking in create a kernel module for the expansion board that >> add all the new features, the expansion board should come with a I2C >> E2PROM for board ID storage, so the idea is create an i2c driver that >> reads the E2PROM and if found the Board ID inits all the expansion >> board devices. > > don't know if you are aware of that: > > http://elinux.org/BeagleBoardPinMux#Expansion_boards > Yes I know it. > also beagle.c board file has support for some expansion boards > already, maybe there is some code to be shared. > > But I don't see any support for expansion board in board-omap3beagle.c http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=arch/arm/mach-omap2/board-omap3beagle.c;h=33007fd4a0835fd298129c9fda30b844707cc08b;hb=HEAD i see some patches (not published in mainline) that are reading a kernel cmdline. I mean, the bootloader (u-boot) detects if an expansion board is present (mostly via i2c) and then add to the kernel cmdline a parameter with the name of the expansion board. The kernel reads this parameter and initializes the expansion board devices. But not sure if this is a good solution. What solution do you think is better ? Using kernel cmdline or create a separate kernel module for every expansion board ? In fact the purpose of this email is discuss a bit which is the proper solution to add an expansion board to the kernel mainline. Regards, Enric -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html