From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EA48DE810B1 for ; Wed, 27 Sep 2023 09:08:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230177AbjI0JI6 (ORCPT ); Wed, 27 Sep 2023 05:08:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229531AbjI0JIz (ORCPT ); Wed, 27 Sep 2023 05:08:55 -0400 Received: from out30-118.freemail.mail.aliyun.com (out30-118.freemail.mail.aliyun.com [115.124.30.118]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E153297; Wed, 27 Sep 2023 02:08:53 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R111e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046059;MF=baolin.wang@linux.alibaba.com;NM=1;PH=DS;RN=10;SR=0;TI=SMTPD_---0VszrmVr_1695805730; Received: from 30.97.48.70(mailfrom:baolin.wang@linux.alibaba.com fp:SMTPD_---0VszrmVr_1695805730) by smtp.aliyun-inc.com; Wed, 27 Sep 2023 17:08:51 +0800 Message-ID: Date: Wed, 27 Sep 2023 17:08:57 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [PATCH V2 1/4] gpio: sprd: In the sleep state, the eic debounce clk must be forced open To: Wenhua Lin , Linus Walleij , Andy Shevchenko , Bartosz Golaszewski Cc: Orson Zhai , Chunyan Zhang , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, wenhua lin , Xiongpeng Wu References: <20230921090027.11136-1-Wenhua.Lin@unisoc.com> <20230921090027.11136-2-Wenhua.Lin@unisoc.com> From: Baolin Wang In-Reply-To: <20230921090027.11136-2-Wenhua.Lin@unisoc.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/21/2023 5:00 PM, Wenhua Lin wrote: > In the sleep state, Eic debounce has no clock and the clk of > debounce needs to be forced open, so that eic can wake up normally. > > Fixes: 2788938b7946 ("gpio: eic-sprd: Make the irqchip immutable") Are you sure this is the right Fixes tag? This commit did not change EIC debounce logics. The changes look good to me. > Signed-off-by: Wenhua Lin > --- > drivers/gpio/gpio-eic-sprd.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/gpio/gpio-eic-sprd.c b/drivers/gpio/gpio-eic-sprd.c > index 84352a6f4973..bfa8a4c7515a 100644 > --- a/drivers/gpio/gpio-eic-sprd.c > +++ b/drivers/gpio/gpio-eic-sprd.c > @@ -23,6 +23,7 @@ > #define SPRD_EIC_DBNC_IC 0x24 > #define SPRD_EIC_DBNC_TRIG 0x28 > #define SPRD_EIC_DBNC_CTRL0 0x40 > +#define SPRD_EIC_DBNC_FORCE_CLK 0x8000 > > #define SPRD_EIC_LATCH_INTEN 0x0 > #define SPRD_EIC_LATCH_INTRAW 0x4 > @@ -214,6 +215,7 @@ static int sprd_eic_set_debounce(struct gpio_chip *chip, unsigned int offset, > u32 value = readl_relaxed(base + reg) & ~SPRD_EIC_DBNC_MASK; > > value |= (debounce / 1000) & SPRD_EIC_DBNC_MASK; > + value |= SPRD_EIC_DBNC_FORCE_CLK; > writel_relaxed(value, base + reg); > > return 0;