summaryrefslogtreecommitdiff
path: root/arch/arm/mach-davinci/board-dm644x-evm.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2016-02-01 21:35:58 +0100
committerSekhar Nori <nsekhar@ti.com>2016-02-17 19:20:05 +0530
commit8e58041114319ad290e85a7a82077dc9e2f93613 (patch)
tree55b731f30101b225a956c479aa5da6950a4a697a /arch/arm/mach-davinci/board-dm644x-evm.c
parentce32c5c5a346a09ed938cdf01a000c885d699b27 (diff)
ARM: davinci: make I2C support optional
The davinci platform has tried to get support for the EEPROM right, but failed to get a clean build so far. At the moment, we get a warning whenever CONFIG_SYSFS is disabled, as that is needed by EEPROM_AT24: warning: (MACH_DAVINCI_EVM && MACH_SFFSDR && MACH_DAVINCI_DM6467_EVM && MACH_DAVINCI_DM365_EVM && MACH_DAVINCI_DA830_EVM && MACH_MITYOMAPL138 && MACH_MINI2440) selects EEPROM_AT24 which has unmet direct dependencies (I2C && SYSFS) Kevin Hilman initially added the 'select' to ensure that EEPROM_AT24 is always enabled in machines that really want it for normal operation (i.e. for reading the MAC address). This broke when I2C was disabled, and Russell King followed up with another patch to select that as well. I now see that the SYSFS dependency is still missing, which leaves us with three options: a) add 'select SYSFS' in addition to the others b) change AT24_EEPPROM to work without sysfs (should be possible) c) remove all those selects again and get the files to build when I2C is disabled. I would really hate to do a) because adding select statements that hardwire user-selectable symbols is generally a bad idea. I first tried b) but then ended up redoing the patch from scratch to approach c), so we can also remove the other selects. I checked that CONFIG_I2C is still enabled with davinci_all_defconfig, so that does not have to change. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Fixes: 45b146d746ea ("ARM: Davinci: Fix I2C build errors") Fixes: 22ca466847ad ("davinci: kconfig: select at24 eeprom for selected boards") Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Diffstat (limited to 'arch/arm/mach-davinci/board-dm644x-evm.c')
-rw-r--r--arch/arm/mach-davinci/board-dm644x-evm.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c b/arch/arm/mach-davinci/board-dm644x-evm.c
index 7a20507a3eef..68cc09907828 100644
--- a/arch/arm/mach-davinci/board-dm644x-evm.c
+++ b/arch/arm/mach-davinci/board-dm644x-evm.c
@@ -267,7 +267,7 @@ static struct platform_device rtc_dev = {
static struct snd_platform_data dm644x_evm_snd_data;
/*----------------------------------------------------------------------*/
-
+#ifdef CONFIG_I2C
/*
* I2C GPIO expanders
*/
@@ -612,6 +612,7 @@ static void __init evm_init_i2c(void)
i2c_add_driver(&dm6446evm_msp_driver);
i2c_register_board_info(1, i2c_info, ARRAY_SIZE(i2c_info));
}
+#endif
#define VENC_STD_ALL (V4L2_STD_NTSC | V4L2_STD_PAL)
@@ -780,7 +781,9 @@ static __init void davinci_evm_init(void)
pr_warn("%s: Cannot configure AEMIF\n",
__func__);
+#ifdef CONFIG_I2C
evm_leds[7].default_trigger = "nand-disk";
+#endif
if (HAS_NOR)
pr_warn("WARNING: both NAND and NOR flash are enabled; disable one of them.\n");
} else if (HAS_NOR)
@@ -789,9 +792,10 @@ static __init void davinci_evm_init(void)
platform_add_devices(davinci_evm_devices,
ARRAY_SIZE(davinci_evm_devices));
+#ifdef CONFIG_I2C
evm_init_i2c();
-
davinci_setup_mmc(0, &dm6446evm_mmc_config);
+#endif
dm644x_init_video(&dm644xevm_capture_cfg, &dm644xevm_display_cfg);
davinci_serial_init(dm644x_serial_device);