diff options
author | Axel Haslam <axelhaslam@ti.com> | 2011-10-03 20:07:34 -0700 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2011-10-09 12:30:05 -0700 |
commit | 4e93124a83ba1bd4c1cce2f9e8102ec7ace3c684 (patch) | |
tree | 319d28f64fc6a7dd86a478c065d10dd0bcee635d | |
parent | 1c7f07e17bbda907f4c05c41cebc615d0309481f (diff) | |
download | kernel_samsung_tuna-4e93124a83ba1bd4c1cce2f9e8102ec7ace3c684.tar.gz kernel_samsung_tuna-4e93124a83ba1bd4c1cce2f9e8102ec7ace3c684.tar.bz2 kernel_samsung_tuna-4e93124a83ba1bd4c1cce2f9e8102ec7ace3c684.zip |
regulator: TWL6030: add clk32kaudio as regulator
Add the 32KHz audio clock as a regulator as it
it may be used as a clk source for some external
chips. By adding it, we can enable and disable it
using the regulator framework.
Change-Id: Ic7a39600277bd28cac039c1385c68fe712c89875
Signed-off-by: Axel Haslam <axelhaslam@ti.com>
-rw-r--r-- | drivers/mfd/twl-core.c | 5 | ||||
-rw-r--r-- | drivers/regulator/twl-regulator.c | 1 | ||||
-rw-r--r-- | include/linux/i2c/twl.h | 2 |
3 files changed, 8 insertions, 0 deletions
diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c index ed11f6106c9..c8d14f02eed 100644 --- a/drivers/mfd/twl-core.c +++ b/drivers/mfd/twl-core.c @@ -974,6 +974,11 @@ add_children(struct twl4030_platform_data *pdata, unsigned long features) if (IS_ERR(child)) return PTR_ERR(child); + child = add_regulator(TWL6030_REG_CLK32KAUDIO, + pdata->clk32kaudio, features); + if (IS_ERR(child)) + return PTR_ERR(child); + child = add_regulator(TWL6030_REG_VDD3, pdata->vdd3, features); if (IS_ERR(child)) diff --git a/drivers/regulator/twl-regulator.c b/drivers/regulator/twl-regulator.c index 301f1570f82..f34ae3ab0b3 100644 --- a/drivers/regulator/twl-regulator.c +++ b/drivers/regulator/twl-regulator.c @@ -1065,6 +1065,7 @@ static struct twlreg_info twl_regs[] = { TWL6030_FIXED_LDO(VDAC, 0x64, 1800, 0), TWL6030_FIXED_LDO(VUSB, 0x70, 3300, 0), TWL6030_FIXED_RESOURCE(CLK32KG, 0x8C, 0), + TWL6030_FIXED_RESOURCE(CLK32KAUDIO, 0x8F, 0), TWL6030_ADJUSTABLE_SMPS(VDD3, 0x2e, 600, 4000), TWL6030_ADJUSTABLE_SMPS(VMEM, 0x34, 600, 4000), TWL6030_ADJUSTABLE_SMPS(V2V1, 0x1c, 1800, 2100), diff --git a/include/linux/i2c/twl.h b/include/linux/i2c/twl.h index a163c7df55b..57e085709a4 100644 --- a/include/linux/i2c/twl.h +++ b/include/linux/i2c/twl.h @@ -773,6 +773,7 @@ struct twl4030_platform_data { struct regulator_init_data *vcxio; struct regulator_init_data *vusb; struct regulator_init_data *clk32kg; + struct regulator_init_data *clk32kaudio; /* TWL6025 LDO regulators */ struct regulator_init_data *ldo1; struct regulator_init_data *ldo2; @@ -884,5 +885,6 @@ static inline int twl4030charger_usb_en(int enable) { return 0; } #define TWL6025_REG_SMPS4 59 #define TWL6025_REG_VIO 60 +#define TWL6030_REG_CLK32KAUDIO 61 #endif /* End of __TWL4030_H */ |