Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3019825pxb; Mon, 18 Oct 2021 06:44:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzfanVKrpzpgiruD4SjXVIAs2xsOGi0u+8KUr8d0FlAW5biAYfOO9K/6RRyB2SRYLYiK/io X-Received: by 2002:a17:90b:388f:: with SMTP id mu15mr33350724pjb.28.1634564664955; Mon, 18 Oct 2021 06:44:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634564664; cv=none; d=google.com; s=arc-20160816; b=kAqSaYxiOc7jkfaJqJtMO9iuU7tGx0pCPd72JtKZAZIBeppfZxTDpDehz+H6GzJJTW Y85Uks4X0nPqzul2ApH8YSj5HNGIspbyw+Wv22IJa+vxfLqfD7fDWpAm+DCPyNCYpQyc So/2yZ2nJy33Re5r7fsyxw4UtpRsJoVUbjD0Y+tusLitOiTab9u8Ybeb2M2xXrA4jGFz V984IqXt96cGerrQXH9zZAQR6z6kRR5ZKY+izbxXQrwqs50S4HFlAAQEf+c8chgoDogF VPZJYS/qjoswJbyglWQ1CXGvOaZ33lExEiR18w08jXULvOoo4h1JBR6P0mv5ifioE9uA PeEQ== 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=hgJjHQJARSp/GL3Y8LNFsmMFHU69BxEPZSc6Fo5vky3bpdVIJhrjYT9nQR6AD0OkjA Dl47YvumEfWtAtLVGqiITq1IzNQ2M60P0LET1w7xEzRkxKs4hLGbOZUOAD4MI7KEcByc n2niOTAPrAn1RA6FOINoT0Yf2+82/YLwHWtos/7grTejbjK3e4g5DtcreDASOXwiI8ew g1xyPPNiEvDlX5Px2C+qZIyPjrKotDr3glN2QSjbXuachNfyGzaG+7e/Fq4NIUzBxILD kd2ZFJI20vo7hhhAe5evoODwwcWaF3c+j5YCsblWrA7KJa1dSc7sZwe/9U+IGal136aT T/sw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=diRyLMo9; 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 e25si22667159pgv.106.2021.10.18.06.44.11; Mon, 18 Oct 2021 06:44:24 -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=diRyLMo9; 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 S233317AbhJRNon (ORCPT + 99 others); Mon, 18 Oct 2021 09:44:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:35670 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233260AbhJRNmt (ORCPT ); Mon, 18 Oct 2021 09:42:49 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 201936058D; Mon, 18 Oct 2021 13:34:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1634564064; bh=arOuavtSGezhyOzRSIbU4OJWoNzqOS8N+i+b0aA6J/8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=diRyLMo9AZ6CKaUusM1WTPVKVRov7Q6AY5qeQTxcogL6XOvz++UE79NZ8cU8ioG53 SdEdkW8pOskxSiQx41oswql+sb8/NA3aaFuXPtNKd0OGD+PNu1j9u99VHka5a7aAiU 81rLzO7nQufCWMqBESrDl9KaWwykHqwDn7NN3LP8= 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.10 052/103] iio: adc: ad7780: Fix IRQ flag Date: Mon, 18 Oct 2021 15:24:28 +0200 Message-Id: <20211018132336.510253893@linuxfoundation.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211018132334.702559133@linuxfoundation.org> References: <20211018132334.702559133@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) \