From patchwork Wed Jan 16 05:06:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "\(Exiting\) Baolin Wang" X-Patchwork-Id: 155687 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp230672jaa; Tue, 15 Jan 2019 21:07:41 -0800 (PST) X-Google-Smtp-Source: ALg8bN7GFiWxlh8+b7PBQpXf+d/8sKyHQ7AxRzwNYj1M5owOFHDor+bgzF3puTRyJj4BsBBBEjWA X-Received: by 2002:a63:9a52:: with SMTP id e18mr7140477pgo.14.1547615261094; Tue, 15 Jan 2019 21:07:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547615261; cv=none; d=google.com; s=arc-20160816; b=HZnWgJf+Q2RQ+NojZ4XvRFv60MyNzC7ODzDGcmzXtgfbFhbrxUykkpsfNadK8f8F8/ dtMaIxxlMOb6HCYd2qMZi45CLP/DWeii04pRaWguU75TQRCzTw3ko3rP2daG1tFAsQrG dUfJPdzfusUa7nISG/kYrptwVLsphDhordxS8qwwmw4yxhvW8Mj5SbmwMpH3jdIAiHft /ZJ93pORhL8nDqo0N768eHaSEK7Gr13nnNaIyEaD4YSFD7qVWyAKO+ePR3HTlbmLoP6C dnk8I/iW+9Hc/pcXvaTCoZbZSY1/WiGAIb8G7ecB77gb1KVc/qwaDybuktj0IMP2T68H Oxtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=9ynBcaxK3CJHYg4HRNeVDHHJ2xqNFOYZq7LdDnGeVDc=; b=n+wFJHRLzw+YSW4qROA3EeMf2lC2CVOhWNl+IaDcTdD9UpX+n2mCnNf6STITo1XTUq 0Ij1PLdRdthTm4Sv+xa707+YDFvcg/x3yGAgaczolDRm9LCrOAxMVuxyy/0JbQAB/PNP puVqUe2dGqvqR1FZ5FYZpiBHzmhlkYys81WxcqQDMgptv1gLQG8f6Sza0S5+778aJO7Y qHK//LSlxmzSaefi1x6X94aEQRtphkxofWQVTjFSL2NUl9UuNoYUyHpfkpAshyzy3C+x DtgMVKDsG1lZJtwr9yRh7it5t1/dih4hZdKPqOWo91xyrOwNjDFkPM5h96MYe1S3dRGS g91g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=S2E8A9Ur; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g9si2717202pfd.86.2019.01.15.21.07.40; Tue, 15 Jan 2019 21:07:41 -0800 (PST) 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=@linaro.org header.s=google header.b=S2E8A9Ur; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726095AbfAPFG5 (ORCPT + 31 others); Wed, 16 Jan 2019 00:06:57 -0500 Received: from mail-pf1-f194.google.com ([209.85.210.194]:38916 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725906AbfAPFG4 (ORCPT ); Wed, 16 Jan 2019 00:06:56 -0500 Received: by mail-pf1-f194.google.com with SMTP id r136so2441774pfc.6 for ; Tue, 15 Jan 2019 21:06:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=9ynBcaxK3CJHYg4HRNeVDHHJ2xqNFOYZq7LdDnGeVDc=; b=S2E8A9Urg+gVERs/SW0nSzv56nv0l/wNjzEAYfluqoc8s9ZBEpy3rF+eoAGOK3eBJN mFaN8VX18vhHqBQIRFKMCt5d9DBFhRyDkMs+M7C4CMPcELkckG6fm+TvgcFYCY2/sM7+ ghQbKed+NYnG0/KBPBdcHFpVyztW4lNoq+3gI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=9ynBcaxK3CJHYg4HRNeVDHHJ2xqNFOYZq7LdDnGeVDc=; b=QVG23ca2QejVoQndrUwDQ0u/6/ccgR9UoYoKtuBJF2DdbThqjYaXkuMfQVcKZqXL5Y 20RbMKdoAfsMkM4rfsmj+q4BsrhoqxE2ajDQnQNsoofCwKQvSjIXB2zh4pqg3hxkABHK wQbU7X9cTPBfufTyaB+oA8NQmUuBhZBYIevS/zSOguFtD4GfZQkFGCJKIfnT1OGumZTa 4qoxCZW+dyhvRPuQ/MX8R5/9W4BkXN+gTfWWO2JjA6KT8AlrK66FvrwgVq81lV7+Ikiy /aZypGs6PH+EyM4vYH6b0tyEt1pQLKIeBL3a7aqVyNgLYegACz5Wbte6dqd29xw70fUQ dfXw== X-Gm-Message-State: AJcUukdMNR71Y+gdUNW2GRHpIolEI3OZGuwesxnNX9/dAwcTw7jZJ6wP 628pJHiQxMSasGERidS6P8L6iQ== X-Received: by 2002:a63:5455:: with SMTP id e21mr7190501pgm.316.1547615216267; Tue, 15 Jan 2019 21:06:56 -0800 (PST) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.102]) by smtp.gmail.com with ESMTPSA id m20sm4784888pgv.93.2019.01.15.21.06.52 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 15 Jan 2019 21:06:55 -0800 (PST) From: Baolin Wang To: linus.walleij@linaro.org, bgolaszewski@baylibre.com Cc: orsonzhai@gmail.com, zhang.lyra@gmail.com, baolin.wang@linaro.org, neo.hou@unisoc.com, broonie@kernel.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/2] gpio: sprd: Fix incorrect irq type setting for the async EIC Date: Wed, 16 Jan 2019 13:06:14 +0800 Message-Id: <46524f86b327de62753be9046ef217a66d674b33.1547615070.git.baolin.wang@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <24594f8799f6aabdeaad3935fe36d832fb465148.1547615070.git.baolin.wang@linaro.org> References: <24594f8799f6aabdeaad3935fe36d832fb465148.1547615070.git.baolin.wang@linaro.org> In-Reply-To: <24594f8799f6aabdeaad3935fe36d832fb465148.1547615070.git.baolin.wang@linaro.org> References: <24594f8799f6aabdeaad3935fe36d832fb465148.1547615070.git.baolin.wang@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Neo Hou When setting async EIC as IRQ_TYPE_EDGE_BOTH type, we missed to set the SPRD_EIC_ASYNC_INTMODE register to 0, which means detecting edge signals. Thus this patch fixes the issue. Fixes: 25518e024e3a ("gpio: Add Spreadtrum EIC driver support") Cc: Signed-off-by: Neo Hou Signed-off-by: Baolin Wang --- Changes from v1: - Add fix tag and CC stable. --- drivers/gpio/gpio-eic-sprd.c | 1 + 1 file changed, 1 insertion(+) -- 1.7.9.5 diff --git a/drivers/gpio/gpio-eic-sprd.c b/drivers/gpio/gpio-eic-sprd.c index 257df59..e41223c 100644 --- a/drivers/gpio/gpio-eic-sprd.c +++ b/drivers/gpio/gpio-eic-sprd.c @@ -379,6 +379,7 @@ static int sprd_eic_irq_set_type(struct irq_data *data, unsigned int flow_type) irq_set_handler_locked(data, handle_edge_irq); break; case IRQ_TYPE_EDGE_BOTH: + sprd_eic_update(chip, offset, SPRD_EIC_ASYNC_INTMODE, 0); sprd_eic_update(chip, offset, SPRD_EIC_ASYNC_INTBOTH, 1); irq_set_handler_locked(data, handle_edge_irq); break;