]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ARM: omap1: don't rely on tps65010
authorArnd Bergmann <arnd@arndb.de>
Fri, 21 Mar 2014 12:33:03 +0000 (13:33 +0100)
committerArnd Bergmann <arnd@arndb.de>
Fri, 21 Mar 2014 17:23:34 +0000 (18:23 +0100)
The code for h2 and osk implicitly assumes that the tps65010
driver is built-in, in order to perform the initial regulator
setup.

This is fine for most real uses, but it does get into the way
of build testing with 'make randconfig', since we don't want
platforms to implicitly select device drivers and subsystems
such as I2C.

This patch by contrast changes the board files to not call
into the tps65010 driver when that is not built-in, allowing
us to build all configurations including some that will not
work properly on this hardware.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap1/board-h2.c
arch/arm/mach-omap1/board-osk.c

index fd90cafc2e36e7b9bc3d5264bc18bfc183965004..65d2acb3149846f60175b2b1f32f9e374300ee33 100644 (file)
@@ -318,6 +318,9 @@ static void __init h2_init_smc91x(void)
 
 static int tps_setup(struct i2c_client *client, void *context)
 {
+       if (!IS_BUILTIN(CONFIG_TPS65010))
+               return -ENOSYS;
+       
        tps65010_config_vregs1(TPS_LDO2_ENABLE | TPS_VLDO2_3_0V |
                                TPS_LDO1_ENABLE | TPS_VLDO1_3_0V);
 
index d68909b095f1c06b135bac8e07dee46408dd5d40..3a0262156e93ee09bd6b3f2a76f49ac8c1b68fa8 100644 (file)
@@ -191,6 +191,9 @@ static struct platform_device osk5912_tps_leds = {
 
 static int osk_tps_setup(struct i2c_client *client, void *context)
 {
+       if (!IS_BUILTIN(CONFIG_TPS65010))
+               return -ENOSYS;
+
        /* Set GPIO 1 HIGH to disable VBUS power supply;
         * OHCI driver powers it up/down as needed.
         */