Dominic Curran said the following on 02/17/2009 02:15 AM: > From: Dominic Curran <dcurran@xxxxxx> > Subject: [OMAPZOOM][PATCH] Testing for TWL4030 in board file change. > > This patch changes the method of testing for TWL4030 in the sensor portion of the > board file. > Previously, if TWL4030 was not built into kernel then the build would be stopped > by code in the board file simular to: > #ifndef CONFIG_TWL4030_CORE > #error "no power companion board defined!" > #endif > > However for debugging purposes it maybe required to build without TWL4030. > Therefore this patch allows the kernel to be compiled without a build error when > TWL4030 is not present. > In such a case the sensor power function will build, but when called immediately > return a -ENODEV error (so initilization of sensor will go no further). > > This change is targeted at all camera sensors within the board files for SDP, > Zoom1 & Zoom2. > > Alternative fixes to this problem like changes to Kconfig were considered, but > rejected as inappropriate solutions. > > Would a solution as follows be appropriate? in arch/arm/mach-omap2/Kconfig: config MACH_OMAP_ZOOM2 bool "OMAP3 ZOOM2 board" depends on ARCH_OMAP3 && ARCH_OMAP34XX + select TWL4030_CORE if VIDEO_OMAP3 A similar strategy has been implemented for N800, albeit for other peripherals. Regards, Nishanth Menon -- 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