Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp7478127rdb; Wed, 3 Jan 2024 18:44:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IFwqAX1kUb3E/YrtkCL/d6M1OvP0EXFn09RSEMPgAf+dcHu7FFAN13RpLANyTns9bpgTrD8 X-Received: by 2002:a17:903:40c3:b0:1d3:ff24:b3bb with SMTP id t3-20020a17090340c300b001d3ff24b3bbmr2561298pld.49.1704336286439; Wed, 03 Jan 2024 18:44:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704336286; cv=none; d=google.com; s=arc-20160816; b=xHCKENG/BSHw6CLNNHpaa9BzrH3yQYsGbPrFZydAzbSo67ILd9IgzkVHCntxIuLSPV gXrhLSH3eoooQeEttJ0UU7ZPqyQZSk7pwAhBW9vU3KQmEKOyQTfT+oH1R6VL111C05LD m0WaOys7llYZXQ9VRU9FGmk7DaFXNXEFwFY5YAa0wlFwMa50Ckz3IAc4AXKR7eUgbiJx b7pFb44SZS4lnUMQmuPgOWVplDWHHuBtKnBQseo+hNqB3YIIfCT8qZJMPx6M0FvQQp0P 62RmMepmRNXdrYGlRsQj+N08FwQtpLQ9d0uzQytWxb2G/lFOp9DQfWLH41GoKuUbbcco hetw== 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=VIaulxMj4rcsPFMyuLnH8PiaGebn619ad/qf/YnHeHI=; fh=C9TL9yCnGisUiZfdvbqmpU1FLQkakKnDf/rl0GO1YOw=; b=XsCEZDBkpJ3nbOn2BDwksAYVfEYERmgNZj72C6A+jcR5P3PXgdXPWvak+rV3fOmBCv PYSEYhHDSVgl7rAJ+2QdfW8hvCf9jmTb/NsOL6xKOmFNMf365oSezQ3JHt1LTNMKBLPh UTcZ+d+pKLR5dHqdUiPAmOy+faKy0PpLcqKIgyvhqy3K93oCtbRKQ9i03E1m7DmBySrV IM/XHAwT0XCy22zrpSwIisieAX8BdWtcu4oWpG1XUEjXqUf17/zQj+GrErSByUOwuTDk aFx7K7t7ar1qzZX20k0Re4hBKGimXbpzqIkYNa7ChcTPCjN7ulJnrFoXixCFSI09Odt5 c8aA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-16209-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-16209-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id bf8-20020a170902b90800b001d49e742d6fsi9155408plb.552.2024.01.03.18.44.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jan 2024 18:44:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-16209-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-16209-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-16209-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 1D0FD28843D for ; Thu, 4 Jan 2024 02:44:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7B3241D68D; Thu, 4 Jan 2024 02:43:43 +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 B0ECD1C6A4 for ; Thu, 4 Jan 2024 02:43:41 +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 4042hAVP001950; Thu, 4 Jan 2024 10:43:10 +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 4T59hB2vDtz2Qby5B; Thu, 4 Jan 2024 10:36:26 +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:08 +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 4/4] gpio: eic-sprd: Support 8 banks EIC controller Date: Thu, 4 Jan 2024 10:42:44 +0800 Message-ID: <20240104024244.12163-5-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 4042hAVP001950 In order to solve the problem of insufficient eic, it supports 8 banks of eic controller, each bank contains 8 eic. Signed-off-by: Wenhua Lin --- drivers/gpio/gpio-eic-sprd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpio/gpio-eic-sprd.c b/drivers/gpio/gpio-eic-sprd.c index 1ca3c444957c..715c7d581d7f 100644 --- a/drivers/gpio/gpio-eic-sprd.c +++ b/drivers/gpio/gpio-eic-sprd.c @@ -52,10 +52,10 @@ #define SPRD_EIC_SYNC_DATA 0x1c /* - * The digital-chip EIC controller can support maximum 3 banks, and each bank + * The digital-chip EIC controller can support maximum 8 banks, and each bank * contains 8 EICs. */ -#define SPRD_EIC_MAX_BANK 3 +#define SPRD_EIC_MAX_BANK 8 #define SPRD_EIC_PER_BANK_NR 8 #define SPRD_EIC_DATA_MASK GENMASK(7, 0) #define SPRD_EIC_BIT(x) ((x) & (SPRD_EIC_PER_BANK_NR - 1)) @@ -627,9 +627,9 @@ static int sprd_eic_probe(struct platform_device *pdev) for (i = 0; i < SPRD_EIC_MAX_BANK; i++) { /* - * We can have maximum 3 banks EICs, and each EIC has + * We can have maximum 8 banks EICs, and each EIC has * its own base address. But some platform maybe only - * have one bank EIC, thus base[1] and base[2] can be + * have one bank EIC, thus base[1] to base[7] can be * optional. */ res = platform_get_resource(pdev, IORESOURCE_MEM, i); -- 2.17.1