Change the mach-davinci Kconfig file so that GPIO_PCA953X is default when MACH_DAVINCI_DA850_EVM is set instead of always selecting. This allows users to compile pca953x as a module.
Signed-off-by: Ben Gardiner <[email protected]> CC: Sergei Shtylyov <[email protected]> CC: Nori, Sekhar <[email protected]> Reviewed-by: Kevin Hilman <[email protected]> --- Changes since V3: * use default "default MACH_DAVINCI_DA850_EVM" without 'if' (Kevin Hilman) * rebased to df2e3886aeb6a93c602616d77c9a303ec202e69c of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-davinci.git Changes since V2: * keep all Kconfig changes local to arch/arm/mach-davinci by exploting the fact that attribute assigment to config entries can span multiple files. * removing David Brownell since we don't need the wider scope in the changes Changes since V1: * make PCA953x default when MACH_DAVINCI_DA850_EVM in drivers/gpio/Kconfig instead of selecting GPIO_PCA953X when MACH_DAVINCI_DA850_EVM in arc/arm/mach-davinci/Kconfig * adding David Brownell because I think he is the pca953x goto guy Note that since NAND/NOR setup is performed in the pcs953x setup() function of board-da850-evm.c, when building pca953x as a module it will need to be insmod'ed from early userspace (i.e. initrd) to use a NAND or NOR rootfs for the system. The following commands and their output illustrate the the changes do allow the build of pca953x.c as a module. $cat arch/arm/configs/da8xx_omapl_defconfig|grep -i GPIO_PCA953X;\ make mrproper; make da8xx_omapl_defconfig ;\ cat .config |grep -i GPIO_PCA953X ; sed -ie 's/GPIO_PCA953X=y//g' .config;\ cat .config |grep -i GPIO_PCA953X; make oldconfig CLEAN scripts/basic CLEAN scripts/kconfig CLEAN include/config CLEAN .config HOSTCC scripts/basic/fixdep HOSTCC scripts/basic/docproc scripts/basic/docproc.c: In function ‘docsect’: scripts/basic/docproc.c:336: warning: ignoring return value of ‘asprintf’, declared with attribute warn_unused_result HOSTCC scripts/basic/hash HOSTCC scripts/kconfig/conf.o HOSTCC scripts/kconfig/kxgettext.o SHIPPED scripts/kconfig/zconf.tab.c SHIPPED scripts/kconfig/lex.zconf.c SHIPPED scripts/kconfig/zconf.hash.c HOSTCC scripts/kconfig/zconf.tab.o HOSTLD scripts/kconfig/conf CONFIG_GPIO_PCA953X=y scripts/kconfig/conf --oldconfig arch/arm/Kconfig * * Restart config... * * * GPIO Support * GPIO Support (GPIOLIB) [Y/?] y Debug GPIO calls (DEBUG_GPIO) [N/y/?] n /sys/class/gpio/... (sysfs interface) (GPIO_SYSFS) [N/y/?] n * * Memory mapped GPIO expanders: * IT8761E GPIO support (GPIO_IT8761E) [N/m/y/?] n * * I2C GPIO expanders: * Maxim MAX7300 GPIO expander (GPIO_MAX7300) [N/m/y/?] n MAX7319, MAX7320-7327 I2C Port Expanders (GPIO_MAX732X) [N/m/y/?] n PCA953x, PCA955x, TCA64xx, and MAX7310 I/O ports (GPIO_PCA953X) [Y/n/m/?] (NEW) fixup pca953x module build --- arch/arm/mach-davinci/Kconfig | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig index b77b860..84066e8 100644 --- a/arch/arm/mach-davinci/Kconfig +++ b/arch/arm/mach-davinci/Kconfig @@ -148,7 +148,6 @@ config MACH_DAVINCI_DA850_EVM bool "TI DA850/OMAP-L138/AM18x Reference Platform" default ARCH_DAVINCI_DA850 depends on ARCH_DAVINCI_DA850 - select GPIO_PCA953X help Say Y here to select the TI DA850/OMAP-L138/AM18x Evaluation Module. @@ -178,6 +177,9 @@ config DA850_UI_RMII endchoice +config GPIO_PCA953X + default MACH_DAVINCI_DA850_EVM + config MACH_TNETV107X bool "TI TNETV107X Reference Platform" default ARCH_DAVINCI_TNETV107X -- 1.7.0.4 _______________________________________________ Davinci-linux-open-source mailing list [email protected] http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
