mirror of
https://github.com/joel16/android_kernel_sony_msm8994.git
synced 2024-11-27 06:01:12 +00:00
spmi: pmic_arb: Fix opcode calculate error in pmic_arb_cmd
The original calculation of spmi command in pmic_arb_cmd()function has wrong opcode bits value. Change-Id: Ifdddaac4d4a58b71dca8307af002435333af0910 Signed-off-by: Wu Fenglin <fenglinw@codeaurora.org>
This commit is contained in:
parent
1b61129781
commit
1f8122a5d1
@ -237,7 +237,9 @@ static int pmic_arb_cmd(struct spmi_controller *ctrl, u8 opc, u8 sid)
|
||||
if (opc < SPMI_CMD_RESET || opc > SPMI_CMD_WAKEUP)
|
||||
return -EINVAL;
|
||||
|
||||
cmd = ((opc | 0x40) << 27) | ((sid & 0xf) << 20);
|
||||
opc -= SPMI_CMD_RESET - PMIC_ARB_OP_RESET;
|
||||
|
||||
cmd = (opc << 27) | ((sid & 0xf) << 20);
|
||||
|
||||
spin_lock_irqsave(&pmic_arb->lock, flags);
|
||||
pmic_arb_write(pmic_arb, PMIC_ARB_CMD(pmic_arb->channel), cmd);
|
||||
|
Loading…
Reference in New Issue
Block a user