1# 2# Copyright 2021 Grinn 3# 4# SPDX-License-Identifier: Apache-2.0 5# 6 7include: [sensor-device.yaml, i2c-device.yaml] 8 9properties: 10 config: 11 type: int 12 required: true 13 description: | 14 Value of the configuration register 15 e.g shunt voltage and bus voltage ADC conversion 16 times and averaging, operating mode for INA230 or 17 delay for initial ADC conversion, shunt full scale range 18 for INA237. 19 20 current-lsb-microamps: 21 type: int 22 required: true 23 description: | 24 This value should be selected so that measurement resolution is 25 maximized, that is: 26 27 current-lsb(A) = maximum expected current(A) / 2^15 28 29 (sensor has 15 bits). For example, if maximum expected current is 15A: 30 31 current-lsb(A) = 15A / 2^15 ~= 457uA 32 33 Rounded values may be used for convenience, e.g. 500uA/LSB or 1mA/LSB 34 while keeping a good measurement resolution. The units are in uA/LSB 35 so that low maximum currents can be measured with enough resolution. 36 37 rshunt-milliohms: 38 type: int 39 required: true 40 description: Shunt resistor value in milliohms 41 42 alert-gpios: 43 type: phandle-array 44 description: Alert pin 45