From patchwork Wed Apr 10 07:47:54 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: 162000 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp5894076jan; Wed, 10 Apr 2019 00:48:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqx2Dj7TY/PtMcgg92AhwcIVcZUxGPnkL03AgVmbyginEdb2HLQho+l/v5u2birqAtdtfDo9 X-Received: by 2002:a65:5003:: with SMTP id f3mr39813293pgo.29.1554882491887; Wed, 10 Apr 2019 00:48:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554882491; cv=none; d=google.com; s=arc-20160816; b=D6kxyP0Cok4aTElIiqw08/4lc2tG33aAyQuluUglVunas4Q2EnCI9vDrZeebxLFToe j5YHlxJt+1q3v3nlg9zS2cIp1OscmnPvaW8lje9a48f37+pznG0tqnEJ/HjRoMPdsVPa dpXHLp9HageJDEC0wBbBAZ1FImunfBRuK0uSLFctg1hj/2NOqBOfzbn7qaxa9CF9okUL uUBGP/MzQTW23O0j8cv06MOGCMVcAO7MYKolKhWI/Nwo7iL49XMx2aezT96SYcatlzRa cOK4OuhUPLTyydMY8325SV9ci05qXR+AmLdAvYjM58csRbZmXXLZXWtUAlXIYxe+cLIL DDAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=skXQPHyDnnOMLPLPuYFyTD9T90iTaKhdEM7fSMIdTTs=; b=fpGmgH7VUpzM4QCx6aMTTjiWv3CKZWU/IjU59P3kDxbMT3LKuEn/4YDS6BIJaZJWYc e4VuKKtqVZ5utqY23QDF/dqzT3fIuSUYmfwTa3UeihQFy+gXL2NMuxXfIPud1Ehq2ZUz rI6DMk2yYdF5y72XfQ6wKuxBMeNsb7nP6GW6QeZlJbcxwnnkesUXcHEYwZDtgUZGFF3d rQgcS/6PqEQ2m8bb6oKJLP+Y85xDqUFrgiP7GV2sOcfyYk9YC6xk7R5ecoQ/c9Ho3exk CI54z+a0v9xKyEUjW7MkRpCezNw/6fM/XaY4Kp8koet67vZgoQ3tuZov95/EIV5ERtky aEsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TkhvHLwM; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-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 h1si22699248pfj.187.2019.04.10.00.48.11; Wed, 10 Apr 2019 00:48:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-gpio-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=TkhvHLwM; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-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 S1727024AbfDJHsK (ORCPT + 5 others); Wed, 10 Apr 2019 03:48:10 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:34232 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728548AbfDJHsK (ORCPT ); Wed, 10 Apr 2019 03:48:10 -0400 Received: by mail-pg1-f194.google.com with SMTP id v12so1056383pgq.1 for ; Wed, 10 Apr 2019 00:48:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=skXQPHyDnnOMLPLPuYFyTD9T90iTaKhdEM7fSMIdTTs=; b=TkhvHLwMDsXKGAq0AiPDmvH5yC1SdIcVn6Oazrqv8ASNM8ALILI1m7rMlztC6i4dDV 4M0++4jdbtMValVSWn83txV7CB5hj3olvE2GOkzebV9y4lvwgrcNO8Oc8ZTnIYg9ubf7 F8vzG2K7CJodAL0bqEPAVHOXsZQOrSqXH4qgJvBWXOP2uluSrjMLq5IsAMHa546tdE2B 6RKieD758yfk5Q/yUroKzvCdDf4EYiKXVdcN0HUDoQ4DJIYYyS7AbSvKuvGgdX1Ln559 RpSu1Z3vAFYWDZ4GHzM4/Ce5gzgtvfCftRqfLOkjvH7Zi9PIOaV9XPUsQTXVXmCRnNpP OL4g== 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; bh=skXQPHyDnnOMLPLPuYFyTD9T90iTaKhdEM7fSMIdTTs=; b=I3go0FBA26gr8K/XkiGJIAqRGw4WqG4/3wx7yVgzLCAIDMkY/hIfm3PTWXyn7lvTGY KFBdNGH2v2qgTLyheL6Npj+/uLGo2i+VeMmZgQOQrt1zhAQ12XSskbniaxzqWBLmwJ+W QEJi752LPHDxQEpc9DBwpL+9MRVztT9snWNjyKTPMlPt1WR6pYmO4Gjr/19gZPn5J9Aa b38q5vwryLUwnycYuG7b2c3DnBPykdfTsARCaegx/+cU5GQJQ4jJfR4p2jOUTj7921In BNNUoZaacAaFDShPxwuuv4bq5rCUJoROhxmrlxRYCEaRY5KpyzGIWr4EbSyhPLtEnb7h yUhw== X-Gm-Message-State: APjAAAWaiXsp3ZiUb3mxXFmQRAeKp8n+I/t8cSa5Tb8DhB2OUS79rOvd 4IqrfgeKhDOZY9wGdNvJmQQYRg== X-Received: by 2002:a62:69c2:: with SMTP id e185mr41478628pfc.119.1554882489460; Wed, 10 Apr 2019 00:48:09 -0700 (PDT) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.102]) by smtp.gmail.com with ESMTPSA id 17sm46355818pgz.52.2019.04.10.00.48.06 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 10 Apr 2019 00:48:08 -0700 (PDT) From: Baolin Wang To: linus.walleij@linaro.org, bgolaszewski@baylibre.com Cc: orsonzhai@gmail.com, zhang.lyra@gmail.com, baolin.wang@linaro.org, broonie@kernel.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] gpio: eic: sprd: Fix incorrect irq type setting for the sync EIC Date: Wed, 10 Apr 2019 15:47:54 +0800 Message-Id: X-Mailer: git-send-email 1.7.9.5 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org When setting sync EIC as IRQ_TYPE_EDGE_BOTH type, we missed to set the SPRD_EIC_SYNC_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: Baolin Wang --- 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 f0223ce..7709226 100644 --- a/drivers/gpio/gpio-eic-sprd.c +++ b/drivers/gpio/gpio-eic-sprd.c @@ -414,6 +414,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_SYNC_INTMODE, 0); sprd_eic_update(chip, offset, SPRD_EIC_SYNC_INTBOTH, 1); irq_set_handler_locked(data, handle_edge_irq); break;