Received: by 2002:a05:6a10:6d25:0:0:0:0 with SMTP id gq37csp474346pxb; Sat, 11 Sep 2021 10:43:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJynR8cHTbc8ECHQhg7JEZpaiawaufNuPwymqk+f+6Di37ryJhWhTVjd5sU9PgQMykX5AEhQ X-Received: by 2002:a02:2507:: with SMTP id g7mr2810576jag.139.1631382197337; Sat, 11 Sep 2021 10:43:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631382197; cv=none; d=google.com; s=arc-20160816; b=yHZSjqSNxUVn/L0tCRD6L1YLCtwqTmZoCLuFv9c9GtArLr/hurProIsrRzDtgKWSs8 RFcthh4NtDT+K34YeGNDYncmDgu61M9UpxG25jr0aflgURFoZzV2DL6/GS8lx0a/+INO nqzEFN+VC3pLUDzDffFIp4tp3j+JiYT452LEHluqveLBmKJi5P4BXztNQ8XDjsPt4hib bx6ISABIyK4o7UUDaK1iVnsq15dT6bFAdYEQQr6So2zfBeno3TDx4kJ+j0tDa0uUtFCq 0DtXAGWGc2+UyTw6m5sfps0GmtQrbz8tgRBbVJo0/vmIU7aNWLYFQD9XTd8k+YQEkA6J UDcQ== 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=fkZEMA6YqQZOZZjkTzEi979Xpt9mw/1gXdPeOy+C6Cw=; b=PiOT4WREt7j1JGkSz02UrlfHctRm5W+9JJoHMTXpcTTORCQaxWmyEfNJ3UjoY5SXoO SWEQSwWSMLo1wpPlEyxHpFyLmXDylvTnQpdqzIIFdu5d8CqB08er87vZPzUhS5ziebl9 AmVJt48wJIOG6zFkb0biFdJFdHY97FrcvlDs6qrRsPWzMQV2kUzzLNEO86PoYouk26px A1Oh0zIIvvZ4eOLQL/048V54fvkRtftxd9O1Ps1gwZLFNfKlYkwMEgQF8jwxB12NALzu 6loIoHh/CvPQoEtJIj4CCGoCdizopCUfLMNB/3GPqA2sQIOri6TeaXG5cHLMAy58wWTG zakQ== 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 x18si645703ilm.87.2021.09.11.10.43.05; Sat, 11 Sep 2021 10:43:17 -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 S232897AbhIKRn1 (ORCPT + 99 others); Sat, 11 Sep 2021 13:43:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:58244 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229774AbhIKRn0 (ORCPT ); Sat, 11 Sep 2021 13:43:26 -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 BF23E60FBF; Sat, 11 Sep 2021 17:42:12 +0000 (UTC) Date: Sat, 11 Sep 2021 18:45:44 +0100 From: Jonathan Cameron To: Cc: , Subject: Re: [PATCH v2 2/3] iio: adc: ad7780: Fix IRQ flag Message-ID: <20210911184544.6b19eb4a@jic23-huawei> In-Reply-To: <20210906065630.16325-3-alexandru.tachici@analog.com> References: <20210906065630.16325-1-alexandru.tachici@analog.com> <20210906065630.16325-3-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:29 +0300 wrote: > From: Alexandru Tachici > > 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 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 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 Applied and marked for stable. Thanks, Jonathan > --- > drivers/iio/adc/ad7780.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/iio/adc/ad7780.c b/drivers/iio/adc/ad7780.c > index 42bb952f4738..b6e8c8abf6f4 100644 > --- a/drivers/iio/adc/ad7780.c > +++ b/drivers/iio/adc/ad7780.c > @@ -203,7 +203,7 @@ static const struct ad_sigma_delta_info ad7780_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) \