Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2569854yba; Mon, 6 May 2019 08:08:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqwQetoJCwgvOAUnLNqDYUSHxFT5B8yYtAgbPHqSNQnJDS1hDlYn8OptoKcvpzONDf/lyfT/ X-Received: by 2002:aa7:8384:: with SMTP id u4mr33206797pfm.214.1557155325983; Mon, 06 May 2019 08:08:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557155325; cv=none; d=google.com; s=arc-20160816; b=g5/Oy2HH3RjeMf4BixyJbYupDrPhYwoyCz0A8nWHORDRjwg74J0FubzM+qBvzeNOsF h+bbhteAjrZErbUhRxdjB3qhmTIllH3kCkgHDk3wiZY9ti/tJpeAiWgalXwhrdkAGT+Z DAFJfeB1K1+FNXWteGURcGfmzgF2lh/PGGp+iBKZWeGWwkZ1EXfp9R8sCHxynrQP19xi Tj3o+kcxLbe91s785tKiEhii6bkhx2YGmGir73tv5nTIHmGBbacdmGOs0bmOHsTdxPhu fgTc0v6hF7smTsbXEVh+1c7AKNOTnGRtSBnN6sTcfPWXABdumn+moN3VtFfA4/s99FfT LTnw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=QF8YwwJbiYy4owy4hmjQd7jEu5LNta1wRVyetDVjPXU=; b=zNzYCAXiNkB+qW5uxZecvL2nB4PZoCqWBjh1Jc38ZorMt0NQq/E89qTErXvDC/QKm0 4SVQSOIcYerjkDxfroHtHKcC/H2qXnNpZapIpNLomIjzJh7j/DEsb3BoLDllc/44snYm VxjXfn/dTJvhmFXim8f1sQVH391rfwKZhgqKTI47rj3/AQtt0vRHlL1HYx2KJtAe66nV NXf1FKJRxiZKSLRaOusuWsUL3gCfX4jXMzpyY2J5K9BqTItmftJ9pML5RYreKNNy5Cp6 yzIiqW9xyU1riOYa13r2vlmJGOtwvU/xIsY/he3ph8tGowM9uKUNAfRH9O3N+oRYw29P VuWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=yNMQM3Ja; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 67si13150305pla.356.2019.05.06.08.08.28; Mon, 06 May 2019 08:08:45 -0700 (PDT) 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=yNMQM3Ja; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727371AbfEFOhT (ORCPT + 99 others); Mon, 6 May 2019 10:37:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:57886 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727347AbfEFOhP (ORCPT ); Mon, 6 May 2019 10:37:15 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 3AACD206A3; Mon, 6 May 2019 14:37:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1557153434; bh=GymqtUjs3yMq3S/YyM/ppiiHTpPg8oNOIbMQ1GKUQPQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yNMQM3Ja04AFZabbTpqOjG1pFnoGmgAkhF3mtqsZzHVf2S8UL5Ep9w+ReYy5TekKI t/70PUSxVROgHcxZxGUFehtUEKJWBOen1ixKmtkJ75pca4NVSdjSZie145/CGeCUu1 pZW6K0vKMVNeD9Mm4M0nAFfoYvfVPqvbMPqWtiKA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jeremy Fertic , Jonathan Cameron Subject: [PATCH 5.0 088/122] staging: iio: adt7316: allow adt751x to use internal vref for all dacs Date: Mon, 6 May 2019 16:32:26 +0200 Message-Id: <20190506143102.637545998@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190506143054.670334917@linuxfoundation.org> References: <20190506143054.670334917@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jeremy Fertic commit 10bfe7cc1739c22f0aa296b39e53f61e9e3f4d99 upstream. 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 Fixes: 35f6b6b86ede ("staging: iio: new ADT7316/7/8 and ADT7516/7/9 driver") Signed-off-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman --- drivers/staging/iio/addac/adt7316.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/staging/iio/addac/adt7316.c +++ b/drivers/staging/iio/addac/adt7316.c @@ -1079,7 +1079,7 @@ static ssize_t adt7316_store_DAC_interna 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);