Quoting Doug Anderson (2020-08-31 11:59:37) > On Sat, Aug 29, 2020 at 10:18 AM Jonathan Cameron <jic23@xxxxxxxxxx> wrote: > > Agreed. However, I'd like a comment next to the place we turn it on > > saying what delays we are trying to mitigate by enabling it in this > > driver. > > OK, I used function graph to get a trace. Some of the time is simply > i2c transfers, which we do A LOT of during initialization (and i2c > transfers aren't known for being instant). However, that's not the > big problem. Check out the regmap_read_poll_timeout() in > sx9310_init_compensation(). 20 ms per sleep with a 2 second timeout. > This seems to eat over around 220 ms of the time on my system. > > So how do you want to do this? Do you want me to re-post the patch > and mention the regmap_read_poll_timeout() in the commit message? Do > you want to just add that to the commit message yourself? > I think the suggestion is to put a comment next to the PROBE_PREFER_ASYNCHRONOUS flag indicating that sx9310_init_compensation() can take a while. Should the compensation be delayed even further though to some time when userspace opens the device node?