Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1573873imu; Sun, 16 Dec 2018 04:06:33 -0800 (PST) X-Google-Smtp-Source: AFSGD/U+0oW2PiOD2/Bl9cUQUOu3gL1iiCZ0IPhNtqXQ7PZPQwyeb70xsCRVv97XRJrw5IbyHVnQ X-Received: by 2002:a63:6cc:: with SMTP id 195mr8862550pgg.401.1544961993434; 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=AYalJ2IQDTmbEEP4QYhP7kKjgwBw2/GehuNYwB/a8KHfN76aPkcJUHj9/IoNTDSfQG NucFOjkYHsBGYGX1l0EU2uOM/Dk4yDM9yj53eH+7ueLHkOU4jhI7gtOhPg5CcGe1JBs2 luH3BRTTx/F88MMtHfFWUUswnIt4jrajr35mL8zPRVGm4gF4cKAKvmLpXQi6Qd33YucT eQ6DjGSuYgX96QzFsHTScMb5FnyO/d0Bvu/iod7srdaZ7NpYqO43p4JR9XRz901n2qme SSDrUfGL1P3dd9BtGLH4tuLWef9oU7ncFTVCBg/SQGT20mKVLrlX23gzzZyr7U3cYR9n xTcw== 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=IRu7mu8HFzCXOYOMN+XdNs/FKDc1KST0zjHcz97Z6tY=; b=uhbb57P0YTVAjmC67EY/3jVYa5UIBC5y0FhNvfbhISYHdDci2c4kW0TH6Q317aDgdT ohojwIjaylo/l79bCUi9Qq/Eu5XNGVQZ/EPVQqixlHz/rh2Rj6xXv5GkC7W5W/qgCOJl 3LB90Cm1nHKgJkLoFIUqxTUzJW54PBL9Xm9ZA85ZC5XouD6FcVAgkwBQ7o+o2MO+HXW9 dm7XaYczSFCKvn2+p3T5GpcTBP2AbUtKjVEvfSyLJ/Ybt/Myp/vSQhRbR2f4QL4QwK2j EN/T0ZDFNWbjvPQxwzdZntI39JgafK/X7FcobF70pEfiN2yXqQD+A5XnTYiV2OzdRRGZ 0jjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=AWEcFCUA; 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 q24si8384986pls.325.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=AWEcFCUA; 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 S1730337AbeLPLy6 (ORCPT + 99 others); Sun, 16 Dec 2018 06:54:58 -0500 Received: from mail.kernel.org ([198.145.29.99]:36418 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730066AbeLPLy6 (ORCPT ); Sun, 16 Dec 2018 06:54:58 -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 A5A0A217FB; Sun, 16 Dec 2018 11:54:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1544961297; bh=BGuudONu53bpAm0Ozx5ScLy3StJFOX6XFpgaRL+lDuA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=AWEcFCUAd7wn9+8uheZcU//lhfT5fXDfCnsq3l6BaUrMmH9U00YbSpVAv9qfrJnEC ZF+wO1UEhov5/1wIWdgi9dpDghpMklNj30BabqFtFm1lbNG1Nov59QywMSIPXukeWC bWnsSXcQ20iY0l+LCFJ6oTIRH0QgfYoRBlDQDOag= Date: Sun, 16 Dec 2018 11:54:52 +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 08/11] staging: iio: adt7316: allow adt751x to use internal vref for all dacs Message-ID: <20181216115452.199cd703@archlinux> In-Reply-To: <20181212005503.28054-9-jeremyfertic@gmail.com> References: <20181212005503.28054-1-jeremyfertic@gmail.com> <20181212005503.28054-9-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:55:00 -0700 Jeremy Fertic wrote: > With adt7516/7/9, internal vref is available for dacs a and b, dacs c and > d, or all dacs. The driver doesn't currently support internal vref for all > dacs. Change the else if to an if so both bits are checked rather than > just one or the other. > > Signed-off-by: Jeremy Fertic This one is nice and separated from the earlier patches and 'obviously' right I think. Applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to play with it. It's also fine to backport though given how broken the driver was before patches that aren't, I'm not going to mark it for stable! Thanks, Jonathan > --- > drivers/staging/iio/addac/adt7316.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/iio/addac/adt7316.c b/drivers/staging/iio/addac/adt7316.c > index 98101a7157d2..3348fdf08f2e 100644 > --- a/drivers/staging/iio/addac/adt7316.c > +++ b/drivers/staging/iio/addac/adt7316.c > @@ -1081,7 +1081,7 @@ static ssize_t adt7316_store_DAC_internal_Vref(struct device *dev, > ldac_config = chip->ldac_config & (~ADT7516_DAC_IN_VREF_MASK); > if (data & 0x1) > ldac_config |= ADT7516_DAC_AB_IN_VREF; > - else if (data & 0x2) > + if (data & 0x2) > ldac_config |= ADT7516_DAC_CD_IN_VREF; > } else { > ret = kstrtou8(buf, 16, &data);