Re: [PATCH v2] iio: gts: Simplify available scale table build

From: Matti Vaittinen
Date: Fri Jan 10 2025 - 09:26:54 EST


On 22/12/2024 11:24, Matti Vaittinen wrote:
On 20/12/2024 21:21, Jonathan Cameron wrote:
On Mon, 16 Dec 2024 10:56:37 +0200
Matti Vaittinen <mazziesaccount@xxxxxxxxx> wrote:

Make available scale building more clear. This hurts the performance
quite a bit by looping throgh the scales many times instead of doing
everything in one loop. It however simplifies logic by:
  - decoupling the gain and scale allocations & computations
  - keeping the temporary 'per_time_gains' table inside the
    per_time_scales computation function.
  - separating building the 'all scales' table in own function and doing
    it based on the already computed per-time scales.

Signed-off-by: Matti Vaittinen <mazziesaccount@xxxxxxxxx>
Looks good to me, but I want to leave it on list a while before applying.
Ideal if it gets some tested-by or other tags before I pick it up.
As always, this is fiddly code, so the more eyes the better!

Please, let it wait until the Christmas has passed. I got information we might be getting some testing before the year changes :)

Well, the year changed and no tested-by tags emerged. I suppose my sources weren't right at this time.

Yours,
-- Matti