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

Commit d5890b2a authored by Girish Mahadevan's avatar Girish Mahadevan
Browse files

i2c: qcom: geni: Fix the way stretch stop is done



Currently when passing in the parameters for stretch stop when there isn't
a stretch we end up passing a mask that could affect other register bits.
Instead set the command parameter to 0 when stretch isn't being done.

Change-Id: I0c97ea4fd16f0ddb3dd5d53037c00c9bd3392bb0
Signed-off-by: default avatarGirish Mahadevan <girishm@codeaurora.org>
parent 9d9d23fa
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -173,7 +173,7 @@ static int geni_i2c_xfer(struct i2c_adapter *adap,
		u32 m_param = 0;
		u32 m_cmd = 0;

		m_param |= (stretch ? STOP_STRETCH : ~(STOP_STRETCH));
		m_param |= (stretch ? STOP_STRETCH : 0);
		m_param |= ((msgs[i].addr & 0x7F) << SLV_ADDR_SHFT);

		gi2c->cur = &msgs[i];