[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZsihaV40J6RjJRvl@smile.fi.intel.com>
Date: Fri, 23 Aug 2024 17:49:13 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Shawn Lin <shawn.lin@...k-chips.com>
Cc: Ye Zhang <ye.zhang@...k-chips.com>, linus.walleij@...aro.org,
brgl@...ev.pl, heiko@...ech.de, linux-gpio@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
linux-rockchip@...ts.infradead.org, linux-kernel@...r.kernel.org,
mika.westerberg@...ux.intel.com, tao.huang@...k-chips.com,
finley.xiao@...k-chips.com, tim.chen@...k-chips.com,
elaine.zhang@...k-chips.com
Subject: Re: [PATCH v2] gpio: rockchip: resolve overflow issues
On Fri, Aug 23, 2024 at 06:59:40PM +0800, Shawn Lin wrote:
> 在 2024/8/23 11:43, Ye Zhang 写道:
...
> > - max_debounce = (GENMASK(23, 0) + 1) * 2 * 1000000 / freq;
> > + div = (u64)(GENMASK(23, 0) + 1) * 2 * 1000000;
> > + max_debounce = DIV_ROUND_CLOSEST_ULL(div, freq);
>
> can't max_debounce = DIV_ROUND_CLOSEST_ULL((GENMASK(23, 0) + 1) * 2 *
> 1000000, freq) work?
Wouldn't be too long line in this case?
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists