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

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

 



On Sat, Jun 11, 2022 at 1:57 AM Jakob Hauser <jahau@xxxxxxxxxxxxxx> wrote:
> On 10.06.22 16:31, Andy Shevchenko wrote:

...

> >> +                               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..
>
> Ok, I'll remove those direct regmap reads in yas537_dump_calibration().

I'm not sure I understand what you are going to drop. I was talking
about debug messages, the regmap reads are fine. Or you are talking
about them as they are tightened together and one makes no sense
without the other?

> However, I'd like to keep the others. The calibration data is dumped
> before [1] and after [2] being processed by the driver. This is helpful
> to check if it was processed correctly. Dumping the data is done only
> once at probing.

Then it should be probably dev_info() in such cases.

> In yas537_dump_calibration(), I'd also like to keep dumping the
> "hard_offsets". Currently there is no linearization formula known for
> YAS537. Providing the "hard_offsets" may help to find a way.

I understand that, but per se this is not for production esp. taking
into account that regmap has a tracepoint mechanism.

-- 
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