[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZUDZIEY_uTVMHh3C@smile.fi.intel.com>
Date: Tue, 31 Oct 2023 12:38:24 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Matti Vaittinen <mazziesaccount@...il.com>
Cc: Jonathan Cameron <jic23@...nel.org>,
Subhajit Ghosh <subhajit.ghosh@...aklogic.com>,
Lars-Peter Clausen <lars@...afoo.de>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Conor Dooley <conor+dt@...nel.org>,
Paul Gazzillo <paul@...zz.com>,
Matt Ranostay <matt@...ostay.sg>,
Stefan Windfeldt-Prytz <stefan.windfeldt-prytz@...s.com>,
linux-iio@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/2] iio: light: Add support for APDS9306 Light Sensor
On Tue, Oct 31, 2023 at 09:11:37AM +0200, Matti Vaittinen wrote:
> On 10/30/23 12:21, Matti Vaittinen wrote:
> > On 10/29/23 17:51, Matti Vaittinen wrote:
> > > On 10/28/23 18:20, Jonathan Cameron wrote:
...
> tmp = gts->max_scale;
>
> rem = do_div(tmp, total_gain);
> if (total_gain > 1 && rem >= total_gain / 2)
> tmp += 1ULL;
...which is NIH DIV_ROUND_CLOSEST_ULL()
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists