From patchwork Fri Apr 1 13:51:51 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yingjoe Chen X-Patchwork-Id: 64861 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp748845lbc; Fri, 1 Apr 2016 06:52:14 -0700 (PDT) X-Received: by 10.98.42.207 with SMTP id q198mr31284281pfq.103.1459518734401; Fri, 01 Apr 2016 06:52:14 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u25si21519762pfa.228.2016.04.01.06.52.14; Fri, 01 Apr 2016 06:52:14 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754317AbcDANwN (ORCPT + 4 others); Fri, 1 Apr 2016 09:52:13 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:40365 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1752362AbcDANwN (ORCPT ); Fri, 1 Apr 2016 09:52:13 -0400 Received: from mtkhts09.mediatek.inc [(172.21.101.70)] by mailgw01.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 121306126; Fri, 01 Apr 2016 21:52:08 +0800 Received: from mtksdtcf02.mediatek.inc (10.21.12.142) by mtkhts09.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 14.3.266.1; Fri, 1 Apr 2016 21:52:06 +0800 From: Yingjoe Chen To: Linus Walleij CC: Matthias Brugger , Hongzhou Yang , , , , , , Yingjoe Chen Subject: [PATCH] pinctrl: mediatek: correct debounce time unit in mtk_gpio_set_debounce Date: Fri, 1 Apr 2016 21:51:51 +0800 Message-ID: <1459518711-61619-1-git-send-email-yingjoe.chen@mediatek.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-MTK: N Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org The debounce time unit for gpio_chip.set_debounce is us but mtk_gpio_set_debounce regard it as ms. Fix this by correct debounce time array dbnc_arr so it can find correct debounce setting. Signed-off-by: Yingjoe Chen --- drivers/pinctrl/mediatek/pinctrl-mtk-common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c index 2bbe6f7..be72325 100644 --- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c +++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c @@ -1004,7 +1004,8 @@ static int mtk_gpio_set_debounce(struct gpio_chip *chip, unsigned offset, struct mtk_pinctrl *pctl = dev_get_drvdata(chip->parent); int eint_num, virq, eint_offset; unsigned int set_offset, bit, clr_bit, clr_offset, rst, i, unmask, dbnc; - static const unsigned int dbnc_arr[] = {0 , 1, 16, 32, 64, 128, 256}; + static const unsigned int dbnc_arr[] = {500, 1000, 16000, 32000, 64000, + 128000, 256000}; const struct mtk_desc_pin *pin; struct irq_data *d;