Received: by 2002:a05:6a10:6d25:0:0:0:0 with SMTP id gq37csp474897pxb; Sat, 11 Sep 2021 10:44:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxr72w0gH1kOawN5d/+w7Nd1Be35APEMhVENZYNdkJ6kmgujmYOS0fwVqq4fj9Ykrk9ocan X-Received: by 2002:a05:6638:2493:: with SMTP id x19mr2896428jat.57.1631382264423; Sat, 11 Sep 2021 10:44:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631382264; cv=none; d=google.com; s=arc-20160816; b=xECcmZxvOQiCYhufpKu6DIufVRZOGmTNBgbhWM+qFZPSOGSvHL2RTfBMQTuurlHyYZ OXtDYOtoH919vUcUuhEeFpaH3U+Xt1f9L/X22RAMBAr2ZeaEf0AnYVPUfdmvF46e1ThS +Sabt2JA8HU89EPU6bPUEC2wZ3GLmKmo0d1pVNToGGluZ+St7GFR2vobY7Etu4LP938h veXlXPk+tWlI46x6VJmULa5S80gdBY1TkcDhwfiFokTTE0EHpFe9NQbesp4hbO2cTMUx 0vICKTVkAZwDf5iZPC69WSY+Q9Zo4FOSQazceQrOtaWi+nDEk3rnVqml9Kd6uaFWRMMF cRZg== 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 :references:in-reply-to:message-id:subject:cc:to:from:date; bh=Uh1Py1Yl+XObLKsTenW1qAkuvDekSFhdNiMkr+AlPdk=; b=ejKPIinwwVEE8mGRv/1ZewrorjA6q3twlx4NFCVQdPZ4+/R1Ity1TSB/sg5/xg/AQB cGhndJOJb15MEMravYBokEXUcMkdNmEdwyd/zTPYjbNZxJSJ7fNx8uMNk6/rZWKIMOEc 97kWKcmkY4kGTqJls4mZbilBa/z3ydlmg0bNEhiWTLkeaYRhmqE7pbiMAS0t/LXiIp4d nrRvfjtn7m8YMWNX9Ml3DMoCjFih3JluERyNCviBvy1vROXm2efrMO1yxQK0xFK8olRP LIFCoZ9mZ4NBKEYyPIPuN83yNSdaXeY9cdl0hcZP3DOePyzq2gRrTenet6QRxJv5Tswp UvDA== ARC-Authentication-Results: i=1; mx.google.com; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a21si120115jao.47.2021.09.11.10.44.12; Sat, 11 Sep 2021 10: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; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232708AbhIKRog (ORCPT + 99 others); Sat, 11 Sep 2021 13:44:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:59516 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229774AbhIKRog (ORCPT ); Sat, 11 Sep 2021 13:44:36 -0400 Received: from jic23-huawei (cpc108967-cmbg20-2-0-cust86.5-4.cable.virginm.net [81.101.6.87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DEB2960FBF; Sat, 11 Sep 2021 17:43:21 +0000 (UTC) Date: Sat, 11 Sep 2021 18:46:52 +0100 From: Jonathan Cameron To: Cc: , Subject: Re: [PATCH v2 3/3] iio: adc: ad7793: Fix IRQ flag Message-ID: <20210911184652.249bcbd8@jic23-huawei> In-Reply-To: <20210906065630.16325-4-alexandru.tachici@analog.com> References: <20210906065630.16325-1-alexandru.tachici@analog.com> <20210906065630.16325-4-alexandru.tachici@analog.com> X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 6 Sep 2021 09:56:30 +0300 wrote: > From: Alexandru Tachici > > 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 imediately 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 Applied to the fixes-togreg branch of iio.git and marked for stable. Thanks, Jonathan > --- > drivers/iio/adc/ad7793.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/iio/adc/ad7793.c b/drivers/iio/adc/ad7793.c > index ef3e2d3ecb0c..0e7ab3fb072a 100644 > --- a/drivers/iio/adc/ad7793.c > +++ b/drivers/iio/adc/ad7793.c > @@ -206,7 +206,7 @@ static const struct ad_sigma_delta_info ad7793_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] = {