aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/i2c-fsi.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2018-07-21i2c: fsi: Add bus recoveryEddie James1-0/+132
Bus recovery should reset the bus with the standard i2c recovery procedure. Populate the necessary fields so that the standard procedure can perform the reset. Signed-off-by: Eddie James <eajames@linux.vnet.ibm.com> Tested-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2018-07-21i2c: fsi: Add I2C master lockingEddie James1-4/+12
Since there are many ports per master, each with it's own adapter and chardev, we need some locking to prevent transfers from changing the master state while other transfers are in progress. Signed-off-by: Eddie James <eajames@linux.vnet.ibm.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Tested-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2018-07-21i2c: fsi: Add transfer implementationEddie James1-2/+193
Execute I2C transfers from the FSI-attached I2C master. Use polling instead of interrupts as we have no hardware IRQ over FSI. Signed-off-by: Eddie James <eajames@linux.vnet.ibm.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Tested-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2018-07-21i2c: fsi: Add abort and hardware reset proceduresEddie James1-0/+91
Add abort procedure for failed transfers. Add engine reset procedure that is executed during the abort to recover from various fault conditions. Signed-off-by: Eddie James <eajames@linux.vnet.ibm.com> Tested-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2018-07-21i2c: fsi: Add port structuresEddie James1-0/+91
Add and initialize I2C adapters for each port on the FSI-attached I2C master. Ports for each master are defined in the devicetree. Signed-off-by: Eddie James <eajames@linux.vnet.ibm.com> Tested-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2018-07-21i2c: Add FSI-attached I2C master algorithmEddie James1-0/+239
Add register definitions for FSI-attached I2C master and functions to access those registers over FSI. Add an FSI driver so that our I2C bus is probed up during an FSI scan. Signed-off-by: Eddie James <eajames@linux.vnet.ibm.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Tested-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>