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

Commit aa9e7a39 authored by Amaury Decrême's avatar Amaury Decrême Committed by Wolfram Sang
Browse files

i2c: sis630: clear sticky bits



The sticky bits must be cleared at the end of the transaction by writing
a 1 to all fields.

Datasheet:
	SMBus Status (SMB_STS)
	The following registers are all sticky bits and only can be
	cleared by writing a one to their corresponding fields.

Signed-off-by: default avatarAmaury Decrême <amaury.decreme@gmail.com>
Reviewed-by: default avatarJean Delvare <khali@linux-fr.org>
Signed-off-by: default avatarWolfram Sang <wolfram@the-dreams.de>
parent 974d6a37
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -213,10 +213,8 @@ static int sis630_transaction_wait(struct i2c_adapter *adap, int size)

static void sis630_transaction_end(struct i2c_adapter *adap, u8 oldclock)
{
	int temp = 0;

	/* clear all status "sticky" bits */
	sis630_write(SMB_STS, temp);
	sis630_write(SMB_STS, 0xFF);

	dev_dbg(&adap->dev, "SMB_CNT before clock restore 0x%02x\n", sis630_read(SMB_CNT));