The ina2xx adc driver does not handle differences between INA219/220 and INA226/230/231 completely: - The 219 uses a 4 bit register field for for the bus/shunt voltage adc integration times each, whereas the 226 uses two 3 bit fields for the integration times and an additional 3 bit averaging field. The second patch corrects setting integration times in the config register. - The conversion ready flag differs between the two families. Handling for this flag is corrected in the third patch. Without the patch, the kernel will go in a busy loop (setting read register 6 is ACKed by the INA219, and the following read returns 0). - The 219 also has an adjustable PGA. The default setting allows the maximum range, but also reduces accuracy. (Postponed, needs more thought) Changes v2: - split attribute flags change from [Patch 1] iio: adc: Fix integration time/ averaging from INA219/220 - changed Patch v1 1/2 (now 2/3, feedback by Jonathan Cameron): * Use correct flags for all channels/chips * Improve readability of chip/channel handling in if statement - dropped Patch v1 2/2 for now - added Patch v2 3/3 Stefan Brüns (3): iio: adc: ina2xx: Make use of attribute flags consistent on all channels iio: adc: Fix integration time/averaging for INA219/220 iio: adc: Fix polling of INA219 conversion ready flag drivers/iio/adc/ina2xx-adc.c | 242 +++++++++++++++++++++++++++++++++++++------ 1 file changed, 213 insertions(+), 29 deletions(-) -- 2.12.2 -- To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html