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

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

 



On Thu, Jun 9, 2022 at 1:44 AM Jakob Hauser <jahau@xxxxxxxxxxxxxx> wrote:
>
> This adds support for the magnetometer Yamaha YAS537. The additions are based
> on comparison of Yamaha Android kernel drivers for YAS532 [1] and YAS537 [2].
>
> Functions used by YAS530 & YAS532 only were renamed from yas5xx to yas530_532.
> Registers were renamed accordingly.
>
> In the Yamaha YAS537 Android driver, there is an overflow/underflow control
> implemented. For regular usage, this seems not necessary. A similar overflow/
> underflow control of Yamaha YAS530/532 Android driver isn't integrated in the
> mainline driver. It is therefore skipped for YAS537 in mainline too.
>
> Also in the Yamaha YAS537 Android driver, at the end of the reset_yas537()
> function, a measurement is saved in "last_after_rcoil". Later on, this is
> compared to current measurements. If the difference gets too big, a new
> reset is intialized. The difference in measurements needs to be quite big,

initialized

> it's hard to say if this is necessary for regular operation. Therefore this
> isn't integrated in the mainline driver either.

I understand that Linus knows well this code and may review this, but
can you please split register renaming (at least, maybe something else
can be split as well as preparatory change) to the separate patch?

...

> +                               regmap_read(yas5xx->map, i, &val);
> +                               dev_dbg(yas5xx->dev, "register 0x%02x: %u\n",
> +                                       i, val);

Please, drop all these value reads/writes debug messages, they are
quite expensive (by resource consuming), noisy (may spam logs), and
most important duplicative. regmap API has tracepoints, use them!

Perhaps it would require an additional patch to clean this up, if
anything like this is present in the current code base..

-- 
With Best Regards,
Andy Shevchenko



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux