From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_2 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AF15CC3F68F for ; Sat, 18 Jan 2020 11:20:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7D7B82468B for ; Sat, 18 Jan 2020 11:20:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579346413; bh=eb/ffuQCnjGU8Wnjpp4BEJc6hOcGxDzaA3lFz2VXzuY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:List-ID:From; b=viCVjkqgAAjXJliiDyKHAYrvKokIx0fIyYvM7SwUbP/+kxM4gBnd1OSpyX9s6iIiG MdiB2lvm18oe9uPqwBX/V2psv1Bt42PLpkRerp8bue2re5sOXQMAaxmCm0BQJE/mjk QiaU2XyBvrPFZpxxcmNFFqQC6jT5mrnEMuq8h5XU= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728655AbgARLUM (ORCPT ); Sat, 18 Jan 2020 06:20:12 -0500 Received: from mail.kernel.org ([198.145.29.99]:40158 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726961AbgARLUM (ORCPT ); Sat, 18 Jan 2020 06:20:12 -0500 Received: from archlinux (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) (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 3DB482468B; Sat, 18 Jan 2020 11:20:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579346411; bh=eb/ffuQCnjGU8Wnjpp4BEJc6hOcGxDzaA3lFz2VXzuY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ro3xRUe6E3TqNVbU1xEWJG3JiNL1787H9YjtyPYRUv3whVCKfq5Zy5ZbdpNkRlWeg sFpv49Y2EZ/BwfgPbNv7jGLJiNC403AlPA3Sg03TCPDi/iN5+Im8Lo6zowUzL455Rq 8tLrMY+W3G87wHQ6HHYCmOj6mtRF16hZAPQKe/yw= Date: Sat, 18 Jan 2020 11:20:07 +0000 From: Jonathan Cameron To: Alexandru Tachici Cc: , Subject: Re: [PATCH 2/2 V3] iio: adc: ad7124: Set IRQ type to falling Message-ID: <20200118112007.43ab1f13@archlinux> In-Reply-To: <20200113102653.20900-3-alexandru.tachici@analog.com> References: <20200111112317.1cf2d878@archlinux> <20200113102653.20900-1-alexandru.tachici@analog.com> <20200113102653.20900-3-alexandru.tachici@analog.com> X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 13 Jan 2020 12:26:53 +0200 Alexandru Tachici wrote: > Ad7124 data-sheet specifies that the falling edge > of the DOUT line should be used for an interrupt. > The current irq flag (IRQF_TRIGGER_LOW) used will > cause unwanted behaviour. When enabling the interrupt > it will fire once because the DOUT line is already low. > This will make the driver to read an unfinished conversion > from the chip. > > This patch sets the irq type to the one specified in > the data-sheet. > > Signed-off-by: Alexandru Tachici Applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to play with it. Thanks, Jonathan > --- > drivers/iio/adc/ad7124.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/iio/adc/ad7124.c b/drivers/iio/adc/ad7124.c > index 9531d8a6cb27..9113f6d36ad4 100644 > --- a/drivers/iio/adc/ad7124.c > +++ b/drivers/iio/adc/ad7124.c > @@ -223,7 +223,7 @@ static const struct ad_sigma_delta_info ad7124_sigma_delta_info = { > .addr_shift = 0, > .read_mask = BIT(6), > .data_reg = AD7124_DATA, > - .irq_flags = IRQF_TRIGGER_LOW, > + .irq_flags = IRQF_TRIGGER_FALLING, > }; > > static int ad7124_set_channel_odr(struct ad7124_state *st,