new file mode 100644
@@ -0,0 +1,71 @@
+/*
+ * board-omap35x-pmic.c
+ *
+ * Board specific information for different regulators and platforms.
+ *
+ * Copyright (C) 2009 Texas Instrument Incorporated - http://www.ti.com/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any kind,
+ * whether express or implied; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ */
+
+#include <linux/regulator/driver.h>
+#include <linux/regulator/machine.h>
+#include <linux/platform_device.h>
+#include <plat/common.h>
+
+/*
+ * Definitions specific to TWL4030/TPS65950
+ */
+#if defined(CONFIG_PMIC_TWL4030)
+static inline void pmic_twl4030_init(void)
+{
+ /* TWL4030 specific init code */
+}
+#else
+static inline void pmic_twl4030_init(void)
+{
+}
+#endif /* CONFIG_PMIC_TWL4030 */
+
+/*
+ * Definitions specific to TPS65023
+ */
+#if defined(CONFIG_PMIC_TPS65023)
+static inline void pmic_tps65023_init(void)
+{
+ /* TPS65023 specific init code */
+}
+#else
+static inline void pmic_tps65023_init(void)
+{
+}
+#endif /* CONFIG_PMIC_TPS65023 */
+
+/*
+ * Definitions specific to TPS65073
+ */
+#if defined(CONFIG_PMIC_TPS65073)
+static inline void pmic_tps65073_init(void)
+{
+ /* TPS65073 specific init code */
+}
+#else
+static inline void pmic_tps65073_init(void)
+{
+}
+#endif /* CONFIG_PMIC_TPS65073 */
+
+/* Detects the PMIC and initializes it accordingly */
+void omap35x_pmic_init(void)
+{
+ pmic_twl4030_init();
+ pmic_tps65023_init();
+ pmic_tps65073_init();
+}
@@ -51,6 +51,8 @@
#define OMAP3EVM_ETHR_GPIO_IRQ 176
#define OMAP3EVM_SMC911X_CS 5
+extern void omap35x_pmic_init(void);
+
static struct resource omap3evm_smc911x_resources[] = {
[0] = {
.start = OMAP3EVM_ETHR_START,
@@ -204,6 +206,10 @@ static struct twl4030_platform_data omap3evm_twldata = {
.madc = &omap3evm_madc_data,
.usb = &omap3evm_usb_data,
.gpio = &omap3evm_gpio_data,
+ /*
+ * Regulator specific hooks are getting populated
+ * in the omap35x_pmic_init().
+ */
};
static struct i2c_board_info __initdata omap3evm_i2c_boardinfo[] = {
@@ -312,6 +318,8 @@ static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
static void __init omap3_evm_init(void)
{
+ omap35x_pmic_init();
+
omap3_evm_i2c_init();
platform_add_devices(omap3_evm_devices, ARRAY_SIZE(omap3_evm_devices));