summaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/i2c-npcm7xx.c
Commit message (Collapse)AuthorAgeFilesLines
* i2c: npcm7xx: Clear LAST bit after a failed transaction.Tali Perry2020-09-271-0/+9
| | | | | | | | | | | | | | | | 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: 56a1485b102e (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>
* i2c: npcm7xx: Fix timeout calculationTali Perry2020-09-081-2/+6
| | | | | | | | | | | | timeout_usec value calculation was wrong, the calculated value was in msec instead of usec. Fixes: 56a1485b102e ("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>
* i2c: npcm7xx: npcm_i2caddr[] can be statickernel test robot2020-06-111-1/+1
| | | | | | Fixes: f54736925a4f ("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>
* i2c: npcm7xx: Fix a couple of error codes in probeDan Carpenter2020-06-081-2/+2
| | | | | | | | | The code here is accidentally returning IS_ERR() which is 1 but it should be returning negative error codes with PTR_ERR(). Fixes: 56a1485b102e ("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>
* i2c: npcm7xx: Remove unnecessary parenthesesGustavo A. R. Silva2020-06-071-1/+1
| | | | | | | | | 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>
* i2c: npcm7xx: Add support for slave mode for NuvotonTali Perry2020-06-031-1/+607
| | | | | | | | | 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>
* i2c: npcm7xx: Add Nuvoton NPCM I2C controller driverTali Perry2020-06-031-0/+1736
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>