Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753122AbdDNOpy (ORCPT ); Fri, 14 Apr 2017 10:45:54 -0400 Received: from saturn.retrosnub.co.uk ([178.18.118.26]:56501 "EHLO saturn.retrosnub.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751147AbdDNOps (ORCPT ); Fri, 14 Apr 2017 10:45:48 -0400 Subject: Re: [PATCH 0/2] Enhancements for TI INA219/220 current/voltage monitors To: =?UTF-8?Q?Stefan_Br=c3=bcns?= , linux-iio@vger.kernel.org References: Cc: linux-kernel@vger.kernel.org, Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Marc Titinger From: Jonathan Cameron Message-ID: <98174c5e-d785-38dc-7d1f-c2b14273539e@kernel.org> Date: Fri, 14 Apr 2017 15:45:46 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1070 Lines: 24 On 12/04/17 04:01, Stefan Brüns wrote: > 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 first patch correct setting integration times in the config register. > > - The 219 also has an adjustable PGA. The default setting allows the > maximum range, but also reduces accuracy. > > The second patch adds attributes for shunt PGA gain and bus voltage > range (bus voltage PGA), and sets the config register accordingly. > > Stefan Brüns (2): > iio: adc: Fix integration time/averaging for INA219/220 > iio: adc: Allow setting Shunt Voltage PGA gain and Bus Voltage range > > drivers/iio/adc/ina2xx-adc.c | 344 ++++++++++++++++++++++++++++++++++++++++--- > 1 file changed, 322 insertions(+), 22 deletions(-) > These will definitely need an Ack from Marc Titinger if possible.