All of lore.kernel.org
 help / color / mirror / Atom feed
From: Liam Beguin <liambeguin@gmail.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Peter Rosin <peda@axentia.se>,
	Jonathan Cameron <jic23@kernel.org>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-iio <linux-iio@vger.kernel.org>,
	devicetree <devicetree@vger.kernel.org>,
	Rob Herring <robh+dt@kernel.org>
Subject: Re: [PATCH v14 09/11] iio: afe: rescale: add temperature transducers
Date: Wed, 9 Feb 2022 11:38:20 -0500	[thread overview]
Message-ID: <YgPt/Hut4T4C86fX@shaak> (raw)
In-Reply-To: <CAHp75Vf+FkofvC3_jvNadGed+eH7mQvVYXTOiWKCzwinJ3-2-w@mail.gmail.com>

Hi Andy,

On Tue, Feb 08, 2022 at 03:46:27PM +0200, Andy Shevchenko wrote:
> On Tue, Feb 8, 2022 at 4:04 AM Liam Beguin <liambeguin@gmail.com> wrote:
> >
> > A temperature transducer is a device that converts a thermal quantity
> > into any other physical quantity. This patch adds support for
> > temperature to voltage (like the LTC2997) and temperature to current
> > (like the AD590) linear transducers.
> > In both cases these are assumed to be connected to a voltage ADC.
> 
> ...
> 
> > +       rescale->offset = div_s64((s64)offset * rescale->denominator,
> > +                                 rescale->numerator);
> 
> Wonder if we can use mult_frac() here. Would it require 64-bit division?

Same here, I'd rather keep it as is, especially if you plan on adding
helpers later on for struct u32_fract.

Cheers,
Liam

> -- 
> With Best Regards,
> Andy Shevchenko

  reply	other threads:[~2022-02-09 16:38 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-08  2:04 [PATCH v14 00/11] iio: afe: add temperature rescaling support Liam Beguin
2022-02-08  2:04 ` [PATCH v14 01/11] iio: afe: rescale: expose scale processing function Liam Beguin
2022-02-08  2:04 ` [PATCH v14 02/11] iio: afe: rescale: add INT_PLUS_{MICRO,NANO} support Liam Beguin
2022-02-10 16:42   ` Peter Rosin
2022-02-10 17:36     ` Liam Beguin
2022-02-11 14:20       ` Peter Rosin
2022-02-08  2:04 ` [PATCH v14 03/11] iio: afe: rescale: add offset support Liam Beguin
2022-02-08 13:42   ` Andy Shevchenko
2022-02-09 16:35     ` Liam Beguin
2022-02-10 16:47   ` Peter Rosin
2022-02-08  2:04 ` [PATCH v14 04/11] iio: afe: rescale: fix accuracy for small fractional scales Liam Beguin
2022-02-08  2:04 ` [PATCH v14 05/11] iio: afe: rescale: reduce risk of integer overflow Liam Beguin
2022-02-08  2:04 ` [PATCH v14 06/11] iio: afe: rescale: make use of units.h Liam Beguin
2022-02-10 17:41   ` Peter Rosin
2022-02-08  2:04 ` [PATCH v14 07/11] iio: test: add basic tests for the iio-rescale driver Liam Beguin
2022-02-08 12:15   ` kernel test robot
2022-02-08  2:04 ` [PATCH v14 08/11] iio: afe: rescale: add RTD temperature sensor support Liam Beguin
2022-02-08  2:04 ` [PATCH v14 09/11] iio: afe: rescale: add temperature transducers Liam Beguin
2022-02-08 13:46   ` Andy Shevchenko
2022-02-09 16:38     ` Liam Beguin [this message]
2022-02-08  2:04 ` [PATCH v14 10/11] dt-bindings: iio: afe: add bindings for temperature-sense-rtd Liam Beguin
2022-02-08  2:04 ` [PATCH v14 11/11] dt-bindings: iio: afe: add bindings for temperature transducers Liam Beguin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YgPt/Hut4T4C86fX@shaak \
    --to=liambeguin@gmail.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jic23@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peda@axentia.se \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.