mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
ASoC: es7202: fix es7202 read & write error
The error occur when set pm_domain_always_on as true. error: [ 5.035136][ T9] pc : es7202_multi_chips_update_bits+0xe4/0x22c [ 5.035684][ T9] lr : es7202_multi_chips_update_bits+0x84/0x22c [ 5.036230][ T9] sp : ffffffc0124e3830 [ 5.036593][ T9] pmr_save: 000000e0 [ 5.036923][ T9] x29: ffffffc0124e3850 x28: 0000000000000001 [ 5.037453][ T9] x27: 0000000000002e11 x26: 0000000000000100 [ 5.037981][ T9] x25: 0000000000000208 x24: ffffffc0123f4888 [ 5.038511][ T9] x23: 0000000000000105 x22: 0000000000000102 [ 5.039040][ T9] x21: 0000000000000000 x20: 0000000000000030 [ 5.039572][ T9] x19: 0000000000000000 x18: ffffffc0124950a0 [ 5.040099][ T9] x17: 071c71c71c71c71c x16: 0000000000000001 [ 5.040626][ T9] x15: 0000000000000000 x14: 0000000000000400 [ 5.041153][ T9] x13: 0000000000000004 x12: 0000000000000000 [ 5.041680][ T9] x11: ffffffc0124e3770 x10: 0000000000000001 [ 5.042207][ T9] x9 : 0000000000000030 x8 : 0000000000000007 [ 5.042741][ T9] x7 : 000000b2b5593519 x6 : 0000000000000009 [ 5.043275][ T9] x5 : 0000000000000001 x4 : 0000000000000001 [ 5.043809][ T9] x3 : ffffff81015cb4f0 x2 : 0000000000000000 [ 5.044344][ T9] x1 : ffffff8100340000 x0 : 0000000000000001 [ 5.044880][ T9] Call trace: [ 5.045168][ T9] es7202_multi_chips_update_bits+0xe4/0x22c [ 5.045689][ T9] es7202_probe+0xa0/0x5cc [ 5.046080][ T9] snd_soc_component_probe+0x28/0x80 [ 5.046541][ T9] soc_probe_component+0x254/0x3a8 [ 5.046985][ T9] snd_soc_bind_card+0x464/0xad0 [ 5.047418][ T9] snd_soc_register_card+0xf8/0x114 [ 5.047873][ T9] devm_snd_soc_register_card+0x48/0x90 [ 5.048355][ T9] rk_multicodecs_probe+0x844/0x950 Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com> Change-Id: I3aafcf653fcb15c20c6c23acbcfb54ee84120161
This commit is contained in:
@@ -74,8 +74,8 @@ static int es7202_read(u8 reg, u8 * rt_value, struct i2c_client *client)
|
||||
read_cmd[0] = reg;
|
||||
cmd_len = 1;
|
||||
|
||||
if (client->adapter == NULL)
|
||||
printk("es7202_read client->adapter==NULL\n");
|
||||
if (!client || !client->adapter)
|
||||
return -1;
|
||||
|
||||
ret = i2c_master_send(client, read_cmd, cmd_len);
|
||||
if (ret != cmd_len) {
|
||||
@@ -97,6 +97,9 @@ static int es7202_write(u8 reg, unsigned char value, struct i2c_client *client)
|
||||
int ret = 0;
|
||||
u8 write_cmd[2] = { 0 };
|
||||
|
||||
if (!client || !client->adapter)
|
||||
return -1;
|
||||
|
||||
write_cmd[0] = reg;
|
||||
write_cmd[1] = value;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user