Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp1424761imm; Thu, 5 Jul 2018 23:11:30 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdZYgSuaWOZkNGjksN5D2NAR9V3TQGZD0gVM7ObCKZ3MXTQfmJRRSKwx+wbELNlwuUQPLdU X-Received: by 2002:a63:6949:: with SMTP id e70-v6mr8481424pgc.119.1530857489934; Thu, 05 Jul 2018 23:11:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530857489; cv=none; d=google.com; s=arc-20160816; b=Ucwq7x+kXbAaTpIdZJNuv/Gb5WQUAGCFBINPN0jcr10j8+KULCyJ9Ni6TZrC2Qhgpb P5bUYm+i4k4uoWhH7EVfHpkcq5XzeLC0wTb5l7YbA1JwCzO72gHDsPRK0tk3Rf2fgiKN 9GZimhOl4CX2kHBpxk69U76zNdIHw3+V3cVVcLUFl3TC0mSO0OhrjFWq5u+v4yGSlfbR uoW+Y1crWuicL8Jvh8L0+p9VaQ/4T1odX99RfJr1zM5Zx/pxEuIIkyt4ZKJm5jeHVZMt 6OrEsY0QPAhjGszJqAHoDSKmBEHpfIPH0iOatRSQ/ziuuudZ3f/wnWsY/KsMAHFdZ93H GDVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=7Maw/6CcICA7zm/OPc21u4P1XbJhfGp0yzmg1bvduiM=; b=EwLHn6ATmGnx4XMrZXNM8KIvKTEqRdJeyJ2ClCboQu75ORPpIiTyHBQwJDUInWfAmN GvVrKlNrR4mL1xZYx8NohQ7yC6fHU0lhQ3kW6DR8ySva81Ocq7r8JFxe/Bte7H280zvV 0DKqQuRU5ZXcl0/sIF3t9NCRWHbk7CSmNC9jq4+0fTie0DH1iEApviuoylFXpCEw327m 4UPBRSXG+BBJzcdhf0SJ711Rt76N3qPZWPcQL7fAWybw7bqPE/u/iBRReTCi2CgUMdtU aCjnaI7GYxpa+rja8Dn/AH5bbtEZOToAPHqST6bk9HguCdH9Hl6SyD9wZ+1HZzS6wrqP 0jUg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x5-v6si7037556pgc.210.2018.07.05.23.11.15; Thu, 05 Jul 2018 23:11:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933479AbeGFFtM (ORCPT + 99 others); Fri, 6 Jul 2018 01:49:12 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:60230 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933395AbeGFFtK (ORCPT ); Fri, 6 Jul 2018 01:49:10 -0400 Received: from localhost (D57D388D.static.ziggozakelijk.nl [213.125.56.141]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 53BD6BC1; Fri, 6 Jul 2018 05:49:09 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Leonard Crestez , Stable@vger.kernel.org, Jonathan Cameron Subject: [PATCH 4.17 13/46] iio: mma8452: Fix ignoring MMA8452_INT_DRDY Date: Fri, 6 Jul 2018 07:46:34 +0200 Message-Id: <20180706054525.239318637@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180706054524.595521988@linuxfoundation.org> References: <20180706054524.595521988@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.17-stable review patch. If anyone has any objections, please let me know. ------------------ From: Leonard Crestez commit b02ec67a8e38875cdc5f9214be885022f11c0017 upstream. Interrupts are ignored if no event bit is set in the status status register and this breaks the buffer interface. No data is shown when running "iio_generic_buffer -n mma8451 -a" and interrupt counts go crazy. Fix by not returning IRQ_NONE if DRDY is set. Fixes: 605f72de137a ("iio: accel: mma8452: improvements to handle multiple events") Signed-off-by: Leonard Crestez cc: Signed-off-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman --- drivers/iio/accel/mma8452.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/iio/accel/mma8452.c +++ b/drivers/iio/accel/mma8452.c @@ -1034,7 +1034,7 @@ static irqreturn_t mma8452_interrupt(int if (src < 0) return IRQ_NONE; - if (!(src & data->chip_info->enabled_events)) + if (!(src & (data->chip_info->enabled_events | MMA8452_INT_DRDY))) return IRQ_NONE; if (src & MMA8452_INT_DRDY) {