Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3032030pxb; Mon, 18 Oct 2021 06:59:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxLdPlRdl+9yakr6lgiypMGsvu/uMTVnPQZ1J2Dn6yB2vRmqcnWRPvvKt4kmwNjA89VpYfU X-Received: by 2002:a17:906:8a98:: with SMTP id mu24mr29348479ejc.438.1634565575923; Mon, 18 Oct 2021 06:59:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634565575; cv=none; d=google.com; s=arc-20160816; b=wDsprusN22LbqzYvmQFbsAfz0VSeXmicSxAwObJkjMzFv8KoVHiupkJn5xAcu4ux6A 3zOmQK0o2hdzjZ/3ozDq+oYnDG/yk7PVp3fqBWZeEZQhGyYsfVMj+j/KBrU6pOXTyGK+ 0C9vdjL+j2zwjzraInvUWi8vcyQ2M6wp2AuHNahVH1/RzUlLHiGMTRmvVNRBJjBm2Ik4 iAawiTbO/8/WaOvJPOAWnysLFocLfTnNUOuA8yTUMQ/3EXs2LJGr57wzhLKbB5Vl4V4M Qg62kx9xe1bFGdDjbUOZLLt98TWdNDui9kHZrRHiFuZZ/21dC4O7jJpQUYPEGkbqEgkn N/Rg== 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=GDs3X3IncTp54NaUU50dkLBYsTsBCZQix6aoltFYrY8=; b=jp4roAsss8/mKyt6nKH+bwUEVmmQC6bYpGcbKLUtq3MAvWbcWQ1llX07P6sswL1FLz RaqU0WqiErV1T9C93UK44lD1dCo3A9GorMsHDfwb+0uiU3WyQWdJY9FyKtpiDFo7QIBG 7kiTHXgeNoEWYdY3TTEwipSfnbVp1ZHjKdPFk/+EHrCBc5IyKOQoSdUcl0imVtc8Snoq 4Vlzf9piMsdVIss0OYoPJgz5E0rtee0Zfo/izGs1pfZtKXc3u/E7NhXn+D8OMjwOpFuU bGzHCJsxWvXAMZw4gCNqoGc0S4srvOhwQFKC9CkVdFt+JaqNympJbUqIRa8KqtlVOa9B tcZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=W2vyx8MF; 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 s18si23164037ejx.160.2021.10.18.06.59.12; Mon, 18 Oct 2021 06:59:35 -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=W2vyx8MF; 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 S233576AbhJRN5a (ORCPT + 99 others); Mon, 18 Oct 2021 09:57:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:57710 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233099AbhJRNzU (ORCPT ); Mon, 18 Oct 2021 09:55:20 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D53A861357; Mon, 18 Oct 2021 13:40:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1634564401; bh=724jwHlAmbEEgNUE8PVb4/7KjMta1oNOQusosNNzaBI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=W2vyx8MFApehnKKIvxSFYaZ88l6SuxodwcDkqz2521r/XKPOC9S6O50C3fb6OzdxD MBbLBWsEvM8Fd0svsgKEn/Yql8vJK4D2kekTsxr86IERrFfRmha7LetucU8bLol3/f hxJdK7bgSwbnt8YdiDHivShTyvE8mtAqmVpYB0QU= 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 068/151] iio: adc: ad7192: Add IRQ flag Date: Mon, 18 Oct 2021 15:24:07 +0200 Message-Id: <20211018132342.901849295@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 89a86da5cb8e0ee153111fb68a719d31582c206b upstream. IRQ type in ad_sigma_delta_info struct was missing. 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 AD7192 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-2-alexandru.tachici@analog.com Signed-off-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman --- drivers/iio/adc/ad7192.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/iio/adc/ad7192.c +++ b/drivers/iio/adc/ad7192.c @@ -293,6 +293,7 @@ static const struct ad_sigma_delta_info .has_registers = true, .addr_shift = 3, .read_mask = BIT(6), + .irq_flags = IRQF_TRIGGER_FALLING, }; static const struct ad_sd_calib_data ad7192_calib_arr[8] = {