Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp7477863rdb; Wed, 3 Jan 2024 18:43:51 -0800 (PST) X-Google-Smtp-Source: AGHT+IH+JAPBLgcZWObMGnHQjxZT/StxAcpqi6tWaXHBEhH4oL9gceR0/F9R81dPVGlpK/ptEdlY X-Received: by 2002:a17:906:259b:b0:a26:9c9f:c2ed with SMTP id m27-20020a170906259b00b00a269c9fc2edmr8058976ejb.4.1704336231766; Wed, 03 Jan 2024 18:43:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704336231; cv=none; d=google.com; s=arc-20160816; b=pBcOGpQoevMNEX/LOsP2LhI7Lqf25isdlFL6QVtxl64CpRGWGV2k4GRpVxlri3Wi3W vGZ3BICbYA+QydzuGBLM5P1dOf2xj333eyfddD8q41wCrp3TgEZckUZykpJUrC4e7eyK qN99PTl9MrMpRn5pkCCZr56Duv60oA6LSbxO2NRu/JQEfyh3HANj9UYKLok82G4s+No9 VwJ6bus1g3dkz2VjbtfFrf8Z/Ef9f2NMk8cKAXuWkB568D3psyzHTWVY1fC7gwbseWMc DQOMgyDaTwDTnxYoHmFsUmikL2OGw5iMXdpCf4geq+m/IL1vQEIe98vzY0Dlpqx/YQi0 qLjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from; bh=AMCaBRbOFPtpUe7o/MNq13Gc196RbuaUdZEP/59T40k=; fh=C9TL9yCnGisUiZfdvbqmpU1FLQkakKnDf/rl0GO1YOw=; b=HDQg8hTFMojtNWyrS7TcCSiRDkGjMCQjHrKiCbgLTstHPTdFlpnAh9+ln+OvOvnvrg F9pgvby0SyIrwmbU04AFIDkwopiarPEngyXKeNZdQSPUfBFTCAzFpO8ogsoO4MXyLUpQ T6LgMLr/6RjDtq91q46GiU0cnGtkMYPDhrYUYZLq4XUcFl4e09mWN1hKVQhmiQVjqU/Z MyEsf2mcg77a0aYJstPNH0rvEDSDwJxPbu22hKXU8IJ70kmT3QEB43wIQc6MBIM0vBD5 VNQ1QlbTG2tLjysnqdk6ZLwHUUjhoGCjEHP5pWuoIGXdoNv4xunTKHFuDlXe4fT5wuqK fO0g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-16206-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-16206-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id fc17-20020a1709073a5100b00a26ed1ed306si8100958ejc.461.2024.01.03.18.43.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jan 2024 18:43:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-16206-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-16206-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-16206-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 712DD1F2606A for ; Thu, 4 Jan 2024 02:43:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 11F68522A; Thu, 4 Jan 2024 02:43:35 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from SHSQR01.spreadtrum.com (mx1.unisoc.com [222.66.158.135]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9A8522103 for ; Thu, 4 Jan 2024 02:43:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=unisoc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=unisoc.com Received: from dlp.unisoc.com ([10.29.3.86]) by SHSQR01.spreadtrum.com with ESMTP id 4042h8JW001784; Thu, 4 Jan 2024 10:43:08 +0800 (+08) (envelope-from Wenhua.Lin@unisoc.com) Received: from SHDLP.spreadtrum.com (shmbx06.spreadtrum.com [10.0.1.11]) by dlp.unisoc.com (SkyGuard) with ESMTPS id 4T59h7758Yz2Qby50; Thu, 4 Jan 2024 10:36:23 +0800 (CST) Received: from xm9614pcu.spreadtrum.com (10.13.2.29) by shmbx06.spreadtrum.com (10.0.1.11) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Thu, 4 Jan 2024 10:43:06 +0800 From: Wenhua Lin To: Linus Walleij , Andy Shevchenko , Bartosz Golaszewski CC: Orson Zhai , Baolin Wang , Chunyan Zhang , , , wenhua lin , Wenhua Lin , Xiongpeng Wu Subject: [PATCH V3 1/4] gpio: eic-sprd: Keep the clock rtc_1k on Date: Thu, 4 Jan 2024 10:42:41 +0800 Message-ID: <20240104024244.12163-2-Wenhua.Lin@unisoc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240104024244.12163-1-Wenhua.Lin@unisoc.com> References: <20240104024244.12163-1-Wenhua.Lin@unisoc.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain X-ClientProxiedBy: SHCAS03.spreadtrum.com (10.0.1.207) To shmbx06.spreadtrum.com (10.0.1.11) X-MAIL:SHSQR01.spreadtrum.com 4042h8JW001784 The eic debounce does not have a clock of rtc_1k in the sleep state, but the eic debounce will be used to wake up the system, therefore the clock of rtc_1k needs to be kept open. 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 be7f2fa5aa7b..bdcb3510a208 100644 --- a/drivers/gpio/gpio-eic-sprd.c +++ b/drivers/gpio/gpio-eic-sprd.c @@ -24,6 +24,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 @@ -223,6 +224,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; -- 2.17.1