[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAK8P3a2fdx55uNPqYxbVhUJZS2hBsCcr4u0i9dmoDkrdjVOMeA@mail.gmail.com>
Date: Fri, 20 Mar 2020 18:02:49 +0100
From: Arnd Bergmann <arnd@...db.de>
To: Guru Das Srinagesh <gurus@...eaurora.org>
Cc: Linux PWM List <linux-pwm@...r.kernel.org>,
Thierry Reding <thierry.reding@...il.com>,
Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>,
Subbaraman Narayanamurthy <subbaram@...eaurora.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Maxime Ripard <mripard@...nel.org>,
Chen-Yu Tsai <wens@...e.org>,
Philipp Zabel <p.zabel@...gutronix.de>
Subject: Re: [PATCH v11 09/12] pwm: sun4i: Use 64-bit division function
On Fri, Mar 20, 2020 at 2:42 AM Guru Das Srinagesh <gurus@...eaurora.org> wrote:
> sun4i_pwm->next_period[pwm->hwpwm] = jiffies +
> - usecs_to_jiffies(cstate.period / 1000 + 1);
> + usecs_to_jiffies(div_u64(cstate.period, 1000) + 1);
> sun4i_pwm->needs_delay[pwm->hwpwm] = true;
>
This one looks like it should use nsecs_to_jiffies(cstate.period) to avoid
having two 64-bit divisions.
Arnd
Powered by blists - more mailing lists