[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200602223452.GA470@codeaurora.org>
Date: Tue, 2 Jun 2020 15:34:53 -0700
From: Guru Das Srinagesh <gurus@...eaurora.org>
To: linux-pwm@...r.kernel.org,
Thierry Reding <thierry.reding@...il.com>,
Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>
Cc: Subbaraman Narayanamurthy <subbaram@...eaurora.org>,
David Collins <collinsd@...eaurora.org>,
linux-kernel@...r.kernel.org, Joe Perches <joe@...ches.com>,
Stephen Boyd <sboyd@...nel.org>,
Lee Jones <lee.jones@...aro.org>,
Arnd Bergmann <arnd@...db.de>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
Guenter Roeck <linux@...ck-us.net>,
Daniel Thompson <daniel.thompson@...aro.org>,
Dan Carpenter <dan.carpenter@...cle.com>,
linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH v16 06/11] pwm: imx27: Use 64-bit division macro
On Tue, Jun 02, 2020 at 03:31:11PM -0700, Guru Das Srinagesh wrote:
> Since the PWM framework is switching struct pwm_state.period's
> datatype to u64, prepare for this transition by using
> DIV_ROUND_UP_ULL to handle a 64-bit dividend.
>
> Signed-off-by: Guru Das Srinagesh <gurus@...eaurora.org>
> ---
> drivers/pwm/pwm-imx27.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pwm/pwm-imx27.c b/drivers/pwm/pwm-imx27.c
> index 732a6f3..c50d453 100644
> --- a/drivers/pwm/pwm-imx27.c
> +++ b/drivers/pwm/pwm-imx27.c
> @@ -202,7 +202,7 @@ static void pwm_imx27_wait_fifo_slot(struct pwm_chip *chip,
> sr = readl(imx->mmio_base + MX3_PWMSR);
> fifoav = FIELD_GET(MX3_PWMSR_FIFOAV, sr);
> if (fifoav == MX3_PWMSR_FIFOAV_4WORDS) {
> - period_ms = DIV_ROUND_UP(pwm_get_period(pwm),
> + period_ms = DIV_ROUND_UP_ULL(pwm_get_period(pwm),
> NSEC_PER_MSEC);
> msleep(period_ms);
>
> --
Please disregard this patch, it was sent by mistake. The correct patch
is [1].
[1]: https://lore.kernel.org/lkml/bb43ff8ad9e0b9884722d85e51c8fdb3ef4154d1.1591136989.git.gurus@codeaurora.org/
Thank you.
Guru Das.
Powered by blists - more mailing lists