Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1573872imu; Sun, 16 Dec 2018 04:06:33 -0800 (PST) X-Google-Smtp-Source: AFSGD/VG7BYru5k+XXkXfhtPJs+xTGBGBV7seDAlzhOyGqFUM1sauWOBM40eNYAgRyUUT3rzPWD0 X-Received: by 2002:a63:1444:: with SMTP id 4mr8914408pgu.430.1544961993435; Sun, 16 Dec 2018 04:06:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544961993; cv=none; d=google.com; s=arc-20160816; b=JZUsJbq47uF4G+DcmBZnh50sclXaBa1GhhIPn9aPqe1L1WksfDCUeaf/NKilGcurxw hAl0tYGHBwzjNShuORcd+njnrqsOcsAanfafTw3DluHe2hxgC0TUVHFiLftLBz0ajD0S lFTcP8A95KvfpOg4odKcKWj13np5MGd5krvWs3dmAudlgIQQ+nj3aOeDkJmxDnh04jVq 2HQSjuDfZT08gI1qHvYI7+eRt2mOl3VFsquOAOXEhgrFmywjUSRhzxV4SjOtX4NpPCfO ZWuXbtnVTT42XuwTVOkcuBIKGCm4IYYdaQRILBX9e7M55f0CNX88x/igHHZiNoSncg86 95Yw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=snbnwr0pNF402cWIKFNphbOplLvsLpc4soEm8qumAAk=; b=pn1BGm0jt8eXeyYZDeTlpuSxBdetONvBcSYw/jRMql3suk7A2YAs3ULzKkyXwIOK52 IRzY8nX7IGToZcuaF+QE4MwhBpCY0GBkojj137wX7BSaz8mhEV3rSz8LTv4MZw4suV7R 17MP/DrljlStt6peWGKs10UsiDRyUpmidn/Ml2313yGOMwqq/dRsIwa2J5EnI/f92rMB /Tr0ZgrektNhqQgfOXUXJWcGnp1JSiosd99EXK5jl231jogsIv5GAh62u2YGgp3zVMs+ bAIww5kr8a6ReJrvb/h7efim+QMjuoc6+9Wes2+durYAu3aTiLnUhMXzLCzTC1A3jKhq ikPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=vJPxJ0TQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id w67si8415146pgw.84.2018.12.16.04.06.17; Sun, 16 Dec 2018 04:06:33 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=vJPxJ0TQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1730316AbeLPLvK (ORCPT + 99 others); Sun, 16 Dec 2018 06:51:10 -0500 Received: from mail.kernel.org ([198.145.29.99]:33886 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730066AbeLPLvK (ORCPT ); Sun, 16 Dec 2018 06:51:10 -0500 Received: from archlinux (cpc91196-cmbg18-2-0-cust659.5-4.cable.virginm.net [81.96.234.148]) (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 B8FAD217FB; Sun, 16 Dec 2018 11:51:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1544961069; bh=c+3NK1u6yCkOjGJrCq0Az5/AOVr8DtjZ0KI+vPXg6J8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=vJPxJ0TQRCh0Uy0OQXNfn09XSqyHZMdWcJbbRzCdKEtoYYbF+Pd2vRs8sEk1Ftayh PAi3O4SC3psJYkQZ3+ShtHnM0kmn1gw/01aSA6Fy7aYzNafnXmblFgLbeib1V9NY5x Qx48oTuB0OJlP+rjNPF1o1/1Zg9d1kjuhL3rFNrE= Date: Sun, 16 Dec 2018 11:51:04 +0000 From: Jonathan Cameron To: Jeremy Fertic Cc: Lars-Peter Clausen , Michael Hennerich , Hartmut Knaack , Peter Meerwald-Stadler , Greg Kroah-Hartman , linux-iio@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 07/11] staging: iio: adt7316: use correct variable in DAC_internal_Vref read Message-ID: <20181216115104.7df89614@archlinux> In-Reply-To: <20181212005503.28054-8-jeremyfertic@gmail.com> References: <20181212005503.28054-1-jeremyfertic@gmail.com> <20181212005503.28054-8-jeremyfertic@gmail.com> X-Mailer: Claws Mail 3.17.2 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 11 Dec 2018 17:54:59 -0700 Jeremy Fertic wrote: > The dac internal vref settings are part of the ldac config register rather > than the dac config register. Change the variable being used so the read > returns the correct result. > > Signed-off-by: Jeremy Fertic Is this a follow through from the earlier 'correcting' the register addresses? Looks like it to me, so should really have been in that same patch. Oh well, it's staging and horribly broken so let's ignore that ;) It's separated enough from the earlier patches that I will apply it now though. Applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to play with it. Again I have added a do not backport note as far too much chance of it going wrong. Jonathan > --- > drivers/staging/iio/addac/adt7316.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/staging/iio/addac/adt7316.c b/drivers/staging/iio/addac/adt7316.c > index 77ef3c209b67..98101a7157d2 100644 > --- a/drivers/staging/iio/addac/adt7316.c > +++ b/drivers/staging/iio/addac/adt7316.c > @@ -1056,10 +1056,10 @@ static ssize_t adt7316_show_DAC_internal_Vref(struct device *dev, > > if ((chip->id & ID_FAMILY_MASK) == ID_ADT75XX) > return sprintf(buf, "0x%x\n", > - (chip->dac_config & ADT7516_DAC_IN_VREF_MASK) >> > + (chip->ldac_config & ADT7516_DAC_IN_VREF_MASK) >> > ADT7516_DAC_IN_VREF_OFFSET); > return sprintf(buf, "%d\n", > - !!(chip->dac_config & ADT7316_DAC_IN_VREF)); > + !!(chip->ldac_config & ADT7316_DAC_IN_VREF)); > } > > static ssize_t adt7316_store_DAC_internal_Vref(struct device *dev,