Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp1247501lqb; Thu, 30 May 2024 05:08:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXgyaiPT7MwIFqHeY9k9HdoePEGEKwe9WI5GptJ3/dkl/fEfSZ27lMVtWSNSW7phsiEnjOECtPqpJj15xdj5LAl+LkUFzNODRECNwqtfA== X-Google-Smtp-Source: AGHT+IFvjXDErtSBTyvK3xyfPyj3LNsJ7BFq2Tq25zcQkCf9SN6hSSY8R7OWwkpu80WHcwtnWOXA X-Received: by 2002:a05:6a20:7f9f:b0:1b1:fede:59cb with SMTP id adf61e73a8af0-1b264427fd7mr1965931637.0.1717070906017; Thu, 30 May 2024 05:08:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717070906; cv=pass; d=google.com; s=arc-20160816; b=dn69GyOiKqnehwYFjeaj9JkupTsjo38e8JYnAvWatfOefYCDrv371GTX1p4T7bkMxg XFi4pd3vmbT1W5QmBuwmulC9idECrAbLRbKRcssC3N21KXRobEqJHmvx6/puE2ib9vI1 Qq1lFlBwAYduDPK2JVcP9GNq+PPyhI9GXyBLDqe9ULHnv7pw1HiXsEvunOfXSWGUqUcc /59NCN9MM7RPJ8BR1pNt8fpgPsXzhPWjxq5H7OEUHvxqqCNwztkJ4fMBbLxrDLiAs30r GhdKHvBT59Zfs/AaiEeH9Ro1lCEgMcfUt0QQvLnd2XEeB0qjNNjzQsEpZgEBfEIDBHcE FMcw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=reply-to:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:subject:date:from:dkim-signature; bh=SgA21WZi7R1UM9ABjzUf6do28iL2F+LtAR5/5kiqiDU=; fh=+0JxBwAIxgXrPbgpITLGafFl+qo+GEpLisyPcty2UQ8=; b=L+UA/WpvqvAFUpjaIRgTbHFRFJyJPyIBgb3OAEiePAvR3v/ZsmTW8jKlNBwcgav0Aw nUZTkqG3eSaVixsevGIBPYug4Riz5C4k9NxFMbam4J59t+jhb7S/Nas/UYWA0CaVj/c6 HZLUwSlrx0PBSvhijaqiKsqnnGjs7WKvjqSzA8Qky7rAbdzIcnszpneB1GIluLGpaGAn WHxpj0T2Ah+ODn+qYaovGQ2N9Luo9knGgu4erAVqQjyn84SvhNKqggV6K2xEi5G5ACv6 YZqC0f4RY0QgENuhvDQWR4+vk6BCSfc9AshSLU0nEYECo2IJJnXmrxXBAawMgolXjULH kZzQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uOy+f4dn; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-195342-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-195342-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-6c0e256b505si800102a12.476.2024.05.30.05.08.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 May 2024 05:08:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-195342-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uOy+f4dn; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-195342-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-195342-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 86800284AB2 for ; Thu, 30 May 2024 12:08:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9791B183A8B; Thu, 30 May 2024 12:08:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="uOy+f4dn" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B23A5179955; Thu, 30 May 2024 12:08:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717070883; cv=none; b=DRp3sS4PjXg95kEn9/mxr+pqoDrlibOX/tZ+e1nCSH8WmDWJTyCmMwAFx3LY2jLuwP2Yh72Yuama6nA9auPdVviLTg88JVOYQ/ori6/GykfkZdjgJZhWoTY+YP/DW+lPxRWiarU8g7oNT8oJw6s7Cr2EKtDeu259DkxK2fEQ8pg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717070883; c=relaxed/simple; bh=jDeJ/2LLIq3QhO9uL4NshnL3jZave7YV0UkfwYZ8P+4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ZRNo+fRxTipp7hMkZGH+iXT4v7xuylGlFYMcW4N5S+FozKNfF9ZLRdkJSQub0KH314VsQ6lX7NK1k3r7PZeIyrx0qoZOncZUa3Kq6Nb5HMkofy4OvdiC+f+HcPcCMLmhQnR6zHSVPw0TUDWq6ESZfs+g9b8B6IIsU8oczg3QqgQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=uOy+f4dn; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id 588DFC4AF07; Thu, 30 May 2024 12:08:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717070883; bh=jDeJ/2LLIq3QhO9uL4NshnL3jZave7YV0UkfwYZ8P+4=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=uOy+f4dnG1Roxul3BaWOcsOczqLX51vutErzDzQ9hA3X1Zzuu7+khAEiW06wEp3cP I0ovYTNZl/IktaxAEhIXuSWhYZxOxI64UFQ0LhRpbM8Cb/xl4lvbWpT2w3zqimY+G3 OLIUXaRJZYrkFTWNoG3taiJaiWHmFLZp1nz+b7fRqG2iBsBo5XNs75wGIZ6XNl9TvT 2MfmNwhX/ZJheylgBzt/j56ip8jczdcG7k2JXv8KbVh75i1yuvn2NMPDXXjno3Ksqs vzGndhAWEhyAFWsj6Fd16eBGjdMS3w2iAXxN/EyEfe2CzkcNODIzzvsCautYpfvlu/ WPFV/ufOj2otQ== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 51867C25B74; Thu, 30 May 2024 12:08:03 +0000 (UTC) From: Dumitru Ceclan via B4 Relay Date: Thu, 30 May 2024 15:07:52 +0300 Subject: [PATCH v3 4/5] iio: adc: ad7173: Clear append status bit Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240530-ad7173-fixes-v3-4-b85f33079e18@analog.com> References: <20240530-ad7173-fixes-v3-0-b85f33079e18@analog.com> In-Reply-To: <20240530-ad7173-fixes-v3-0-b85f33079e18@analog.com> To: Lars-Peter Clausen , Jonathan Cameron Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Dumitru Ceclan , Dumitru Ceclan X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1717070881; l=1000; i=dumitru.ceclan@analog.com; s=20240313; h=from:subject:message-id; bh=3Lih309+QmE+/CCcvFgIQ2n+1Fi+3MwieGtcQTnVs2U=; b=tfCorgq0OSKRQvM2Q3NGFOUZ1X2YYA74t5jLnItpkypqPxNNNi3vR/gUXjZgy9xDWyb8j/uLq NDCDOpATRj3CWE2Yawyq8iYYrUX1Tu74KX8etJRApoMR6nCL1zl+TDQ X-Developer-Key: i=dumitru.ceclan@analog.com; a=ed25519; pk=HdqMlVyrcazwoiai7oN6ghU+Bj1pusGUFRl30jhS7Bo= X-Endpoint-Received: by B4 Relay for dumitru.ceclan@analog.com/20240313 with auth_id=140 X-Original-From: Dumitru Ceclan Reply-To: dumitru.ceclan@analog.com From: Dumitru Ceclan The previous value of the append status bit was not cleared before setting the new value. This caused the bit to remain set after enabling buffered mode for multiple channels and not permit further buffered reads from a single channel after the fact. Fixes: 8eb903272f75 ("iio: adc: ad7173: add AD7173 driver") Signed-off-by: Dumitru Ceclan --- drivers/iio/adc/ad7173.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/iio/adc/ad7173.c b/drivers/iio/adc/ad7173.c index eb512878c30e..e66a137a76be 100644 --- a/drivers/iio/adc/ad7173.c +++ b/drivers/iio/adc/ad7173.c @@ -543,6 +543,7 @@ static int ad7173_append_status(struct ad_sigma_delta *sd, bool append) unsigned int interface_mode = st->interface_mode; int ret; + interface_mode &= ~AD7173_INTERFACE_DATA_STAT; interface_mode |= AD7173_INTERFACE_DATA_STAT_EN(append); ret = ad_sd_write_reg(&st->sd, AD7173_REG_INTERFACE_MODE, 2, interface_mode); if (ret) -- 2.43.0