hwmon: (ina3221) use CVRF only for single-shot conversion
authorNinad Malwade <nmalwade@nvidia.com>
Fri, 4 Jun 2021 06:54:43 +0000 (14:54 +0800)
committerGuenter Roeck <linux@roeck-us.net>
Thu, 17 Jun 2021 11:21:46 +0000 (04:21 -0700)
commit6b6af85410cf2db95d39ad9aa1d812a35eb1651e
tree787cc8828492427b17932505c71b18b2a35ae52f
parent1814c4e84de2a89d1c2e1e9bbd241240561075a4
hwmon: (ina3221) use CVRF only for single-shot conversion

As per current logic the wait time per conversion is arouns 430ms
for 512 samples and around 860ms for 1024 samples for 3 channels
considering 140us as the bus voltage and shunt voltage sampling
conversion time.

This waiting time is a lot for the continuous mode and even for
the single shot mode. For continuous mode when moving average is
considered the waiting for CVRF bit is not required and the data
from the previous conversion is sufficuent. As mentioned in the
datasheet the conversion ready bit is provided to help coordinate
single-shot conversions, we can restrict the use to single-shot
mode only.

Also, the conversion time is for the averaged samples, the wait
time for the polling can omit the number of samples consideration.

Signed-off-by: Ninad Malwade <nmalwade@nvidia.com>
Link: https://lore.kernel.org/r/1622789683-30931-1-git-send-email-nmalwade@nvidia.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/ina3221.c