Re: [PATCH] staging: fbtft: fb_agm1264k-fl.c: Replaced udelay by usleep_range

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jul 24, 2020 at 1:10 PM Fabrizio Benedetti
<fabrizio.benedetti.82@xxxxxxxxx> wrote:
>
> This patch replace udelay with usleep_range
> according to the Documentation/timers/timers-howto.txt .
> The usleep_range have a range that is >= of udelay.

has

Also all functions we refer to as func(). Note parentheses.

...

> @@ -85,7 +85,7 @@ static void reset(struct fbtft_par *par)
>         dev_dbg(par->info->device, "%s()\n", __func__);
>
>         gpiod_set_value(par->gpio.reset, 0);
> -       udelay(20);
> +       usleep_range(20, 25);
>         gpiod_set_value(par->gpio.reset, 1);
>         mdelay(120);
>  }

It's funny you left mdelay and on top of this all of the above makes
sense if you also switch to gpiod_set_value_can_sleep().

This will also require your analysis of the context (atomic /
non-atomic) in the commit message.

-- 
With Best Regards,
Andy Shevchenko



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux