Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 176046
b: refs/heads/master
c: 38a6849
h: refs/heads/master
v: v3
  • Loading branch information
Ilkka Koskinen authored and Samuel Ortiz committed Dec 13, 2009
1 parent 1d9def0 commit 8593209
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 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: 75b75722b4eb1032b3fe2e56b7015f23c6080529
refs/heads/master: 38a684963f619eb9117cb898b92bde92cdd09127
9 changes: 7 additions & 2 deletions trunk/drivers/mfd/twl4030-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@
#define HFCLK_FREQ_26_MHZ (2 << 0)
#define HFCLK_FREQ_38p4_MHZ (3 << 0)
#define HIGH_PERF_SQ (1 << 3)
#define CK32K_LOWPWR_EN (1 << 7)


/* chip-specific feature flags, for i2c_device_id.driver_data */
Expand Down Expand Up @@ -695,7 +696,8 @@ static inline int __init unprotect_pm_master(void)
return e;
}

static void clocks_init(struct device *dev)
static void clocks_init(struct device *dev,
struct twl4030_clock_init_data *clock)
{
int e = 0;
struct clk *osc;
Expand Down Expand Up @@ -742,6 +744,9 @@ static void clocks_init(struct device *dev)
}

ctrl |= HIGH_PERF_SQ;
if (clock && clock->ck32k_lowpwr_enable)
ctrl |= CK32K_LOWPWR_EN;

e |= unprotect_pm_master();
/* effect->MADC+USB ck en */
e |= twl4030_i2c_write_u8(TWL4030_MODULE_PM_MASTER, ctrl, R_CFG_BOOT);
Expand Down Expand Up @@ -820,7 +825,7 @@ twl4030_probe(struct i2c_client *client, const struct i2c_device_id *id)
inuse = true;

/* setup clock framework */
clocks_init(&client->dev);
clocks_init(&client->dev, pdata->clock);

/* load power event scripts */
if (twl_has_power() && pdata->power)
Expand Down
5 changes: 5 additions & 0 deletions trunk/include/linux/i2c/twl4030.h
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,10 @@ int twl4030_i2c_read(u8 mod_no, u8 *value, u8 reg, unsigned num_bytes);

/*----------------------------------------------------------------------*/

struct twl4030_clock_init_data {
bool ck32k_lowpwr_enable;
};

struct twl4030_bci_platform_data {
int *battery_tmp_tbl;
unsigned int tblsize;
Expand Down Expand Up @@ -425,6 +429,7 @@ struct twl4030_codec_data {

struct twl4030_platform_data {
unsigned irq_base, irq_end;
struct twl4030_clock_init_data *clock;
struct twl4030_bci_platform_data *bci;
struct twl4030_gpio_platform_data *gpio;
struct twl4030_madc_platform_data *madc;
Expand Down

0 comments on commit 8593209

Please sign in to comment.