Skip to content

Commit 0f69c89

Browse files
AxelLinLiam Girdwood
authored and
Liam Girdwood
committed
regulator: max8649 - fix setting extclk_freq
The SYNC bits are BIT6 and BIT7 of MAX8649_SYNC register. pdata->extclk_freq could be [0|1|2]. (MAX8649_EXTCLK_26MHZ|MAX8649_EXTCLK_13MHZ|MAX8649_EXTCLK_19MHZ) It requires to left shift 6 bits to properly set extclk_freq. Signed-off-by: Axel Lin <[email protected]> Acked-by: Mark Brown <[email protected]> Signed-off-by: Liam Girdwood <[email protected]>
1 parent e4a6376 commit 0f69c89

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/regulator/max8649.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ static int __devinit max8649_regulator_probe(struct i2c_client *client,
330330
/* set external clock frequency */
331331
info->extclk_freq = pdata->extclk_freq;
332332
max8649_set_bits(info->i2c, MAX8649_SYNC, MAX8649_EXT_MASK,
333-
info->extclk_freq);
333+
info->extclk_freq << 6);
334334
}
335335

336336
if (pdata->ramp_timing) {

0 commit comments

Comments
 (0)