Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1297979imu; Tue, 11 Dec 2018 16:57:27 -0800 (PST) X-Google-Smtp-Source: AFSGD/VP2+XhXDQ8V8oh4JEUU4i9tjjRlYYFq6Y3KRNba7vB3nc7GZCOJAsusYvj2Ywn9G28kHWt X-Received: by 2002:a62:28c9:: with SMTP id o192mr18687701pfo.57.1544576247713; Tue, 11 Dec 2018 16:57:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544576247; cv=none; d=google.com; s=arc-20160816; b=AvkZxvT3SACsyest4d3Y10fWoTqrpRxv17qS8rpgirOCqD0Ev9jrK0BGR6CO4DW9SE sHk2E2Zd1L22oXTONWnKHGbBAlAZSNFyotxuPAztHR/m3BiEiXugn0Tvqf4be3cqnM6N I7Lwtdv5gtqxWDV99+29WEGjyqjusim3MoWgnloI7Aj/rGmx7Q6VJZxbg3TKkmeH0ElX dx5dgRKXhn7my2rUdEnueBo8qb6gDX+onx4861mapUeT6ct0nqvgk1N2SixQWiw6K1Yg mPgbaMlrN7RGg1IjCQrJ5quLlc8IGjs/ECoaoLnt7TdvEVpybWBis+Mtp1f9u2s4p2IZ pu/A== 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:date:subject:cc:to:from :dkim-signature; bh=zwgJV9Fuz7Xdf+vTXkcn64lPHT6DvBIVIzf4MQogFUA=; b=ivXjJ6DVufLYgRs7Z4sGtPwfmtDeAe5nfRo+qkfzBapm1uepUOT0qDQVSn4DQLjDuf 6ya4B0YsnekVcGU6i+0yJHt3knuuWpLNpENBkhgu1sXP93TwgQnG4DsslEHTL6hjZykf +Rgy1Mc+V8fTbo8EwcodZZ+ZEFjHAUkEwGJMhUXPNZanO/eFtOT5O4Fbx7hCIejB9UO3 A+rA92/jpTJq9J+HfdisdTtXmqyzlRdXoTwEBw8GY9lQUKP2qxzplg9yrOjm2p9SvUnJ wID+ECnSWVASMjEbyryPLEG90N8tH76rkF8vFrwd5KAZPVgCEWRqtGLF68bE6SBAi2mz Un2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=WwZFee98; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z5si12616200pgu.19.2018.12.11.16.57.13; Tue, 11 Dec 2018 16:57:27 -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=@gmail.com header.s=20161025 header.b=WwZFee98; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726410AbeLLAz5 (ORCPT + 99 others); Tue, 11 Dec 2018 19:55:57 -0500 Received: from mail-it1-f194.google.com ([209.85.166.194]:32833 "EHLO mail-it1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726365AbeLLAzv (ORCPT ); Tue, 11 Dec 2018 19:55:51 -0500 Received: by mail-it1-f194.google.com with SMTP id m8so12288724itk.0; Tue, 11 Dec 2018 16:55:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zwgJV9Fuz7Xdf+vTXkcn64lPHT6DvBIVIzf4MQogFUA=; b=WwZFee984BbBT6+Sd4HICnfMvb+SOQg3oIRS7Js5rQAOGp5Hb3ZSMfI3rSIwv3//tf TeH3NZxZFm6hIBQfA23W148OvOH+wx5W2HgzjX4Vkpv60ZXZvAj3bB4ZqpwPSoVUVfQH A6b0QLuZeYBVRvjBv8l+tDoll5neYhvTAtFtTRTuuGEWocai0sjW6bvGMOtxroKbtohZ UWN2vjrVrew9nP3XCNUHib0cFStqbSaRtjwjb93S7r+vUeZfKTfWEvKcE/F3LTN4o2t8 ny2PZRds0Rejej8CSLt1XafygrK88SwbGi+VBQWvzI5Rx+Lf4/aXUNCMYyyelWk/a6XE HfIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zwgJV9Fuz7Xdf+vTXkcn64lPHT6DvBIVIzf4MQogFUA=; b=VKavA1rQeiPcT14QlRgYnAQZmXyEy+W9UEUmyQzyXy+3N3mlz2PZWFRnXEAlndZa5F 11fOJ5Tw2NQjYpQXF7Gfi9E1ZT/sdENbUReKr6ygrA/P8CpMBiAzFQb++dZzgDPceQ2S LtJfFPnDkuZLWTZRF0N7pI2ExZxBLMFOA9vgEwj1ci4aCUuKbbm/vUW3t/RlCYv+vAhm mWHf8qEmKr5ma8N8AoW3uy8PDmHHOwkI8N7nLy0rN/UbT4BuM3oMi5oJuFiQW7AigtlH u08gNy6CT7DlxtKBSO9z3gqy4Si4dfz6y6Ll5DpjHt8rhzSL3zAVLLvTFMeQxGhZ7myn ueQA== X-Gm-Message-State: AA+aEWYn5DYM106gxxQ5T7LJIvfZYY71sNHAqCFyDOSi2Z4qzq/dcmZf EG0PEg3DhNLmBYwfA+bJj9M= X-Received: by 2002:a24:19d5:: with SMTP id b204mr4218585itb.6.1544576150954; Tue, 11 Dec 2018 16:55:50 -0800 (PST) Received: from r2700x.localdomain (c-75-70-96-103.hsd1.co.comcast.net. [75.70.96.103]) by smtp.gmail.com with ESMTPSA id l186sm1952445itl.22.2018.12.11.16.55.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Dec 2018 16:55:50 -0800 (PST) From: Jeremy Fertic To: Jonathan Cameron 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, Jeremy Fertic Subject: [PATCH 08/11] staging: iio: adt7316: allow adt751x to use internal vref for all dacs Date: Tue, 11 Dec 2018 17:55:00 -0700 Message-Id: <20181212005503.28054-9-jeremyfertic@gmail.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181212005503.28054-1-jeremyfertic@gmail.com> References: <20181212005503.28054-1-jeremyfertic@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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); -- 2.19.1