lkml.org 
[lkml]   [2019]   [Dec]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4] gpio: pca953x: Add Maxim MAX7313 PWM support
Hi Miquèl

On Mon, Dec 16, 2019 at 10:14:16AM +0100, Miquel Raynal wrote:
> Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote on Mon, 16 Dec
> 2019 09:54:24 +0100:
> > intensity = DIV_ROUND_DOWN_ULL((unsigned long long)state->duty_cycle * PWM_DC_STATES, state->period);
> >
> > should be both more exact and cheaper to calculate. (But this is
> > somewhat moot given that state->period shouldn't be there.)
> > (And in general you have to care for overflowing, but I think that's not
> > a problem in practise here as struct pwm_state::duty_cycle is an int
> > (still), and PWM_DC_STATES is small.)
>
> Do you plan to change duty_cycle type?

I don't, but https://patchwork.ozlabs.org/patch/1195481/

Best regards
Uwe

--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |

\
 
 \ /
  Last update: 2019-12-16 10:25    [W:0.029 / U:12.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site