Commit ee1691d0 authored by Marc Ferland's avatar Marc Ferland Committed by Andi Shyti
Browse files

i2c: xiic: improve error message when transfer fails to start



xiic_start_xfer can fail for different reasons:

- EBUSY: bus is busy or i2c messages still in tx_msg or rx_msg
- ETIMEDOUT: timed-out trying to clear the RX fifo
- EINVAL: wrong clock settings

Both EINVAL and ETIMEDOUT will currently print a specific error
message followed by a generic one, for example:

    Failed to clear rx fifo
    Error xiic_start_xfer

however EBUSY will simply output the generic message:

    Error xiic_start_xfer

which is not really helpful.

This commit adds a new error message when a busy condition is detected
and also removes the generic message since it does not provide any
relevant information to the user.

Signed-off-by: default avatarMarc Ferland <marc.ferland@sonatest.com>
Acked-by: default avatarMichal Simek <michal.simek@amd.com>
Signed-off-by: default avatarAndi Shyti <andi.shyti@kernel.org>
parent d5adffc4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment