Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3030575pxb; Mon, 18 Oct 2021 06:57:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx43OKMQ9+0bIgm7ZVAzlkoFfekYK4toLAvE6Wvbr27bV9aRRclSUhY5op0ll0eoWgs3sTY X-Received: by 2002:a63:b609:: with SMTP id j9mr17173875pgf.132.1634565476889; Mon, 18 Oct 2021 06:57:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634565476; cv=none; d=google.com; s=arc-20160816; b=pNIFAhWm77B4fjQstyq4qYVaaTMtDtzSXjoPoH0nfxGMLo57YMuO0nAzC+QIKvtH6Q cp4YOvulRAsmF2yNwJoZXrfTq5ChesfmGyeMrnnhg3XoOtX0bRf4yCw2Tfmft1klLOwh TlgPULUdY/oNOcUh0ifxjgnC3eejVaTiEwJ9AjktemsBfXiDwukM7RSrfH/dPF6WwsgZ FJn32WiTyvGUUib4HLD9bzgUCLcglGTsY3msE7kj6uoVkdzhkzkoY1wMZi5X7ZSLMXaO J8LRLmyZ3Q5RPYRJ8a5v07nfPonYrg++vo+82O92vvsMEUhumQ259oCmmT8z2vJL4Mmj +GDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=OM8ilSQFcW/vAojRvwnSFmWZEieKF7Khe5LD9+0E0v0=; b=ttnT429DYprtOiVVShsHi+SSGikSkR0v5yEAb/bud/A85VUqiFj25fzuMqrTmPzUm5 czTEtaBtmOslCr7xeGrhHKtzf4hXrCuXxdgtgkR1F9Phkaunkr7gv764+hZHfFmTyWWV ezNiud46kVE9gjpfUQGfs08KhgTNxeU5WSPxTcPkSrj6eFiySCpJhqkGLVb9pfE7JJbO nLBdO8kIf2hVwhqx7ar/gJJK+xzJ0Wqaa8ycIaTPBPbatJ121Gs5Ex2eHpsXuBVRRooN p//Txv9pmpqNLySFcIAgGJQDGAbTo+s7pBk4fpOAPtlvptWm307a52u/G+lt0BUh5XdM 9jCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=QsMDlrj6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k8si2476413pgl.527.2021.10.18.06.57.44; Mon, 18 Oct 2021 06:57:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=QsMDlrj6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233238AbhJRN64 (ORCPT + 99 others); Mon, 18 Oct 2021 09:58:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:59130 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234481AbhJRN4U (ORCPT ); Mon, 18 Oct 2021 09:56:20 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E89A761A2E; Mon, 18 Oct 2021 13:40:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1634564430; bh=arOuavtSGezhyOzRSIbU4OJWoNzqOS8N+i+b0aA6J/8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QsMDlrj6gJL15A4PyxK8GovWDlwq9mIJnwOM1Es0VtndZE9Ng8ParrZmkUy2PEfwg B+gC8VA+tK9WJLpnlAWl7R0Zos+pN5ZSb2g51kU58oH9+fPe7in0JLRhNTbF4qgQVT wz2D2wi1zZ8GObPtdGPh/lOtShI+gmAjzEa4dZmc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Alexandru Tachici , Stable@vger.kernel.org, Jonathan Cameron Subject: [PATCH 5.14 069/151] iio: adc: ad7780: Fix IRQ flag Date: Mon, 18 Oct 2021 15:24:08 +0200 Message-Id: <20211018132342.933028240@linuxfoundation.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211018132340.682786018@linuxfoundation.org> References: <20211018132340.682786018@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Alexandru Tachici commit e081102f3077aa716974ccebec97003c890d5641 upstream. Correct IRQ flag here is falling. In Sigma-Delta devices the SDO line is also used as an interrupt. Leaving IRQ on level instead of falling might trigger a sample read when the IRQ is enabled, as the SDO line is already low. Not sure if SDO line will always immediately go high in ad_sd_buffer_postenable before the IRQ is enabled. Also the datasheet seem to explicitly say the falling edge of the SDO should be used as an interrupt: >From the AD7780 datasheet: " The DOUT/Figure 22 RDY falling edge can be used as an interrupt to a processor" Fixes: da4d3d6bb9f6 ("iio: adc: ad-sigma-delta: Allow custom IRQ flags") Signed-off-by: Alexandru Tachici Cc: Link: https://lore.kernel.org/r/20210906065630.16325-3-alexandru.tachici@analog.com Signed-off-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman --- drivers/iio/adc/ad7780.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/iio/adc/ad7780.c +++ b/drivers/iio/adc/ad7780.c @@ -203,7 +203,7 @@ static const struct ad_sigma_delta_info .set_mode = ad7780_set_mode, .postprocess_sample = ad7780_postprocess_sample, .has_registers = false, - .irq_flags = IRQF_TRIGGER_LOW, + .irq_flags = IRQF_TRIGGER_FALLING, }; #define _AD7780_CHANNEL(_bits, _wordsize, _mask_all) \