lkml.org 
[lkml]   [2020]   [Sep]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v5 01/36] i2c: tegra: Make tegra_i2c_flush_fifos() usable in atomic transfer
On Sun, Sep 6, 2020 at 9:51 PM Dmitry Osipenko <digetx@gmail.com> wrote:
>
> The tegra_i2c_flush_fifos() shouldn't sleep in atomic transfer and jiffies
> are not updating if interrupts are disabled. Let's switch to use iopoll
> API helpers for register-polling. The iopoll API provides helpers for both
> atomic and non-atomic cases.
>
> Note that this patch doesn't fix any known problem because normally FIFO
> is flushed at the time of starting a new transfer.

...

> + if (i2c_dev->is_curr_atomic_xfer)
> + err = readl_relaxed_poll_timeout_atomic(addr, val, !(val & mask),
> + 1000, 1000000);
> + else
> + err = readl_relaxed_poll_timeout(addr, val, !(val & mask),
> + 1000, 1000000);
> +
> + if (err) {
> + dev_err(i2c_dev->dev, "failed to flush FIFO\n");

> + return err;
> }
> return 0;

return err; ?

--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2020-09-07 09:58    [W:0.255 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site