diff options
author | Nicolin Chen <nicoleotsuka@gmail.com> | 2019-04-17 19:12:10 -0400 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2019-04-18 09:44:11 -0400 |
commit | 023912dbb80f5faf7a028aad6562774472d82a5a (patch) | |
tree | 906ecb878ef4645ad71f1b33f84ed46e2514d2bf /Documentation/hwmon | |
parent | 521c0b6116ef60e4b96ba42dbf285b2ad69071d4 (diff) |
hwmon: (ina3221) Add voltage conversion time settings
The CONFIG register has two 3-bit fields for conversion time
settings of Bus-voltage and Shunt-voltage, respectively. The
conversion settings, along with averaging mode, allow users
to optimize available timing requirement.
This patch adds an 'update_interval' sysfs node through the
hwmon_chip_info of hwmon core. It reflects a total hardware
conversion time:
samples * channels * (Bus + Shunt conversion times)
Though INA3221 supports different conversion time setups for
Bus and Shunt voltages, this patch only adds the support of
a unified setting for both conversion times, by dividing the
conversion time into two equal values.
Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>
[groeck: .rst related formatting changes in documentation]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'Documentation/hwmon')
-rw-r--r-- | Documentation/hwmon/ina3221.rst | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Documentation/hwmon/ina3221.rst b/Documentation/hwmon/ina3221.rst index 1e34abb38b59..f6007ae8f4e2 100644 --- a/Documentation/hwmon/ina3221.rst +++ b/Documentation/hwmon/ina3221.rst | |||
@@ -46,4 +46,17 @@ samples Number of samples using in the averaging mode. | |||
46 | Supports the list of number of samples: | 46 | Supports the list of number of samples: |
47 | 47 | ||
48 | 1, 4, 16, 64, 128, 256, 512, 1024 | 48 | 1, 4, 16, 64, 128, 256, 512, 1024 |
49 | |||
50 | update_interval Data conversion time in millisecond, following: | ||
51 | |||
52 | update_interval = C x S x (BC + SC) | ||
53 | |||
54 | * C: number of enabled channels | ||
55 | * S: number of samples | ||
56 | * BC: bus-voltage conversion time in millisecond | ||
57 | * SC: shunt-voltage conversion time in millisecond | ||
58 | |||
59 | Affects both Bus- and Shunt-voltage conversion time. | ||
60 | Note that setting update_interval to 0ms sets both BC | ||
61 | and SC to 140 us (minimum conversion time). | ||
49 | ======================= ======================================================= | 62 | ======================= ======================================================= |