Hi Andy, On 30.07.22 18:36, Andy Shevchenko wrote: > On Sat, Jul 30, 2022 at 3:32 PM Jakob Hauser <jahau@xxxxxxxxxxxxxx> wrote: >> On 30.07.22 13:32, Andy Shevchenko wrote: >>> On Sat, Jul 30, 2022 at 1:10 AM Jakob Hauser <jahau@xxxxxxxxxxxxxx> wrote: >>>> On 29.07.22 19:24, Andy Shevchenko wrote: > > .. > >>>>> To the 4100 denominator: >>>>> https://github.com/XPerience-AOSP-Lollipop/android_kernel_wingtech_msm8916/blob/xpe-11.1/drivers/input/misc/yas_mag_drv-yas537.c#L235, >>>>> seems you can find a lot by browsing someone's code and perhaps a Git >>>>> history. >>>> >>>> I've seen that comment before but I don't understand its meaning. >>> >>> It points out that there is a SMPLTIM, which I decode as Sample Time, >>> which is in 4.1 msec steps (up to 255 steps). >> >> Also thanks for this interpretation, that makes sense. Then the >> denominator consists of factor 1000 to convert microseconds back to >> milliseconds and a factor of 4.1 milliseconds per step. The value >> "intrvl", which is written into the YAS537_MEASURE_INTERVAL register, >> would then be the number of steps of the sample time. >> >> However, I wouldn't add anything of this into the driver as a comment or >> as a name, because we're just guessing. > > Or we can precisely tell that this is guesswork. Up to you. I would keep it as it is. It has no direct relevance. > > .. > >> I think the define and the formula both look strange. > > Definition is available in units.h, for most of the SI prefixes. > Ah, thanks, I didn't find that myself. Sorry for my incomprehension. OK, everything clarified. I'll prepare v5 within the next days. Kind regards, Jakob