Граф коммитов

7 Коммитов

Автор SHA1 Сообщение Дата
Tali Perry 8947efc077 i2c: npcm7xx: Clear LAST bit after a failed transaction.
Due to a HW issue, in some scenarios the LAST bit might remain set.
This will cause an unexpected NACK after reading 16 bytes on the next
read.

Example: if user tries to read from a missing device, get a NACK,
then if the next command is a long read ( > 16 bytes),
the master will stop reading after 16 bytes.
To solve this, if a command fails, check if LAST bit is still
set. If it does, reset the module.

Fixes: 56a1485b10 (i2c: npcm7xx: Add Nuvoton NPCM I2C controller driver)
Signed-off-by: Tali Perry <tali.perry1@gmail.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
2020-09-27 20:05:27 +02:00
Tali Perry 06be67266a i2c: npcm7xx: Fix timeout calculation
timeout_usec value calculation was wrong, the calculated value
was in msec instead of usec.

Fixes: 56a1485b10 ("i2c: npcm7xx: Add Nuvoton NPCM I2C controller driver")
Signed-off-by: Tali Perry <tali.perry1@gmail.com>
Reviewed-by: Avi Fishman <avifishman70@gmail.com>
Reviewed-by: Joel Stanley <joel@jms.id.au>
Reviewed-by: Alex Qiu <xqiu@google.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
2020-09-08 08:24:59 +02:00
kernel test robot e6197c8290 i2c: npcm7xx: npcm_i2caddr[] can be static
Fixes: f54736925a ("i2c: npcm7xx: Add support for slave mode for Nuvoton")
Signed-off-by: kernel test robot <lkp@intel.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
2020-06-11 12:30:47 +02:00
Dan Carpenter de9be772c6 i2c: npcm7xx: Fix a couple of error codes in probe
The code here is accidentally returning IS_ERR() which is 1 but it
should be returning negative error codes with PTR_ERR().

Fixes: 56a1485b10 ("i2c: npcm7xx: Add Nuvoton NPCM I2C controller driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
2020-06-08 22:29:36 +02:00
Gustavo A. R. Silva 2667a6814c i2c: npcm7xx: Remove unnecessary parentheses
Remove unnecessary parentheses around _bus_.

This issue was found with the help of Coccinelle.

Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
2020-06-07 11:21:17 +02:00
Tali Perry f54736925a i2c: npcm7xx: Add support for slave mode for Nuvoton
Add support for slave mode for Nuvoton
NPCM BMC I2C controller driver.

Signed-off-by: Tali Perry <tali.perry1@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
2020-06-03 22:39:16 +02:00
Tali Perry 56a1485b10 i2c: npcm7xx: Add Nuvoton NPCM I2C controller driver
Add Nuvoton NPCM BMC I2C controller driver.

Signed-off-by: Tali Perry <tali.perry1@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
2020-06-03 22:39:12 +02:00