Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp871580pxb; Sat, 16 Jan 2021 09:51:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJw2HHAwwAD6u01Lt+aWhfq3MEc3V5W6MbMnD0/pRppkHy3qF0pZTG7K/eQ7pHVmUeQq/zKx X-Received: by 2002:a50:d88c:: with SMTP id p12mr13947577edj.370.1610819469124; Sat, 16 Jan 2021 09:51:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610819469; cv=none; d=google.com; s=arc-20160816; b=fqxQG9Gdk8Ddn3SS4k1DKA3ztVaGSJH6LhtWs6l++KgsRymKAvWzj5Lx4Cd/1Tsugu Yxd6HR4/yTWs/Iodr1US1YhK7mNwqQNVeP97TJDzKS4Dz7A/ON1mrutpWxQR+8iPms3W Sus5pXPNzsXX/FXL4eDgbSIgrouIEZmNAnKKHuJ/uasZq4fzlymf4VU37qqJkFXxywwz G8vchCGStUElJlTtZwmuYqiN1kbwK9oOodbUmqve0pUCook4nYS3SjtU9pZjv7mzUMFZ 0v5AWabCq52WIHASBNiJHdnRYA0CNzcFEbRbh/uKyADiqYLJVW6eDdcvltliwcLUHiEa gQQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=mpmO8raQV5l6qLNBZHZEiZ5BBiUJbwV5OTlt1qaaSfk=; b=SRo0r8KQD/wLCMKDY7xtc9YwB2XTG9/+GDl5wPCwzKjDLVechznjQisD7Qi1plkOum erFQjpvMA5gHQhrUrhO7Ybf+1qCJYq2r/ZuvwkYcdfM/mHjbnPqi1facpvHLZfXaIQ0t 62FFRWCH8HbrkVRwFGxfmjpXKQLpOQDVC4x+1+u3Onkjbt4RNlYPZO3ai6ho3WJTsl/F cqsi+h00xgvg4IF6IbgfHVRWK224olan76DwGKi2ZOnCVvcgwCEb4SyMd1TOLgpUIk2w x5MYrMvalcMhPodIDv8pu1Mnf9iJObRF5jAphJoMEMWvxRipH7XCezTnt5nNGDPegysk bBqA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r4si2487994edm.35.2021.01.16.09.50.46; Sat, 16 Jan 2021 09:51:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727524AbhAPRsU (ORCPT + 99 others); Sat, 16 Jan 2021 12:48:20 -0500 Received: from mail.kernel.org ([198.145.29.99]:36772 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726114AbhAPRsT (ORCPT ); Sat, 16 Jan 2021 12:48:19 -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 8D666223E8; Sat, 16 Jan 2021 17:47:38 +0000 (UTC) Date: Sat, 16 Jan 2021 17:47:35 +0000 From: Jonathan Cameron To: Bjorn Andersson Cc: Jonathan Albrieux , linux-kernel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Andy Gross , Lars-Peter Clausen , Peter Meerwald-Stadler , linux-arm-msm@vger.kernel.org, linux-iio@vger.kernel.org Subject: Re: [PATCH 1/2] iio:adc:qcom-spmi-vadc: add default scale to LR_MUX2_BAT_ID channel Message-ID: <20210116174735.05d0fc75@archlinux> In-Reply-To: References: <20210113151808.4628-1-jonathan.albrieux@gmail.com> <20210113151808.4628-2-jonathan.albrieux@gmail.com> 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-kernel@vger.kernel.org On Fri, 15 Jan 2021 10:30:49 -0600 Bjorn Andersson wrote: > On Wed 13 Jan 09:18 CST 2021, Jonathan Albrieux wrote: > > > Checking at both msm8909-pm8916.dtsi and msm8916.dtsi from downstream > > it is indicated that "batt_id" channel has to be scaled with the default > > function: > > > > chan@31 { > > label = "batt_id"; > > reg = <0x31>; > > qcom,decimation = <0>; > > qcom,pre-div-channel-scaling = <0>; > > qcom,calibration-type = "ratiometric"; > > qcom,scale-function = <0>; > > qcom,hw-settle-time = <0xb>; > > qcom,fast-avg-setup = <0>; > > }; > > > > Change LR_MUX2_BAT_ID scaling accordingly. > > > > Acked-by: Bjorn Andersson > > Not entirely sure, but looking at the history I think this used to work > - but it's obvious that no one has read this channel for a while... > > But I think below is a regression and should be mentioned: > > Fixes: 7c271eea7b8a ("iio: adc: spmi-vadc: Changes to support different scaling") > Yikes that was a while ago :) > > Signed-off-by: Jonathan Albrieux > > Jonathan Cameron, if you merge this through your tree I can take the dts > addition through the Qualcomm tree. Applied to the fixes-togreg branch of iio.git and marked for stable. I'm not going to rush this one given age of the bug, but if I happen to have anything else going it'll make it before the end of this cycle. Thanks, Jonathan > > Regards, > Bjorn > > > --- > > drivers/iio/adc/qcom-spmi-vadc.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/iio/adc/qcom-spmi-vadc.c b/drivers/iio/adc/qcom-spmi-vadc.c > > index b0388f8a69f4..7e7d408452ec 100644 > > --- a/drivers/iio/adc/qcom-spmi-vadc.c > > +++ b/drivers/iio/adc/qcom-spmi-vadc.c > > @@ -598,7 +598,7 @@ static const struct vadc_channels vadc_chans[] = { > > VADC_CHAN_NO_SCALE(P_MUX16_1_3, 1) > > > > VADC_CHAN_NO_SCALE(LR_MUX1_BAT_THERM, 0) > > - VADC_CHAN_NO_SCALE(LR_MUX2_BAT_ID, 0) > > + VADC_CHAN_VOLT(LR_MUX2_BAT_ID, 0, SCALE_DEFAULT) > > VADC_CHAN_NO_SCALE(LR_MUX3_XO_THERM, 0) > > VADC_CHAN_NO_SCALE(LR_MUX4_AMUX_THM1, 0) > > VADC_CHAN_NO_SCALE(LR_MUX5_AMUX_THM2, 0) > > -- > > 2.17.1 > >