From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754716AbcFTNvY (ORCPT ); Mon, 20 Jun 2016 09:51:24 -0400 Received: from mail-ob0-f169.google.com ([209.85.214.169]:32782 "EHLO mail-ob0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753277AbcFTNuY (ORCPT ); Mon, 20 Jun 2016 09:50:24 -0400 MIME-Version: 1.0 In-Reply-To: <6c5cc47895ca35fce84b6b01a3ecf7df928aa197.1463164919.git.leonard.crestez@intel.com> References: <3d90f889782a9c8380c3694e55a135ddd6de9bc4.1463164919.git.leonard.crestez@intel.com> <6c5cc47895ca35fce84b6b01a3ecf7df928aa197.1463164919.git.leonard.crestez@intel.com> From: Linus Walleij Date: Mon, 20 Jun 2016 15:26:47 +0200 Message-ID: Subject: Re: [PATCH 3/3] iio: st_sensors: Use level interrupts To: Crestez Dan Leonard Cc: Jonathan Cameron , "linux-iio@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Daniel Baluta , Giuseppe Barba , Denis Ciocca Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 13, 2016 at 8:43 PM, Crestez Dan Leonard wrote: > As far as I can tell DRDY for ST sensors behaves as a level rather than > edge interrupt. Registering for IRQF_TRIGGER_RISING instead of > IRQF_TRIGGER_HIGH mostly works except when the sampling frequency is > high enough that new samples come before the new ones are read > completely. In that case the interrupt line remains high, no more rising > edges occur and the iio buffer stalls. > > Configuring the interrupt as IRQF_TRIGGER_HIGH makes it work as > expected. This patch makes it so that st_sensors_trigger interrupt > request code doesn't mangle the request flags into IRQF_TRIGGER_RISING. > > Cc: Linus Walleij > Cc: Giuseppe Barba > Cc: Denis Ciocca > Signed-off-by: Crestez Dan Leonard > --- > This is an alternative fix to this patch: > https://www.spinics.net/lists/linux-iio/msg24722.html > [PATCH 2/2 v6] iio: st_sensors: read surplus samples in trigger. I have incorporated this approach into my patch now: please give it a spin! Yours, Linus Walleij