Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp1350992ybp; Thu, 17 Oct 2019 11:27:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqz+f3DysqJZ8DYmnXKqm6Jf5i3t+NPoRw464KHj+fqt4Fl6pxNF0/KF/DQeq5OhtDMYiCsu X-Received: by 2002:a17:906:85c5:: with SMTP id i5mr4816070ejy.222.1571336858607; Thu, 17 Oct 2019 11:27:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571336858; cv=none; d=google.com; s=arc-20160816; b=Sv8XU2E5yo7QPqaYza5GeC9/OBciDfqA3UtXZPEbHqzM3YeppW0p0wJtyKeyw39By4 JVrohkacpACvwyVf9tkYWVqiV/HW0K/JyGv1fm9FDkxgp+x03q9ztaBzDDsAp2cPFrM1 QnnaRTsUI43uKjKLXESlTWeQzrNT/D8Kq5ZLpqMO1XHh5hNDzK0ppvvWoXqq59jDDKmX WFHliuTEgViL41AjWZBS5G6/RDA/0nP3c/8Zi1bJlbWKFvGmn5D8SqiwF33SsgoA8kXH eATebQRe2nP0z41SrsMlf81BZb87/Ma9BwkB0lMypNaJ7B/ziCIBSnoMGqIwjjCjR/RY CFMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Q6KViGY0u7NWUXMeihmnbXsX0e+GxB/2bgP+XEtqCPY=; b=N1J8qQYn20eqEobfOtabyivH6d5nk+SfoqP1+hsrpRnZ0gDecg5eKf2L4ER5ejqzwb h0XomcQjWFXTd2wrw7LvQNVLgp2QpLAjhRUCPK8U13kNqcB42yB7xHtcpHaAX/mAztyf SQt6N9KrIaYlugUX/nF4k4KlrEIgvi2TVyw0OUDpYfn/PEnvtKMP3hivzEn6NW+Wt3oD PSWEzkd6iBh97P3ZAErcZkcCwZyezGsQMsZlyiZcEVmCLvmawdRyRURT/W2pcGw/hrZZ gBzodXSwdz+/3eqFYyUKqEVbZZbHawlWmNSde067W+zNt+EJtkeKY8XG8GHsB+iZZAMz juMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=TEvyWr0e; 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 27si2119279edz.186.2019.10.17.11.27.15; Thu, 17 Oct 2019 11:27:38 -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; dkim=pass header.i=@kernel.org header.s=default header.b=TEvyWr0e; 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 S2392358AbfJPWFu (ORCPT + 99 others); Wed, 16 Oct 2019 18:05:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:52546 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2438239AbfJPV6n (ORCPT ); Wed, 16 Oct 2019 17:58:43 -0400 Received: from localhost (unknown [192.55.54.58]) (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 7D95521928; Wed, 16 Oct 2019 21:58:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1571263122; bh=HIAuGaaioLIQFgy5x+2q4gdqBHXPwkNmZcHznQAe/0s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TEvyWr0eUx7jxh9GpqzRnsDni/pYf4LE8kmtKTSK/IUxuJe6tl7q1IbHZ9jq/3gYk lLpomtRZAjg7io1/Qh2gZJ1X/2kGnweK2wXNM5kZzFGk8+wyatsLK0E3j+0gh1p53j E5MREIqOqQiyaMf2gXtkyFtyLcjn4rZ5It+AMU1g= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Bruce Chen , Baolin Wang , Bartosz Golaszewski Subject: [PATCH 5.3 046/112] gpio: eic: sprd: Fix the incorrect EIC offset when toggling Date: Wed, 16 Oct 2019 14:50:38 -0700 Message-Id: <20191016214855.052818171@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191016214844.038848564@linuxfoundation.org> References: <20191016214844.038848564@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Bruce Chen commit e91aafcb51f3c5001ae76c3ee027beb0b8506447 upstream. When toggling the level trigger to emulate the edge trigger, the EIC offset is incorrect without adding the corresponding bank index, thus fix it. Fixes: 7bf0d7f62282 ("gpio: eic: Add edge trigger emulation for EIC") Cc: stable@vger.kernel.org Signed-off-by: Bruce Chen Signed-off-by: Baolin Wang Signed-off-by: Bartosz Golaszewski Signed-off-by: Greg Kroah-Hartman --- drivers/gpio/gpio-eic-sprd.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) --- a/drivers/gpio/gpio-eic-sprd.c +++ b/drivers/gpio/gpio-eic-sprd.c @@ -530,11 +530,12 @@ static void sprd_eic_handle_one_type(str } for_each_set_bit(n, ®, SPRD_EIC_PER_BANK_NR) { - girq = irq_find_mapping(chip->irq.domain, - bank * SPRD_EIC_PER_BANK_NR + n); + u32 offset = bank * SPRD_EIC_PER_BANK_NR + n; + + girq = irq_find_mapping(chip->irq.domain, offset); generic_handle_irq(girq); - sprd_eic_toggle_trigger(chip, girq, n); + sprd_eic_toggle_trigger(chip, girq, offset); } } }