[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <j4yli5bhj3rxzx4selo66mutjooe24eaqanr4srrus4ognwhrs@575agkscdbel>
Date: Thu, 4 Jul 2024 08:27:44 +0200
From: Andi Shyti <andi.shyti@...nel.org>
To: marc.ferland@...il.com
Cc: michal.simek@....com, linux-arm-kernel@...ts.infradead.org,
linux-i2c@...r.kernel.org, linux-kernel@...r.kernel.org,
Marc Ferland <marc.ferland@...atest.com>
Subject: Re: [PATCH v2] i2c: xiic: improve error message when transfer fails
to start
Hi Marc,
On Mon, May 13, 2024 at 12:03:24PM GMT, marc.ferland@...il.com wrote:
> From: Marc Ferland <marc.ferland@...atest.com>
>
> 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: Marc Ferland <marc.ferland@...atest.com>
> ---
> Changes in v2:
> - add a message where the error actually occurs (suggested by
> Andi Shyti)
> - remove the generic message completely (Andi Shyti)
Thanks! Pushed to i2c/i2c-host.
Thanks,
Andi
Powered by blists - more mailing lists