From 26aad1ff66cd6c369beda60cfabdf78b51f4f010 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E5=BC=A0=E6=99=B4?= Date: Wed, 18 Apr 2012 17:41:24 +0800 Subject: [PATCH] rk30:sdk:mask interrupt of the wm8326 which is not used --- arch/arm/mach-rk30/board-rk30-sdk-wm8326.c | 14 ++++++++++++++ drivers/mfd/wm831x-i2c.c | 4 ++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-rk30/board-rk30-sdk-wm8326.c b/arch/arm/mach-rk30/board-rk30-sdk-wm8326.c index dd184ced8301..f8c62338d6d9 100755 --- a/arch/arm/mach-rk30/board-rk30-sdk-wm8326.c +++ b/arch/arm/mach-rk30/board-rk30-sdk-wm8326.c @@ -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; } diff --git a/drivers/mfd/wm831x-i2c.c b/drivers/mfd/wm831x-i2c.c index 717f629336f3..f618a4af127f 100755 --- a/drivers/mfd/wm831x-i2c.c +++ b/drivers/mfd/wm831x-i2c.c @@ -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[] = { -- 2.34.1