On Thu, May 14, 2020 at 04:14:13PM +0200, Marek Vasut wrote: > On 5/14/20 4:07 PM, Andrew Lunn wrote: > >> All right > >> > >> btw is jiffies-based timeout OK? Like this: > > > > If you can, make use of include/linux/iopoll.h > > I can't, because I need those weird custom accessors, see > ks8851_wrreg16_par(), unless I'm missing something there?
static int ks8851_rdreg16_par_txqcr(struct foo ks) { return ks8851_rdreg16_par(ks, KS_TXQCR) } int txqcr; err = readx_poll_timeout(ks8851_rdreg16_par_txqcr, txqcr, txqcr & TXQCR_METFE, 10, 10, ks) Andrew