From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Hans de Goede <hansg@kernel.org>
Cc: "David Lechner" <dlechner@baylibre.com>,
"Jonathan Cameron" <jic23@kernel.org>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
linux-iio@vger.kernel.org
Subject: Re: [PATCH v3 1/2] iio: Improve iio_read_channel_processed_scale() precision
Date: Mon, 11 Aug 2025 15:37:03 +0300 [thread overview]
Message-ID: <aJnj7w5aJ3B-AGGD@smile.fi.intel.com> (raw)
In-Reply-To: <7810b341-1216-4fe4-8c05-17acb00430c7@kernel.org>
On Sun, Aug 10, 2025 at 11:12:24PM +0200, Hans de Goede wrote:
> On 10-Aug-25 9:25 PM, Hans de Goede wrote:
> > On 29-Jul-25 7:26 PM, David Lechner wrote:
> >> On 7/27/25 4:06 PM, Hans de Goede wrote:
...
> + switch (scale_type) {
> + case IIO_VAL_INT_PLUS_MICRO: denominator = 1000000LL; break;
> + case IIO_VAL_INT_PLUS_NANO: denominator = 1000000000LL; break;
(s64)MICRO
(s64)NANO
?
> + }
...
> + ret = iio_multiply_value(processed, raw64 * scale,
> + scale_type, scale_val, scale_val2);
> + if (ret < 0)
> + return ret;
>
> return 0;
Simply return iio_...(...); ?
...
> +int iio_multiply_value(int *result, s64 multiplier,
> + unsigned int type, int val, int val2);
There is room for type in the previous line.
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2025-08-11 12:37 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-27 21:06 [PATCH v3 0/2] iio: adc: Add Intel Dollar Cove TI PMIC ADC driver Hans de Goede
2025-07-27 21:06 ` [PATCH v3 1/2] iio: Improve iio_read_channel_processed_scale() precision Hans de Goede
2025-07-29 17:26 ` David Lechner
2025-08-10 19:25 ` Hans de Goede
2025-08-10 21:12 ` Hans de Goede
2025-08-11 12:37 ` Andy Shevchenko [this message]
2025-08-11 14:35 ` Hans de Goede
2025-08-11 14:50 ` Andy Shevchenko
2025-07-27 21:06 ` [PATCH v3 2/2] iio: adc: Add Intel Dollar Cove TI PMIC ADC driver Hans de Goede
2025-07-28 18:41 ` Jonathan Cameron
2025-07-29 17:50 ` David Lechner
2025-07-31 11:12 ` Jonathan Cameron
2025-08-02 11:46 ` Jonathan Cameron
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=aJnj7w5aJ3B-AGGD@smile.fi.intel.com \
--to=andriy.shevchenko@intel.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=hansg@kernel.org \
--cc=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=nuno.sa@analog.com \
/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.