Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 276090
b: refs/heads/master
c: 46232a3
h: refs/heads/master
v: v3
  • Loading branch information
Kevin Hilman authored and Tony Lindgren committed Nov 23, 2011
1 parent d0f1358 commit 306d605
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cc1b0765da6078b906772b79ff211b88cc0ae958
refs/heads/master: 46232a3622c6e33605906ee6690dfef372925f53
6 changes: 2 additions & 4 deletions trunk/arch/arm/mach-omap2/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include "powerdomain.h"
#include "clockdomain.h"
#include "pm.h"
#include "twl-common.h"

static struct omap_device_pm_latency *pm_lats;

Expand Down Expand Up @@ -226,11 +227,8 @@ postcore_initcall(omap2_common_pm_init);

static int __init omap2_common_pm_late_init(void)
{
/* Init the OMAP TWL parameters */
omap3_twl_init();
omap4_twl_init();

/* Init the voltage layer */
omap_pmic_late_init();
omap_voltage_late_init();

/* Initialize the voltages */
Expand Down
11 changes: 11 additions & 0 deletions trunk/arch/arm/mach-omap2/twl-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include <plat/usb.h>

#include "twl-common.h"
#include "pm.h"

static struct i2c_board_info __initdata pmic_i2c_board_info = {
.addr = 0x48,
Expand All @@ -48,6 +49,16 @@ void __init omap_pmic_init(int bus, u32 clkrate,
omap_register_i2c_bus(bus, clkrate, &pmic_i2c_board_info, 1);
}

void __init omap_pmic_late_init(void)
{
/* Init the OMAP TWL parameters (if PMIC has been registerd) */
if (!pmic_i2c_board_info.irq)
return;

omap3_twl_init();
omap4_twl_init();
}

#if defined(CONFIG_ARCH_OMAP3)
static struct twl4030_usb_data omap3_usb_pdata = {
.usb_mode = T2_USB_MODE_ULPI,
Expand Down
3 changes: 3 additions & 0 deletions trunk/arch/arm/mach-omap2/twl-common.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#ifndef __OMAP_PMIC_COMMON__
#define __OMAP_PMIC_COMMON__

#include <plat/irqs.h>

#define TWL_COMMON_PDATA_USB (1 << 0)
#define TWL_COMMON_PDATA_BCI (1 << 1)
#define TWL_COMMON_PDATA_MADC (1 << 2)
Expand Down Expand Up @@ -30,6 +32,7 @@ struct twl4030_platform_data;

void omap_pmic_init(int bus, u32 clkrate, const char *pmic_type, int pmic_irq,
struct twl4030_platform_data *pmic_data);
void omap_pmic_late_init(void);

static inline void omap2_pmic_init(const char *pmic_type,
struct twl4030_platform_data *pmic_data)
Expand Down

0 comments on commit 306d605

Please sign in to comment.