Re: [PATCH v2 08/14] iio: accel: bma220: migrate to regmap API

Petre Rodan
2025-09-12T14:54:41Z

[-- Attachment #1: Type: text/plain, Size: 1269 bytes --]

Hi Jonathan,

On Wed, Sep 10, 2025 at 07:12:25PM +0100, Jonathan Cameron wrote:
> On Wed, 10 Sep 2025 10:57:13 +0300
> Petre Rodan <petre.rodan@subdimension.ro> wrote:
>
> > Switch to regmap API.
> >
> There are a few things in here that seem unrelated to the regmap change
> and should be in separate patches where we can review and discuss them more easily.
>
> Thanks,
> Jonathan
>
> > diff --git a/drivers/iio/accel/bma220_core.c b/drivers/iio/accel/bma220_core.c
> >> static irqreturn_t bma220_trigger_handler(int irq, void *p)
> > {
[..]
> > iio_push_to_buffers_with_ts(indio_dev, &data->scan, sizeof(data->scan),
> > - pf->timestamp);
>
> Why the move to grabbing timestamps in the thread rather than the top half?
>
> I don't necessarily mind that change but doesn't feel appropriate to have
> it in the same patch as the regmap change.

one of my unit tests [1] fails when using the original code (all timestamps are
0 when reading the IIO buffer with iio_generic_buffer)

would be easier to just split modification into new patch instead of debugging
the old code :)

[1]: https://codeberg.org/subDIMENSION/lkm_sandbox/src/branch/main/bosch_bma220/unit-tests/permanent_latch/test.sh

best regards,
peter

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]