Re: [PATCH v4 10/10] iio: magnetometer: yas530: Add YAS537 variant

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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:
> >>> On Fri, Jul 29, 2022 at 1:13 AM Jakob Hauser <jahau@xxxxxxxxxxxxxx> 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 think the define and the formula both look strange.

Definition is available in units.h, for most of the SI prefixes.

-- 
With Best Regards,
Andy Shevchenko



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux