From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f170.google.com (mail-pg1-f170.google.com [209.85.215.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 32B4424E4C3 for ; Tue, 2 Jun 2026 05:01:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780376515; cv=none; b=WYt+xR/q/71jF5UOi9hrR5wgbKFogsQhgpCUJ+LP5FOvjIXXgIOSnP1lY3tPsGTHtJ94OihXZmiHnhqA+1HIqTNKCY7vmsBC0KrNZsecMNyIzYQxte+mL8zFHrCiU+E1BEcrxBIZbaFd/r/oOQ+OcE7k1fKJG6DOjItX/vn7e8g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780376515; c=relaxed/simple; bh=Rt3qyAEsfIkqikUW7PnMXRyV+OkDzZSUzNZRyxUvaVU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ZsU9j8HdWcUlOQeJQTvBD45eKWgpL/lRiMbRSgt/TojVYOQ2AdTYNaPv5fv3kKsefozruq3mj7VwBtr2IWVf5qNWEQWu576Ne9Yqf3PeivG6mrYn3iz8tEFNz7+0JW70arYZUUOVoIiFC+jHIzdbAgJn6D6VHiCO48LGfqJp2c8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=b1BXafDc; arc=none smtp.client-ip=209.85.215.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="b1BXafDc" Received: by mail-pg1-f170.google.com with SMTP id 41be03b00d2f7-c8587427468so954795a12.1 for ; Mon, 01 Jun 2026 22:01:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1780376513; x=1780981313; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=wGFxNfjzZNv84pjFOZFMUu5zdOh74zYkDbHbwTMiiog=; b=b1BXafDc0fGK0hWa7kK4Chr1gfgsRTIG2XDPEs5KaFkfrQV6QXwI7vyqRa+UHZGK90 /OHk5oZIfj4mif57conuc+h9+VHC3IutRjgjdLA23ZamIlONvUKmGvTNlGF2dHeJlHHA cx/gu8+jGjMTGYy0KJ4qlmU5EaVxFipU951IQqjt/sO7yonyJHQmeU4U26MX3GG2sFgC WGdBBFYtNFGDv0FIO80kRsUoDfZEYm1kuzsAMdYISxbDfUm6q3W3HIQ7YNQcpBbFLaPg w7U1FkXZIoywEjIEOaPczHpp9+nmkoUVu1gKPuUUTe5LrvBF33qfpu55w9H/8fZAkj8V PVLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780376513; x=1780981313; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=wGFxNfjzZNv84pjFOZFMUu5zdOh74zYkDbHbwTMiiog=; b=LY54FEHKuB1mmNBWfIfkVv3yqt0ULrXkf8dgQSlpxJrL2O/BPDJEIVRkhwJGZvpPbb ut/gUGhuH3wd45e1nkv13lge8G8tKWMGsTxOxsHfN/HZoYo/y/nqo0DwTMwIxVl7HqMo d40yGjKRIgnLJgadeEzQV7wueCgC3fzSAY9P+FqmUqJsROVAlZLT2hlvSEdcyddQfIEf +d653ZMJjJV7acgf/F+gluMkS1VA7W0AubUNvoNyjfmjls+H1FAhvkqaZcc/iv1ANEKu 9ou3BwMQCIh7/3QsfHwCv9jC/2FMox8W9B0PhC7fYvM66KAkikJEEynU+WJ2JQkWrztM mO2g== X-Forwarded-Encrypted: i=1; AFNElJ/CZRmCmDyvKYDiMNFjA1l7s/WkuWLEpuuy1frA4H5zlFy8T3GUR+DTxk/+iumXF8VRqsJgJBOK+2qyptk=@vger.kernel.org X-Gm-Message-State: AOJu0YwO5SrZjv00tZz7gazpg5u0sZvf35Dd5FwpQ27+03jO9RQtihaP oZ/CBrhadHkLQ01DjksBooxA4PGUEoGJNZFnyt2FZJ6Qco0zxxN4mdRr X-Gm-Gg: Acq92OGjB7tP5KzubzLsg9eO4kiWLvymV8lIOXtysyThoAVNU2RNQ0IX8LoE0OSoIEs c3ukaubOBLj0hRGtps+RaLPeIX6J1to9MI1hK4IW1WWqMnW1sTF5hhbEzjjl0K+f3sCB6I0AaG+ yhqWA+3EnAKghWaUsGDk4K8ieM6VxNMdgVV6RNq4rIA+4RJvck9dL5ZD88IsQ6fbWFPksW2SqQK Ommr8xLJvvrCtuHTX2dRQqU5MJSqpR+kL40br/FsLlJTIFiO5axKMNZVfG0EQEK269lMsQwjEwz twx/4EA50L/YOEY2qodCYhheCuyDK5wvsncQQmYb+fDBtNyJKJBlBQPsJWuLfTHCYsI0nm7O8DI KdMYRcDL8HUI8rqpS1jZ971KLjJW/M0ZLCAMoGdEpOiOEKr5hZoPqgtBOVrGnKjrtPOiUt8+oo4 K0HGHohkekaWH8NL84w0M4emj3aB4/wbOaAXz+vcaTDvu3fLVQay7u8kA3RhvTqPtbqKGXwteKK 18OTAGkJs5ytPdvOPO46YwkQCC62baaW96yT94mZDlEwg== X-Received: by 2002:a05:6a20:da11:b0:3b2:9360:4598 with SMTP id adf61e73a8af0-3b427e62c76mr16236422637.7.1780376513384; Mon, 01 Jun 2026 22:01:53 -0700 (PDT) Received: from ryzen ([2601:644:8000:5b5d:7285:c2ff:fe45:8a32]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-c8589d055c7sm8958467a12.9.2026.06.01.22.01.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Jun 2026 22:01:52 -0700 (PDT) From: Rosen Penev To: linux-gpio@vger.kernel.org Cc: Madhavan Srinivasan , chleroy@kernel.org, Michael Ellerman , Nicholas Piggin , Linus Walleij , Bartosz Golaszewski , linuxppc-dev@lists.ozlabs.org (open list:LINUX FOR POWERPC (32-BIT AND 64-BIT)), linux-kernel@vger.kernel.org (open list) Subject: [PATCH 1/7] gpio: move ppc4xx gpio driver from arch/powerpc to drivers/gpio Date: Mon, 1 Jun 2026 22:01:25 -0700 Message-ID: <20260602050131.856789-2-rosenp@gmail.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260602050131.856789-1-rosenp@gmail.com> References: <20260602050131.856789-1-rosenp@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Move the ppc4xx gpio driver out of arch/powerpc/platforms/44x/ into drivers/gpio/gpio-ppc44x.c. The driver has no architecture-specific dependencies and follows the same pattern as other PowerPC GPIO drivers already in drivers/gpio/ (e.g. gpio-mpc8xxx, gpio-mpc5200). - Renamed Kconfig symbol from PPC4xx_GPIO to GPIO_PPC44X - Updated ppc44x_defconfig and warp_defconfig to use the new symbol - Marked the new option as tristate (was bool) since the driver supports module build via module_platform_driver() Assisted-by: opencode:big-pickle Signed-off-by: Rosen Penev --- arch/powerpc/configs/44x/warp_defconfig | 2 +- arch/powerpc/configs/ppc44x_defconfig | 2 +- arch/powerpc/platforms/44x/Kconfig | 7 ------- arch/powerpc/platforms/44x/Makefile | 2 +- drivers/gpio/Kconfig | 8 ++++++++ drivers/gpio/Makefile | 1 + .../platforms/44x/gpio.c => drivers/gpio/gpio-ppc44x.c | 0 7 files changed, 12 insertions(+), 10 deletions(-) rename arch/powerpc/platforms/44x/gpio.c => drivers/gpio/gpio-ppc44x.c (100%) diff --git a/arch/powerpc/configs/44x/warp_defconfig b/arch/powerpc/configs/44x/warp_defconfig index 5757625469c4..d6014b9c5708 100644 --- a/arch/powerpc/configs/44x/warp_defconfig +++ b/arch/powerpc/configs/44x/warp_defconfig @@ -12,7 +12,7 @@ CONFIG_MODULE_UNLOAD=y # CONFIG_BLK_DEV_BSG is not set # CONFIG_EBONY is not set CONFIG_WARP=y -CONFIG_PPC4xx_GPIO=y +CONFIG_GPIO_PPC44X=y CONFIG_HZ_1000=y CONFIG_CMDLINE="ip=on" # CONFIG_PCI is not set diff --git a/arch/powerpc/configs/ppc44x_defconfig b/arch/powerpc/configs/ppc44x_defconfig index 41c930f74ed4..b0c7ad8c6d9b 100644 --- a/arch/powerpc/configs/ppc44x_defconfig +++ b/arch/powerpc/configs/ppc44x_defconfig @@ -22,7 +22,7 @@ CONFIG_GLACIER=y CONFIG_REDWOOD=y CONFIG_EIGER=y CONFIG_YOSEMITE=y -CONFIG_PPC4xx_GPIO=y +CONFIG_GPIO_PPC44X=y CONFIG_MATH_EMULATION=y CONFIG_NET=y CONFIG_PACKET=y diff --git a/arch/powerpc/platforms/44x/Kconfig b/arch/powerpc/platforms/44x/Kconfig index fc79f8466933..150813cea945 100644 --- a/arch/powerpc/platforms/44x/Kconfig +++ b/arch/powerpc/platforms/44x/Kconfig @@ -227,13 +227,6 @@ config PPC44x_SIMPLE help This option enables the simple PowerPC 44x platform support. -config PPC4xx_GPIO - bool "PPC4xx GPIO support" - depends on 44x - select GPIOLIB - help - Enable gpiolib support for ppc440 based boards - # 44x specific CPU modules, selected based on the board above. config 440EP bool diff --git a/arch/powerpc/platforms/44x/Makefile b/arch/powerpc/platforms/44x/Makefile index ca7b1bb442d9..4598d8b89bf4 100644 --- a/arch/powerpc/platforms/44x/Makefile +++ b/arch/powerpc/platforms/44x/Makefile @@ -15,4 +15,4 @@ obj-$(CONFIG_FSP2) += fsp2.o obj-$(CONFIG_PCI) += pci.o obj-$(CONFIG_PPC4xx_HSTA_MSI) += hsta_msi.o obj-$(CONFIG_PPC4xx_CPM) += cpm.o -obj-$(CONFIG_PPC4xx_GPIO) += gpio.o + diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig index 89c77ec6c205..77991da43ec1 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig @@ -593,6 +593,14 @@ config GPIO_POLARFIRE_SOC help Say yes here to support the GPIO controllers on Microchip FPGAs. +config GPIO_PPC44X + tristate "PPC44x GPIO support" + depends on 44x + select GPIO_GENERIC + select GPIOLIB + help + Enable gpiolib support for ppc440 based boards. + config GPIO_PXA bool "PXA GPIO support" depends on ARCH_PXA || ARCH_MMP || COMPILE_TEST diff --git a/drivers/gpio/Makefile b/drivers/gpio/Makefile index 8ec03c9aec20..9e8c9ca1d3fb 100644 --- a/drivers/gpio/Makefile +++ b/drivers/gpio/Makefile @@ -146,6 +146,7 @@ obj-$(CONFIG_GPIO_PCIE_IDIO_24) += gpio-pcie-idio-24.o obj-$(CONFIG_GPIO_PCI_IDIO_16) += gpio-pci-idio-16.o obj-$(CONFIG_GPIO_PISOSR) += gpio-pisosr.o obj-$(CONFIG_GPIO_PL061) += gpio-pl061.o +obj-$(CONFIG_GPIO_PPC44X) += gpio-ppc44x.o obj-$(CONFIG_GPIO_PMIC_EIC_SPRD) += gpio-pmic-eic-sprd.o obj-$(CONFIG_GPIO_POLARFIRE_SOC) += gpio-mpfs.o obj-$(CONFIG_GPIO_PXA) += gpio-pxa.o diff --git a/arch/powerpc/platforms/44x/gpio.c b/drivers/gpio/gpio-ppc44x.c similarity index 100% rename from arch/powerpc/platforms/44x/gpio.c rename to drivers/gpio/gpio-ppc44x.c -- 2.54.0