Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp2949332imm; Thu, 24 May 2018 19:42:47 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqnQpBOXnprksXIaU+fqfsw36PWY+x7uYAtigx/lLgP1UiloWatAKeloXH9/tM2LKREd+JA X-Received: by 2002:a17:902:7841:: with SMTP id e1-v6mr607042pln.197.1527216167432; Thu, 24 May 2018 19:42:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527216167; cv=none; d=google.com; s=arc-20160816; b=RDAUuvfTE6+7dZJwUn4AWJ0LMtcXxpkZIzvXxUAXaIPzg3CkBc361kYFjNjLZxqOyG aMU1CXPfIbdqoBL+J/amMPUUkdCo8PFl2eenzJ3c6ufg5hsndBIM2A1I31g0SNYuN8JO a4qt1VThGBczjLAMNsJ5+lkq7xcfs1/uwlsPVhcdE1DBb5azjSWr/T7maAIQkM1EYlsR 3w9iprIuY7iuelnoV+D4mb+RYJy/dCc0czTldYGJQ+4Ano52yFeqTNJX8md6qjF0vs4e NXd21fxusrUP9AiaNQW9njURvSmSMHLlG89c7SaHGtike7yJhTnZk4JShgQlDQ1kSp2+ HOAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=jR/P20JSj11XUuSvbiYEJE89tHldcWxIw8xFLcXnbd8=; b=u1pJv7XHIF3q6UjpFmcUNCXb3WFpmAAG/b6dyyDdGKbIZLOIuVfhiaab2ispWbUVlb f0PUmlF6vhTQgS3bj2pELatMkdjGIRKlj0CeKGfsWAjDmYs8Pe/n9cejtq9W4uJjQcmK Kqn5MoHUpdeZWog1SJL81Ln2tb+AOqZyYom2HOI3675j8+gfPJc4Yr34Ap3xFTYW+MKe iRW9QJYepoCLrRwA3H1MvzHqrSgX0PPPkXUbejJKiptt6U8VecNLmtFqa5JdrcR54YRR wMY4OMJTOHNWeFfTPrEgWsaAedD74hFtQThdDQg/tqnpNe+FjrpOJrACENxynXQh2Lrz BDYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=oKWRuYxy; 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 127-v6si4195647pge.159.2018.05.24.19.42.32; Thu, 24 May 2018 19:42:47 -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=@gmail.com header.s=20161025 header.b=oKWRuYxy; 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 S1161281AbeEXUh4 (ORCPT + 99 others); Thu, 24 May 2018 16:37:56 -0400 Received: from mail-yw0-f195.google.com ([209.85.161.195]:37506 "EHLO mail-yw0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S969126AbeEXUhx (ORCPT ); Thu, 24 May 2018 16:37:53 -0400 Received: by mail-yw0-f195.google.com with SMTP id j190-v6so891418ywe.4; Thu, 24 May 2018 13:37:53 -0700 (PDT) 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; bh=jR/P20JSj11XUuSvbiYEJE89tHldcWxIw8xFLcXnbd8=; b=oKWRuYxyGkBmE0xD80H9/29w7p5K8P908p2qTf838HSYennyDS6MAGCyKetZZVMRzV hxWy3LbM0URaftWoIldudwz5FRLJ/Wl02e32/cBDkw3w8VtUtzC6zWzhah55Rqxttxpj SJPmdmmZBWLxZu/3fvyo0jtYcecmdmW2DDtAfL6rmsp3HRIQ36giNvAIyVywj2s4w2Ja pE4tUO8FkDX0GYMw+bG53Bf8+RHCIVj6Lk3z1nVS7EIYET5Fb9ZR2bHxwHqeKSHehgFb PFIKRsCLziNHzllwheKYHOxt0ZrsmXRQ2LneHKT0UX2Sfa6UJilm6xvEbFGul3Xen/TD PU+w== 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; bh=jR/P20JSj11XUuSvbiYEJE89tHldcWxIw8xFLcXnbd8=; b=HqaNgsd5Fhl5R8XTNdmZHrRKs8N1WgeqRGc5ptv2p6CfmUPMVLXJ1ieLxnwVtHkGUf hIkjaxxaKvyjVTb1rHB4FPdM/ur6siqqNbriLad0rsZtalTIbKKdk0NtPHyZun0RLZwW PzPd1Hv+OFPdbFb3S0zetIlklMwTVYCW+O9w74E5jsXJ34Wv1at/xaQYuGtqj9HHxO/3 6LBMMx20vGWexQ4L/mUfZ7yNlGPGWQKz3I+M9/YYwA2X+5eRl0//rP0XTlN34nxaCTUt IUw856myOPcBf83N6Hdb9PLohKgYoMHGjCyY5Lip+x4AUj+RT3DpfbhIgVt09IAIYgBb jR9g== X-Gm-Message-State: ALKqPwfWIrtyNqLig8IkZbcYR8uDDHFiT3c6lQUzKJtgopfeHjqO94rM xt8yhKvw4LC66MLah1P1hy4= X-Received: by 2002:a0d:c045:: with SMTP id b66-v6mr4745190ywd.461.1527194272964; Thu, 24 May 2018 13:37:52 -0700 (PDT) Received: from localhost ([72.188.97.40]) by smtp.gmail.com with ESMTPSA id m125-v6sm10366888ywm.53.2018.05.24.13.37.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 May 2018 13:37:52 -0700 (PDT) From: William Breathitt Gray To: jic23@kernel.org Cc: knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, William Breathitt Gray Subject: [PATCH 1/2] iio: 104-quad-8: Fix off-by-one error in register selection Date: Thu, 24 May 2018 16:37:46 -0400 Message-Id: <7c1d9be4338ab822680b9ca6ce6eb24ceba32f4e.1527193661.git.vilhelm.gray@gmail.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The reset flags operation is selected by bit 2 in the "Reset and Load Signals Decoders" register, not bit 1. Fixes: 28e5d3bb0325 ("iio: 104-quad-8: Add IIO support for the ACCES 104-QUAD-8") Signed-off-by: William Breathitt Gray --- drivers/iio/counter/104-quad-8.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/counter/104-quad-8.c b/drivers/iio/counter/104-quad-8.c index b56985078d8c..4be85ec54af4 100644 --- a/drivers/iio/counter/104-quad-8.c +++ b/drivers/iio/counter/104-quad-8.c @@ -138,7 +138,7 @@ static int quad8_write_raw(struct iio_dev *indio_dev, outb(val >> (8 * i), base_offset); /* Reset Borrow, Carry, Compare, and Sign flags */ - outb(0x02, base_offset + 1); + outb(0x04, base_offset + 1); /* Reset Error flag */ outb(0x06, base_offset + 1); -- 2.17.0