Skip to content

Commit 147922f

Browse files
committed
ARM: davinci: fix build failure without I2C
The two supplies are referenced outside of #ifdef CONFIG_I2C but defined inside, which breaks the build if that is not built-in: mach-davinci/board-dm644x-evm.c:861:21: error: use of undeclared identifier 'fixed_supplies_1_8v' ARRAY_SIZE(fixed_supplies_1_8v), 1800000); ^ mach-davinci/board-dm644x-evm.c:861:21: error: use of undeclared identifier 'fixed_supplies_1_8v' mach-davinci/board-dm644x-evm.c:861:21: error: use of undeclared identifier 'fixed_supplies_1_8v' mach-davinci/board-dm644x-evm.c:860:49: error: use of undeclared identifier 'fixed_supplies_1_8v' regulator_register_always_on(0, "fixed-dummy", fixed_supplies_1_8v, I don't know if the regulators are used anywhere without I2C, but always registering them seems to be the safe choice here. On a related note, it might be best to also deal with CONFIG_I2C=m across the file, unless this is going to be moved to DT and removed really soon anyway. Link: https://lore.kernel.org/r/[email protected] Fixes: 5e06d19 ("ARM: davinci: dm644x-evm: Add Fixed regulators needed for tlv320aic33") Signed-off-by: Arnd Bergmann <[email protected]>
1 parent d0c7dc1 commit 147922f

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

arch/arm/mach-davinci/board-dm644x-evm.c

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -655,19 +655,6 @@ static struct i2c_board_info __initdata i2c_info[] = {
655655
},
656656
};
657657

658-
/* Fixed regulator support */
659-
static struct regulator_consumer_supply fixed_supplies_3_3v[] = {
660-
/* Baseboard 3.3V: 5V -> TPS54310PWP -> 3.3V */
661-
REGULATOR_SUPPLY("AVDD", "1-001b"),
662-
REGULATOR_SUPPLY("DRVDD", "1-001b"),
663-
};
664-
665-
static struct regulator_consumer_supply fixed_supplies_1_8v[] = {
666-
/* Baseboard 1.8V: 5V -> TPS54310PWP -> 1.8V */
667-
REGULATOR_SUPPLY("IOVDD", "1-001b"),
668-
REGULATOR_SUPPLY("DVDD", "1-001b"),
669-
};
670-
671658
#define DM644X_I2C_SDA_PIN GPIO_TO_PIN(2, 12)
672659
#define DM644X_I2C_SCL_PIN GPIO_TO_PIN(2, 11)
673660

@@ -700,6 +687,19 @@ static void __init evm_init_i2c(void)
700687
}
701688
#endif
702689

690+
/* Fixed regulator support */
691+
static struct regulator_consumer_supply fixed_supplies_3_3v[] = {
692+
/* Baseboard 3.3V: 5V -> TPS54310PWP -> 3.3V */
693+
REGULATOR_SUPPLY("AVDD", "1-001b"),
694+
REGULATOR_SUPPLY("DRVDD", "1-001b"),
695+
};
696+
697+
static struct regulator_consumer_supply fixed_supplies_1_8v[] = {
698+
/* Baseboard 1.8V: 5V -> TPS54310PWP -> 1.8V */
699+
REGULATOR_SUPPLY("IOVDD", "1-001b"),
700+
REGULATOR_SUPPLY("DVDD", "1-001b"),
701+
};
702+
703703
#define VENC_STD_ALL (V4L2_STD_NTSC | V4L2_STD_PAL)
704704

705705
/* venc standard timings */

0 commit comments

Comments
 (0)