diff options
author | Jan Glauber <jglauber@cavium.com> | 2016-04-25 16:33:30 +0200 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2016-04-25 23:16:52 +0200 |
commit | b4c715d04006ccc17d9ae0cf673b2f65267c042b (patch) | |
tree | 79a9b2a4cc7e15cd3e50c7b8d344fa6453ce548e | |
parent | f6903783eba49a2cbb6798b35fcf9d2ce61768b9 (diff) |
i2c: octeon: Improve error status checking
Introduce a function that checks for valid status codes depending
on the phase of a transmit or receive. Also add all existing status
codes and improve error handling for various states.
The Octeon TWSI has an "assert acknowledge" bit (TWSI_CTL_AAK) that
is required to be set in master receive mode until the last byte is
requested. The state check needs to consider if this bit was set.
Signed-off-by: Jan Glauber <jglauber@cavium.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>