software_i2c: Improve error behavior

This patch fixes a bug in the software_i2c (bitbang) framework where it
would previously not return an error when receiving a NACK on a write
transaction (deviating behavior from our hardware I2C drivers). It also
adds explicit error codes to be returned for the different kinds of
failure conditions so they are more useful for debugging when dumped.

Change-Id: Ie63bf35123d89dcd99a1f9c079d4cae6a33b0b09
Signed-off-by: Julius Werner <>
Tested-by: build bot (Jenkins) <>
Reviewed-by: Aaron Durbin <>
Reviewed-by: Jonathan Neuschäfer <>
1 file changed