]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit14f8ff294a07594133b6a7d9fe3b84257bb3a98f
tree787cc8828492427b17932505c71b18b2a35ae52f
parent6ccfda57a3107b41b6f6676aad418cdafd4b27fc
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