X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fmfd%2Ftwl4030-core.c;fp=drivers%2Fmfd%2Ftwl4030-core.c;h=7e7f0db2005d74bef2450ccea9923e733f62b8a8;hb=cb4befa920199d2537f4a3b01405e8ae3c9b20c7;hp=b59c385cbc12f98bc319845d719fc83e518c8dc0;hpb=c59765042f53a79a7a65585042ff463b69cb248c;p=linux-2.6-omap-h63xx.git diff --git a/drivers/mfd/twl4030-core.c b/drivers/mfd/twl4030-core.c index b59c385cbc1..7e7f0db2005 100644 --- a/drivers/mfd/twl4030-core.c +++ b/drivers/mfd/twl4030-core.c @@ -38,6 +38,9 @@ #include #include +#ifdef CONFIG_ARM +#include +#endif /* * The TWL4030 "Triton 2" is one of a family of a multi-function "Power @@ -86,6 +89,12 @@ #define twl_has_madc() false #endif +#ifdef CONFIG_TWL4030_POWER +#define twl_has_power() true +#else +#define twl_has_power() false +#endif + #if defined(CONFIG_RTC_DRV_TWL4030) || defined(CONFIG_RTC_DRV_TWL4030_MODULE) #define twl_has_rtc() true #else @@ -222,6 +231,8 @@ static struct twl4030mapping twl4030_map[TWL4030_MODULE_LAST + 1] = { { 3, TWL4030_BASEADD_SECURED_REG }, }; +extern void twl4030_power_init(struct twl4030_power_data *triton2_scripts); + /*----------------------------------------------------------------------*/ /* Exported Functions */ @@ -775,6 +786,10 @@ twl4030_probe(struct i2c_client *client, const struct i2c_device_id *id) /* setup clock framework */ clocks_init(); + /* load power event scripts */ + if (twl_has_power() && pdata->power) + twl4030_power_init(pdata->power); + /* Maybe init the T2 Interrupt subsystem */ if (client->irq && pdata->irq_base