mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
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 <[email protected]>
[groeck: .rst related formatting changes in documentation]
Signed-off-by: Guenter Roeck <[email protected]>
This commit is contained in:
parent
521c0b6116
commit
023912dbb8
2 changed files with 63 additions and 8 deletions
|
|
@ -46,4 +46,17 @@ samples Number of samples using in the averaging mode.
|
|||
Supports the list of number of samples:
|
||||
|
||||
1, 4, 16, 64, 128, 256, 512, 1024
|
||||
|
||||
update_interval Data conversion time in millisecond, following:
|
||||
|
||||
update_interval = C x S x (BC + SC)
|
||||
|
||||
* C: number of enabled channels
|
||||
* S: number of samples
|
||||
* BC: bus-voltage conversion time in millisecond
|
||||
* SC: shunt-voltage conversion time in millisecond
|
||||
|
||||
Affects both Bus- and Shunt-voltage conversion time.
|
||||
Note that setting update_interval to 0ms sets both BC
|
||||
and SC to 140 us (minimum conversion time).
|
||||
======================= =======================================================
|
||||
|
|
|
|||
Loading…
Reference in a new issue