From nobody Fri Feb 13 19:29:09 2026 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 85E6FE7D0A4 for ; Thu, 21 Sep 2023 17:52:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230200AbjIURwD (ORCPT ); Thu, 21 Sep 2023 13:52:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230178AbjIURvb (ORCPT ); Thu, 21 Sep 2023 13:51:31 -0400 Received: from SHSQR01.spreadtrum.com (mx1.unisoc.com [222.66.158.135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 11A1F585C7 for ; Thu, 21 Sep 2023 10:19:15 -0700 (PDT) Received: from SHSQR01.spreadtrum.com (localhost [127.0.0.2] (may be forged)) by SHSQR01.spreadtrum.com with ESMTP id 38L92ICv067362 for ; Thu, 21 Sep 2023 17:02:18 +0800 (+08) (envelope-from Wenhua.Lin@unisoc.com) Received: from dlp.unisoc.com ([10.29.3.86]) by SHSQR01.spreadtrum.com with ESMTP id 38L90iOc061737; Thu, 21 Sep 2023 17:00:44 +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 4Rrq6D4FsMz2SZykd; Thu, 21 Sep 2023 16:57:24 +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, 21 Sep 2023 17:00:43 +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 V2 1/4] gpio: sprd: In the sleep state, the eic debounce clk must be forced open Date: Thu, 21 Sep 2023 17:00:24 +0800 Message-ID: <20230921090027.11136-2-Wenhua.Lin@unisoc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230921090027.11136-1-Wenhua.Lin@unisoc.com> References: <20230921090027.11136-1-Wenhua.Lin@unisoc.com> MIME-Version: 1.0 X-Originating-IP: [10.13.2.29] X-ClientProxiedBy: SHCAS01.spreadtrum.com (10.0.1.201) To shmbx06.spreadtrum.com (10.0.1.11) X-MAIL: SHSQR01.spreadtrum.com 38L90iOc061737 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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") 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 =20 #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 =3D readl_relaxed(base + reg) & ~SPRD_EIC_DBNC_MASK; =20 value |=3D (debounce / 1000) & SPRD_EIC_DBNC_MASK; + value |=3D SPRD_EIC_DBNC_FORCE_CLK; writel_relaxed(value, base + reg); =20 return 0; --=20 2.17.1 From nobody Fri Feb 13 19:29:09 2026 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 C00FFE7D0A6 for ; Thu, 21 Sep 2023 20:03:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231668AbjIUUDX (ORCPT ); Thu, 21 Sep 2023 16:03:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45980 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231539AbjIUUCg (ORCPT ); Thu, 21 Sep 2023 16:02:36 -0400 Received: from SHSQR01.spreadtrum.com (unknown [222.66.158.135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B153585D1 for ; Thu, 21 Sep 2023 10:19:20 -0700 (PDT) Received: from SHSQR01.spreadtrum.com (localhost [127.0.0.2] (may be forged)) by SHSQR01.spreadtrum.com with ESMTP id 38L92IIZ067385 for ; Thu, 21 Sep 2023 17:02:18 +0800 (+08) (envelope-from Wenhua.Lin@unisoc.com) Received: from dlp.unisoc.com ([10.29.3.86]) by SHSQR01.spreadtrum.com with ESMTP id 38L90jGx061777; Thu, 21 Sep 2023 17:00:45 +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 4Rrq6F44Nxz2Sb3tf; Thu, 21 Sep 2023 16:57:25 +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, 21 Sep 2023 17:00:44 +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 V2 2/4] gpio: sprd: Clear interrupt after set the interrupt type Date: Thu, 21 Sep 2023 17:00:25 +0800 Message-ID: <20230921090027.11136-3-Wenhua.Lin@unisoc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230921090027.11136-1-Wenhua.Lin@unisoc.com> References: <20230921090027.11136-1-Wenhua.Lin@unisoc.com> MIME-Version: 1.0 X-Originating-IP: [10.13.2.29] X-ClientProxiedBy: SHCAS01.spreadtrum.com (10.0.1.201) To shmbx06.spreadtrum.com (10.0.1.11) X-MAIL: SHSQR01.spreadtrum.com 38L90jGx061777 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The initialization state of the EIC module is a high level trigger. If it is currently a high level, the interrupt condition is met at this time, and the EIC interrupt has a latch capability, which will cause an interrupt to occur after booting. To avoid this, When setting the EIC interrupt trigger type, clear the interrupt once. Signed-off-by: Wenhua Lin Reviewed-by: Baolin Wang --- drivers/gpio/gpio-eic-sprd.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/gpio/gpio-eic-sprd.c b/drivers/gpio/gpio-eic-sprd.c index bfa8a4c7515a..96f1c7fd3988 100644 --- a/drivers/gpio/gpio-eic-sprd.c +++ b/drivers/gpio/gpio-eic-sprd.c @@ -375,29 +375,34 @@ static int sprd_eic_irq_set_type(struct irq_data *dat= a, unsigned int flow_type) sprd_eic_update(chip, offset, SPRD_EIC_ASYNC_INTBOTH, 0); sprd_eic_update(chip, offset, SPRD_EIC_ASYNC_INTMODE, 0); sprd_eic_update(chip, offset, SPRD_EIC_ASYNC_INTPOL, 1); + sprd_eic_update(chip, offset, SPRD_EIC_ASYNC_INTCLR, 1); irq_set_handler_locked(data, handle_edge_irq); break; case IRQ_TYPE_EDGE_FALLING: sprd_eic_update(chip, offset, SPRD_EIC_ASYNC_INTBOTH, 0); sprd_eic_update(chip, offset, SPRD_EIC_ASYNC_INTMODE, 0); sprd_eic_update(chip, offset, SPRD_EIC_ASYNC_INTPOL, 0); + sprd_eic_update(chip, offset, SPRD_EIC_ASYNC_INTCLR, 1); irq_set_handler_locked(data, handle_edge_irq); break; case IRQ_TYPE_EDGE_BOTH: sprd_eic_update(chip, offset, SPRD_EIC_ASYNC_INTMODE, 0); sprd_eic_update(chip, offset, SPRD_EIC_ASYNC_INTBOTH, 1); + sprd_eic_update(chip, offset, SPRD_EIC_ASYNC_INTCLR, 1); irq_set_handler_locked(data, handle_edge_irq); break; case IRQ_TYPE_LEVEL_HIGH: sprd_eic_update(chip, offset, SPRD_EIC_ASYNC_INTBOTH, 0); sprd_eic_update(chip, offset, SPRD_EIC_ASYNC_INTMODE, 1); sprd_eic_update(chip, offset, SPRD_EIC_ASYNC_INTPOL, 1); + sprd_eic_update(chip, offset, SPRD_EIC_ASYNC_INTCLR, 1); irq_set_handler_locked(data, handle_level_irq); break; case IRQ_TYPE_LEVEL_LOW: sprd_eic_update(chip, offset, SPRD_EIC_ASYNC_INTBOTH, 0); sprd_eic_update(chip, offset, SPRD_EIC_ASYNC_INTMODE, 1); sprd_eic_update(chip, offset, SPRD_EIC_ASYNC_INTPOL, 0); + sprd_eic_update(chip, offset, SPRD_EIC_ASYNC_INTCLR, 1); irq_set_handler_locked(data, handle_level_irq); break; default: @@ -410,29 +415,34 @@ static int sprd_eic_irq_set_type(struct irq_data *dat= a, unsigned int flow_type) sprd_eic_update(chip, offset, SPRD_EIC_SYNC_INTBOTH, 0); sprd_eic_update(chip, offset, SPRD_EIC_SYNC_INTMODE, 0); sprd_eic_update(chip, offset, SPRD_EIC_SYNC_INTPOL, 1); + sprd_eic_update(chip, offset, SPRD_EIC_SYNC_INTCLR, 1); irq_set_handler_locked(data, handle_edge_irq); break; case IRQ_TYPE_EDGE_FALLING: sprd_eic_update(chip, offset, SPRD_EIC_SYNC_INTBOTH, 0); sprd_eic_update(chip, offset, SPRD_EIC_SYNC_INTMODE, 0); sprd_eic_update(chip, offset, SPRD_EIC_SYNC_INTPOL, 0); + sprd_eic_update(chip, offset, SPRD_EIC_SYNC_INTCLR, 1); 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); + sprd_eic_update(chip, offset, SPRD_EIC_SYNC_INTCLR, 1); irq_set_handler_locked(data, handle_edge_irq); break; case IRQ_TYPE_LEVEL_HIGH: sprd_eic_update(chip, offset, SPRD_EIC_SYNC_INTBOTH, 0); sprd_eic_update(chip, offset, SPRD_EIC_SYNC_INTMODE, 1); sprd_eic_update(chip, offset, SPRD_EIC_SYNC_INTPOL, 1); + sprd_eic_update(chip, offset, SPRD_EIC_SYNC_INTCLR, 1); irq_set_handler_locked(data, handle_level_irq); break; case IRQ_TYPE_LEVEL_LOW: sprd_eic_update(chip, offset, SPRD_EIC_SYNC_INTBOTH, 0); sprd_eic_update(chip, offset, SPRD_EIC_SYNC_INTMODE, 1); sprd_eic_update(chip, offset, SPRD_EIC_SYNC_INTPOL, 0); + sprd_eic_update(chip, offset, SPRD_EIC_SYNC_INTCLR, 1); irq_set_handler_locked(data, handle_level_irq); break; default: --=20 2.17.1 From nobody Fri Feb 13 19:29:09 2026 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 686C7E7D0A6 for ; Thu, 21 Sep 2023 17:50:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229542AbjIURuM (ORCPT ); Thu, 21 Sep 2023 13:50:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46982 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229886AbjIURt6 (ORCPT ); Thu, 21 Sep 2023 13:49:58 -0400 Received: from SHSQR01.spreadtrum.com (mx1.unisoc.com [222.66.158.135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 002BF585EF for ; Thu, 21 Sep 2023 10:19:27 -0700 (PDT) Received: from SHSQR01.spreadtrum.com (localhost [127.0.0.2] (may be forged)) by SHSQR01.spreadtrum.com with ESMTP id 38L92Pa5067742 for ; Thu, 21 Sep 2023 17:02:25 +0800 (+08) (envelope-from Wenhua.Lin@unisoc.com) Received: from dlp.unisoc.com ([10.29.3.86]) by SHSQR01.spreadtrum.com with ESMTP id 38L90k9T061807; Thu, 21 Sep 2023 17:00:46 +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 4Rrq6G2Ngqz2SZykd; Thu, 21 Sep 2023 16:57: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, 21 Sep 2023 17:00:45 +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 V2 3/4] gpio: sprd: Modify the calculation method of eic number Date: Thu, 21 Sep 2023 17:00:26 +0800 Message-ID: <20230921090027.11136-4-Wenhua.Lin@unisoc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230921090027.11136-1-Wenhua.Lin@unisoc.com> References: <20230921090027.11136-1-Wenhua.Lin@unisoc.com> MIME-Version: 1.0 X-Originating-IP: [10.13.2.29] X-ClientProxiedBy: SHCAS01.spreadtrum.com (10.0.1.201) To shmbx06.spreadtrum.com (10.0.1.11) X-MAIL: SHSQR01.spreadtrum.com 38L90k9T061807 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" When the soc changes, the corresponding gpio-eic-sprd.c code needs to be modified, and the corresponding Document must also be modified, which is quite troublesome. To avoid modifying the driver file, the number of EICs is automatically calculated by matching dts nodes. Fixes: 2788938b7946 ("gpio: eic-sprd: Make the irqchip immutable") Signed-off-by: Wenhua Lin --- drivers/gpio/gpio-eic-sprd.c | 43 ++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/drivers/gpio/gpio-eic-sprd.c b/drivers/gpio/gpio-eic-sprd.c index 96f1c7fd3988..e85addbdf8aa 100644 --- a/drivers/gpio/gpio-eic-sprd.c +++ b/drivers/gpio/gpio-eic-sprd.c @@ -100,33 +100,32 @@ struct sprd_eic { =20 struct sprd_eic_variant_data { enum sprd_eic_type type; - u32 num_eics; }; =20 +#define SPRD_EIC_VAR_DATA(soc_name) \ +static const struct sprd_eic_variant_data soc_name##_eic_dbnc_data =3D { \ + .type =3D SPRD_EIC_DEBOUNCE, \ +}; \ + \ +static const struct sprd_eic_variant_data soc_name##_eic_latch_data =3D { \ + .type =3D SPRD_EIC_LATCH, \ +}; \ + \ +static const struct sprd_eic_variant_data soc_name##_eic_async_data =3D { \ + .type =3D SPRD_EIC_ASYNC, \ +}; \ + \ +static const struct sprd_eic_variant_data soc_name##_eic_sync_data =3D { \ + .type =3D SPRD_EIC_SYNC, \ +} + +SPRD_EIC_VAR_DATA(sc9860); + static const char *sprd_eic_label_name[SPRD_EIC_MAX] =3D { "eic-debounce", "eic-latch", "eic-async", "eic-sync", }; =20 -static const struct sprd_eic_variant_data sc9860_eic_dbnc_data =3D { - .type =3D SPRD_EIC_DEBOUNCE, - .num_eics =3D 8, -}; - -static const struct sprd_eic_variant_data sc9860_eic_latch_data =3D { - .type =3D SPRD_EIC_LATCH, - .num_eics =3D 8, -}; - -static const struct sprd_eic_variant_data sc9860_eic_async_data =3D { - .type =3D SPRD_EIC_ASYNC, - .num_eics =3D 8, -}; - -static const struct sprd_eic_variant_data sc9860_eic_sync_data =3D { - .type =3D SPRD_EIC_SYNC, - .num_eics =3D 8, -}; =20 static inline void __iomem *sprd_eic_offset_base(struct sprd_eic *sprd_eic, unsigned int bank) @@ -595,6 +594,7 @@ static int sprd_eic_probe(struct platform_device *pdev) struct sprd_eic *sprd_eic; struct resource *res; int ret, i; + u16 num_banks =3D 0; =20 pdata =3D of_device_get_match_data(&pdev->dev); if (!pdata) { @@ -625,12 +625,13 @@ static int sprd_eic_probe(struct platform_device *pde= v) break; =20 sprd_eic->base[i] =3D devm_ioremap_resource(&pdev->dev, res); + num_banks++; if (IS_ERR(sprd_eic->base[i])) return PTR_ERR(sprd_eic->base[i]); } =20 sprd_eic->chip.label =3D sprd_eic_label_name[sprd_eic->type]; - sprd_eic->chip.ngpio =3D pdata->num_eics; + sprd_eic->chip.ngpio =3D num_banks * SPRD_EIC_PER_BANK_NR; sprd_eic->chip.base =3D -1; sprd_eic->chip.parent =3D &pdev->dev; sprd_eic->chip.direction_input =3D sprd_eic_direction_input; --=20 2.17.1 From nobody Fri Feb 13 19:29:09 2026 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 5FA3BE7D0A2 for ; Thu, 21 Sep 2023 20:18:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231352AbjIUUSR (ORCPT ); Thu, 21 Sep 2023 16:18:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53772 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231165AbjIUUR6 (ORCPT ); Thu, 21 Sep 2023 16:17:58 -0400 Received: from SHSQR01.spreadtrum.com (unknown [222.66.158.135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C661585F8 for ; Thu, 21 Sep 2023 10:19:31 -0700 (PDT) Received: from SHSQR01.spreadtrum.com (localhost [127.0.0.2] (may be forged)) by SHSQR01.spreadtrum.com with ESMTP id 38L92VFh068153 for ; Thu, 21 Sep 2023 17:02:31 +0800 (+08) (envelope-from Wenhua.Lin@unisoc.com) Received: from dlp.unisoc.com ([10.29.3.86]) by SHSQR01.spreadtrum.com with ESMTP id 38L90lmX061831; Thu, 21 Sep 2023 17:00:47 +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 4Rrq6H43t0z2SZykd; Thu, 21 Sep 2023 16:57:27 +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, 21 Sep 2023 17:00:46 +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 V2 4/4] gpio: sprd: Support 8 banks EIC controller Date: Thu, 21 Sep 2023 17:00:27 +0800 Message-ID: <20230921090027.11136-5-Wenhua.Lin@unisoc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230921090027.11136-1-Wenhua.Lin@unisoc.com> References: <20230921090027.11136-1-Wenhua.Lin@unisoc.com> MIME-Version: 1.0 X-Originating-IP: [10.13.2.29] X-ClientProxiedBy: SHCAS01.spreadtrum.com (10.0.1.201) To shmbx06.spreadtrum.com (10.0.1.11) X-MAIL: SHSQR01.spreadtrum.com 38L90lmX061831 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 e85addbdf8aa..6bb002060c3e 100644 --- a/drivers/gpio/gpio-eic-sprd.c +++ b/drivers/gpio/gpio-eic-sprd.c @@ -51,10 +51,10 @@ #define SPRD_EIC_SYNC_DATA 0x1c =20 /* - * The digital-chip EIC controller can support maximum 3 banks, and each b= ank + * The digital-chip EIC controller can support maximum 8 banks, and each b= ank * 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)) @@ -615,9 +615,9 @@ static int sprd_eic_probe(struct platform_device *pdev) =20 for (i =3D 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] and base[7] can be * optional. */ res =3D platform_get_resource(pdev, IORESOURCE_MEM, i); --=20 2.17.1