Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a9c251cf authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "spmi: pmic_arb: Fix opcode calculate error in pmic_arb_cmd"

parents 227b0631 1f8122a5
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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);