Re: [PATCH] iio: kx022a: Fix acceleration value scaling

From: Jonathan Cameron
Date: Fri Oct 27 2023 - 09:33:41 EST


On Mon, 23 Oct 2023 09:24:39 +0300
Matti Vaittinen <mazziesaccount@xxxxxxxxx> wrote:

> On 10/20/23 19:48, Jagath Jog J wrote:
> > On Fri, Oct 20, 2023 at 5:39 PM Matti Vaittinen
> > <mazziesaccount@xxxxxxxxx> wrote:
> >>
> >> On 10/19/23 21:21, Jagath Jog J wrote:
> >>> Hi Matti,
> >>>
> >>> On Thu, Oct 19, 2023 at 6:54 PM Matti Vaittinen
> >>> <mazziesaccount@xxxxxxxxx> wrote:
> >>>>
> >
> >>>> I did only very quick testing on KX022A and iio_generic_buffer. After
> >>>> the patch the values seemed to be correct order of magnitude. Further
> >>>> testing is appreciated :)
> >>>
> >>> Values are correct with this change, Thank you for fixing.
> >>> Tested-by: Jagath Jog J <jagathjog1996@xxxxxxxxx>
> >>
> >> Thanks a ton for testing! May I ask which component did you use (or did
> >> you just use some 'simulated' regster values?)
> >
> > Hi Matti,
> >
> > I just simulated with the register values, Should the 'tested-by' tag only be
> > provided after hardware testing?
>
> I am not sure TBH. I didn't have a problem with your tag though, I was
> merely curious to hear about the IC usage :)
>
> Now that you mentioned the tested-by tag usage, I started to wonder it
> as well. From pure SW/driver point of view the register value simulation
> is sufficient - but in practice we are not interested in whether the
> code works "in theory" - but whether the products do really work. This
> is something which includes handling of potential HW quircks and
> oddities - which are not always documented or known.
>
> If we assume a case where someone is developing new gizmo and hits a bug
> which is in reality caused by some undocumented HW hiccup - then fixes
> with "tested-by" tags which are not actually tested on HW having this
> hiccup but using SW simulation - may be misleading.
>
> The above is just some overall pondering - I am not too concerned on
> your tested-by tag :) Besides, it's cool you did the testing! I
> appreciate that! However, I wonder if there is some wider consensus
> whether the tests should be ran using real HW when tested-by tag is
> given. Jonathan, do you have any educated opinion on this?

It's fine to add a note. People typically do this if they've tested on
a particular device from a set. So if you want to (entirely optional)

Tested-by .... #Tested by simulate register values

I wouldn't describe that as a particularly educated opinion though :)
Not something I care that much about.

J
>
> > I referred to this driver because it's
> > the most recent accelerometer driver that was merged.
>
> Makes sense :) Thanks for replying!
>
> Yours,
> -- Matti
>