mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-10 04:48:04 +09:00
rk30:sdk:Reduce the delay of the 8326 reset,modify the wakeup order of wm8326 i2c
This commit is contained in:
@@ -104,7 +104,7 @@ static int wm831x_pre_init(struct wm831x *parm)
|
||||
|
||||
//BATT_FET_ENA = 1
|
||||
wm831x_reg_write(parm, WM831X_SECURITY_KEY, 0x9716); // unlock security key
|
||||
wm831x_set_bits(parm, WM831X_RESET_CONTROL, 0x1000, 0x1000);
|
||||
wm831x_set_bits(parm, WM831X_RESET_CONTROL, 0x1003, 0x1001);
|
||||
ret = wm831x_reg_read(parm, WM831X_RESET_CONTROL) & 0xffff & UNLOCK_SECURITY_KEY; // enternal reset active in sleep
|
||||
// printk("%s:WM831X_RESET_CONTROL=0x%x\n", __func__, ret);
|
||||
wm831x_reg_write(parm, WM831X_RESET_CONTROL, ret);
|
||||
|
||||
@@ -54,7 +54,7 @@ static int wm831x_i2c_read_device(struct wm831x *wm831x, unsigned short reg,
|
||||
|
||||
ret = i2c_transfer(adap, msgs, 2);
|
||||
|
||||
return (ret == 2)? count : ret;
|
||||
return (ret == 2)? 0 : ret;
|
||||
#else
|
||||
struct i2c_client *i2c = wm831x->control_data;
|
||||
int ret;
|
||||
@@ -177,6 +177,10 @@ static int wm831x_i2c_suspend(struct device *dev)
|
||||
{
|
||||
struct wm831x *wm831x = dev_get_drvdata(dev);
|
||||
|
||||
spin_lock(&wm831x->flag_lock);
|
||||
wm831x->flag_suspend = 1;
|
||||
spin_unlock(&wm831x->flag_lock);
|
||||
|
||||
return wm831x_device_suspend(wm831x);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user