Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3020285pxb; Mon, 18 Oct 2021 06:44:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxnuMgpYIgzgmoUYXcU1R8FM762OlC/dOLIADugkLoZbNCA7M99CgqBzPS1lN6v0I9QVQ/v X-Received: by 2002:a63:b007:: with SMTP id h7mr23451437pgf.443.1634564694307; Mon, 18 Oct 2021 06:44:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634564694; cv=none; d=google.com; s=arc-20160816; b=zg15/GKfX/Qa52dm4JnCxdIJu2vwIF1BpFu6kSGMCCLbXiNvaGBIt9BIorb6Z70ilG Hjkrhdf73h3wlP/Vsb88jXiDeKfXpgpyvEmqjE2IZMQxawBr43QhCGRLtW8clLgtMjwI HuyhhUXlPrEMWVj+EN7pQLM36NtAJfoCXc2RibnUA2JYlVyTNL+a+GhjfWAXXNzH6ph1 rQTHRhv7NfKOZbNCouCI3ojVxc5anSzKQV5rpzCEP2ZAc7fvLqTeHsr25+rPARuKLLgX +QW27Nw4IU26DWShhldOjsiCAIiVkWpiNUCmkEpXct0fK9TZDbGUeSu/Bx2Vy3JZapG/ LuNw== 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=kbyIbTFzdncEUJlNAwVCAQt+MM0og5Cg/77Qdpozhx8=; b=yl8vJb860+YtCdakncdJy1B99a0f5Pt5PHRDCQSC6fzAIInTYf12QJKS+a5I+mlrfu 509S9WxDLBbl1hT5tPvao3IJlNTX7lIYmqMaGbHarpKjRW5h2gtIHykHM8BiI9R145KT pWSRIduJ2mpPrNrPgvzAQMAGObJHfE5X4WHetE7fxJHk1ZuVUiRVmehBQZvbtpiusHoY uzLpwgF70R/uSzIjr+fHfsCh+hb94OPWGMtq6pvjBSKxAmnXXoZthm0MCJ5rs9/t0vRl x798LrzJCLNpu4eTEkNLvxMjIoWVkSOwqAfRs4+71K671JNRfsUdikV1PQKwFzF0EPj6 FksA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=fZkzY5vQ; 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 b5si11099093pls.256.2021.10.18.06.44.41; Mon, 18 Oct 2021 06:44:54 -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=fZkzY5vQ; 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 S233221AbhJRNo4 (ORCPT + 99 others); Mon, 18 Oct 2021 09:44:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:40778 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231896AbhJRNmz (ORCPT ); Mon, 18 Oct 2021 09:42:55 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id CCA0E61283; Mon, 18 Oct 2021 13:34:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1634564067; bh=J5hh4JfP+qOe5Gp7tcBGciG7iJE8Fdu59ov/wmhnTaY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fZkzY5vQRYOjbVA2TlXWqgC+p5d31AuChPjXRLqkLqEcHbPS+YQ72Zvwqa5HqVyXH UZbTRjdusOWddZRk93e6vUAgHqSrsQ8/wTzvWiQj7dy2pS2UqJ05LoM8Dqlw5nUSBg MS2/i+mDdRvKCeKttgFW8sV2nhkfG2bB5/O82jRw= 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 053/103] iio: adc: ad7793: Fix IRQ flag Date: Mon, 18 Oct 2021 15:24:29 +0200 Message-Id: <20211018132336.540589965@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 1a913270e57a8e7f1e3789802f1f64e6d0654626 upstream. 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 AD7793 datasheet: " The DOUT/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-4-alexandru.tachici@analog.com Signed-off-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman --- drivers/iio/adc/ad7793.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/iio/adc/ad7793.c +++ b/drivers/iio/adc/ad7793.c @@ -206,7 +206,7 @@ static const struct ad_sigma_delta_info .has_registers = true, .addr_shift = 3, .read_mask = BIT(6), - .irq_flags = IRQF_TRIGGER_LOW, + .irq_flags = IRQF_TRIGGER_FALLING, }; static const struct ad_sd_calib_data ad7793_calib_arr[6] = {