rk30:sdk:mask interrupt of the wm8326 which is not used

This commit is contained in:
张晴
2012-04-18 17:41:24 +08:00
parent 2ab2b6b19f
commit 26aad1ff66
2 changed files with 16 additions and 2 deletions

View File

@@ -125,6 +125,19 @@ static int wm831x_pre_init(struct wm831x *parm)
return 0;
}
static int wm831x_mask_interrupt(struct wm831x *Wm831x)
{
/**************************clear interrupt********************/
wm831x_reg_write(Wm831x,WM831X_INTERRUPT_STATUS_1,0xffff);
wm831x_reg_write(Wm831x,WM831X_INTERRUPT_STATUS_2,0xffff);
wm831x_reg_write(Wm831x,WM831X_INTERRUPT_STATUS_3,0xffff);
wm831x_reg_write(Wm831x,WM831X_INTERRUPT_STATUS_4,0xffff);
wm831x_reg_write(Wm831x,WM831X_INTERRUPT_STATUS_5,0xffff);
wm831x_reg_write(Wm831x,WM831X_SYSTEM_INTERRUPTS_MASK,0xbedc); //mask interrupt which not used
return 0;
/*****************************************************************/
}
int wm831x_post_init(struct wm831x *Wm831x)
{
@@ -243,6 +256,7 @@ int wm831x_post_init(struct wm831x *Wm831x)
regulator_put(ldo);
udelay(100);
wm831x_mask_interrupt(Wm831x);
printk("wm831x_post_init end");
return 0;
}

View File

@@ -207,8 +207,8 @@ static int wm831x_i2c_resume(struct device *dev)
void wm831x_i2c_shutdown(struct i2c_client *i2c)
{
struct wm831x *wm831x = i2c_get_clientdata(i2c);
// printk("%s\n", __FUNCTION__);
// wm831x_device_shutdown(wm831x);
printk("%s\n", __FUNCTION__);
wm831x_device_shutdown(wm831x);
}
static const struct i2c_device_id wm831x_i2c_id[] = {