1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-03 09:42:22 +02:00
Files
u-boot-megous/drivers/i2c
mario.six@gdsys.cc 059fce9f61 i2c: mvtwsi: Get rid of status parameter
The twsi_stop function contains a parameter "status," which is used to
pass in the current exit status of the function calling twsi_stop, and
either return this status unchanged if it indicates an error, or return
twsi_stop's exit status if it does not indicate an error.

While not massively complicated, this adds another purpose to the
twsi_stop function, which should have the sole purpose of asserting a
STOP condition on the bus (and not manage the exit status of its
caller).

Therefore, we move the exit status management into the caller functions
by introducing a "stop_status" variable and returning either the status
before the twsi_stop call (kept in the "status" variable), or the status
from the twsi_stop call, depending on which indicates an error.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2016-07-26 10:19:35 +02:00
..
2016-05-17 08:28:55 +02:00
2016-06-10 13:44:58 -07:00
2015-11-12 15:59:02 -05:00
2016-05-02 18:37:09 -04:00
2015-03-18 09:13:17 +01:00
2016-06-10 13:44:58 -07:00
2015-11-12 18:04:12 -05:00