[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220220035321.3870-4-warp5tw@gmail.com>
Date: Sun, 20 Feb 2022 11:53:13 +0800
From: Tyrone Ting <warp5tw@...il.com>
To: avifishman70@...il.com, tmaimon77@...il.com, tali.perry1@...il.com,
venture@...gle.com, yuenn@...gle.com, benjaminfair@...gle.com,
robh+dt@...nel.org, krzysztof.kozlowski@...onical.com,
semen.protsenko@...aro.org, yangyicong@...ilicon.com,
wsa@...nel.org, jie.deng@...el.com, sven@...npeter.dev,
bence98@....bme.hu, christophe.leroy@...roup.eu,
lukas.bulwahn@...il.com, olof@...om.net, arnd@...db.de,
digetx@...il.com, andriy.shevchenko@...ux.intel.com,
warp5tw@...il.com, tali.perry@...oton.com, Avi.Fishman@...oton.com,
tomer.maimon@...oton.com, KWLIU@...oton.com, JJLIU0@...oton.com,
kfting@...oton.com
Cc: openbmc@...ts.ozlabs.org, linux-i2c@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH v2 03/11] i2c: npcm: Fix client address calculation
From: Tali Perry <tali.perry1@...il.com>
Fix i2c client address by left-shifting 1 bit before
applying it to the data register.
Fixes: 56a1485b102e ("i2c: npcm7xx: Add Nuvoton NPCM I2C controller driver")
Signed-off-by: Tali Perry <tali.perry1@...il.com>
Signed-off-by: Tyrone Ting <kfting@...oton.com>
---
drivers/i2c/busses/i2c-npcm7xx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/i2c/busses/i2c-npcm7xx.c b/drivers/i2c/busses/i2c-npcm7xx.c
index 2ad166355ec9..4c225e1a058f 100644
--- a/drivers/i2c/busses/i2c-npcm7xx.c
+++ b/drivers/i2c/busses/i2c-npcm7xx.c
@@ -2131,7 +2131,7 @@ static int npcm_i2c_master_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs,
}
npcm_i2c_init_params(bus);
- bus->dest_addr = slave_addr;
+ bus->dest_addr = slave_addr << 1;
bus->msgs = msgs;
bus->msgs_num = num;
bus->cmd_err = 0;
--
2.17.1
Powered by blists - more mailing lists