From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.5 required=3.0 tests=BAYES_00,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_2 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 96279C433DB for ; Sun, 21 Feb 2021 16:18:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5FB6E64EF1 for ; Sun, 21 Feb 2021 16:18:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229826AbhBUQSs (ORCPT ); Sun, 21 Feb 2021 11:18:48 -0500 Received: from mail.kernel.org ([198.145.29.99]:51476 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229585AbhBUQSr (ORCPT ); Sun, 21 Feb 2021 11:18:47 -0500 Received: from archlinux (cpc108967-cmbg20-2-0-cust86.5-4.cable.virginm.net [81.101.6.87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 22DEE64EF1; Sun, 21 Feb 2021 16:18:04 +0000 (UTC) Date: Sun, 21 Feb 2021 16:18:01 +0000 From: Jonathan Cameron To: Linus Walleij Cc: linux-iio@vger.kernel.org, Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , stable@vger.kernel.org Subject: Re: [PATCH] iio: adc: ab8500-gpadc: Fix off by 10 to 3 Message-ID: <20210221161801.42532e87@archlinux> In-Reply-To: <20201224011700.1059659-1-linus.walleij@linaro.org> References: <20201224011700.1059659-1-linus.walleij@linaro.org> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org On Thu, 24 Dec 2020 02:17:00 +0100 Linus Walleij wrote: > Fix an off by three orders of magnitude error in the AB8500 > GPADC driver. Luckily it showed up quite quickly when trying > to make use of it. The processed reads were returning > microvolts, microamperes and microcelsius instead of millivolts, > milliamperes and millicelsius as advertised. > > Cc: stable@vger.kernel.org > Fixes: 07063bbfa98e ("iio: adc: New driver for the AB8500 GPADC") > Signed-off-by: Linus Walleij No idea why I didn't pick this up before now. I guess I forgot it over xmas. Anyhow, now applied to the fixes-togreg branch of iio.git. Thanks, Jonathan > --- > drivers/iio/adc/ab8500-gpadc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/iio/adc/ab8500-gpadc.c b/drivers/iio/adc/ab8500-gpadc.c > index 6f9a3e2d5533..7b5212ba5501 100644 > --- a/drivers/iio/adc/ab8500-gpadc.c > +++ b/drivers/iio/adc/ab8500-gpadc.c > @@ -918,7 +918,7 @@ static int ab8500_gpadc_read_raw(struct iio_dev *indio_dev, > return processed; > > /* Return millivolt or milliamps or millicentigrades */ > - *val = processed * 1000; > + *val = processed; > return IIO_VAL_INT; > } >