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

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

 



Hi Andy,

On 10.06.22 16:31, Andy Shevchenko wrote:
> 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?

That makes sense, I'll move the renaming into a 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..

Ok, I'll remove those direct regmap reads in yas537_dump_calibration().

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.

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.

[1]
https://github.com/torvalds/linux/blob/v5.18/drivers/iio/magnetometer/yamaha-yas530.c#L592
[2]
https://github.com/torvalds/linux/blob/v5.18/drivers/iio/magnetometer/yamaha-yas530.c#L678-L699

Kind regards,
Jakob



[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