Messages in this thread | | | Date | Mon, 10 Jul 2023 12:44:35 +0300 | From | Andy Shevchenko <> | Subject | Re: [PATCH v1 1/1] usb: musb: Use read_poll_timeout() |
| |
On Tue, Jul 04, 2023 at 11:08:41AM +0200, Linus Walleij wrote: > On Mon, Jul 3, 2023 at 2:19 PM Andy Shevchenko > <andriy.shevchenko@linux.intel.com> wrote: > > > Use read_poll_timeout() instead of open coding it. > > In the same time, fix the typo in the error message. > > > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> > (...) > > + ret = read_poll_timeout(gpiod_get_value, reg, !reg, 1000, 100000, true, > > + glue->intpin); > > Wow that's really cool. I had no idea that you could use read_poll_timeout() > together with gpiod_get_value() like this!
Yep, after 5f5323a14cad ("iopoll: introduce read_poll_timeout macro"). I just realized that we need to bump the sleep_us parameter as beneath it divides it by 4, so I would put 5000 there in v2.
> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Thank you!
-- With Best Regards, Andy Shevchenko
| |