From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f176.google.com (mail-pf1-f176.google.com [209.85.210.176]) (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 27D4B3515C0 for ; Mon, 3 Aug 2026 22:35:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.176 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785796545; cv=none; b=dQeUhGlDRfU7971ytPGWv6vpOkqOfRZRNktzSspXUSjRV3AS6Oxu0zAvn0oeHh3ug2t0K8K/j4OrZw5qkKcNi4e1bFfdo11Vg2nYsE9h+rqZzS/EQFWo/tq/c8GLQIXd4u0d3/swu5eQsP52IglkzMmrKt0LUWiQCiKFG/5yaS0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785796545; c=relaxed/simple; bh=TibBIhEa9/QjTOS77NLs16D+pe446M8Yxm5pEmsQc/c=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=H50lA0qyvOSo+nhc5+oKcSgosxj+BzYTvN79tzaZr07qhpszvGKwZDcGIbYuayiDA7wTurMlQl1WFTRkvNX3fCS4SPmGamz/yPndfpRX9LmivjcHI7mMC972i4r1eRpEBs94pchzcS8IfKCPifM6SKylDboGsiwOTf0AgBSB0bI= 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=UZQWDFuF; arc=none smtp.client-ip=209.85.210.176 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="UZQWDFuF" Received: by mail-pf1-f176.google.com with SMTP id d2e1a72fcca58-8485ef63b68so4270114b3a.1 for ; Mon, 03 Aug 2026 15:35:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1785796543; x=1786401343; 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:content-type; bh=UNjLiku9OGDGFHcyr8i3iGPZu1wi19gAKG2Bs0IITD4=; b=UZQWDFuFIiUPvczCb1nmGwdgENF2WgasfSUF7f9oI1ctup3tVarC8l3cuvidSd329v T2cQBbsOVEJAGWSYiZtiHHbrjIWCrv5OngsvNNiNeJAtXrxGy+zlBac8lgo9vQ3uc5TY gtqQAs0525SBBI1YIhKGgeMCc4Vl88hzMdQsquW+03w6r+LgEWlSeYdcXnDzbpBulJfi +TUC+uTHr1HTnIJjizXcygyrlGkCdLZyCRkzVt1x8toJm721syu69WplgnS1Urq7VjPE LvctHGooNlNBLB3oOoy936HRZDgQTp+2HhiMx3vYzxpI3/W6jODv2+qrX7xmSLXhVgxH Jybg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785796543; x=1786401343; 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:content-type; bh=UNjLiku9OGDGFHcyr8i3iGPZu1wi19gAKG2Bs0IITD4=; b=f0TS+SpgobrjNs4M9eraR/p7t4Rur+Gw2j3jeBwBgJtY1Z0dJpPWf9qqDPCyyOU4Ct L96KGrdkxqY5juVjpQmuBH2/Xefs4shJApwnjOGZOmQzPNJJIERtNrSj9kw3udXVxzHI c4/KIf8avWjmqWQ0j/M/5Mjsc1B7+bbBFM/xbHdBi5NIgyt9k5kqDaRoZ6QN2aTJdBcE F7tMKmcMRb5DyS9eHuGkk+uhLLfERn5hxOvi1wBju1Sn9wihMHUawmjVndQn0Ts01Q+V OwplKfxx9tkOJRUKIGVAIED/YE4Wtp3Rzm9dPSGd8pL4tWSp/3PWWT2iff+CS5JsZiYI n0ag== X-Forwarded-Encrypted: i=1; AHgh+RrD3TbsdgplHg1SYwuN5JseWv+qmC9W6XIs5Ze8AeGLM43nROC/cInnecIdiFSVZbiH4sm76+OzyklL4Wc=@vger.kernel.org X-Gm-Message-State: AOJu0YwHyKfpczHk7lCPSnllZLfeIYq6T5d4/jG23pVqB1kVs212kN88 o/WwpD0LFLdWyY4gAFUR93zsxZ/0LrNFF1HNk5ElF6hkBEplVKBOCahP X-Gm-Gg: AR+sD13UMOuXPH1GaR6Qc3AVYUEcn3F1X0hzfmcFJCF14sR3POB8FqYW7f9wr404x4M JAF5BLiz35+2HVFeNTS1XyXkuG5cEBoy/G5VZxLjh4fXKj1s0mniqEqxCFoM1Z0sMVZQNvSxAb9 a2GJ0VwnimOqiGfisG6qogu3sjAuXXVI6DS0zIRhqXzWcWx6k4Ej5ByZLT99z7Kj8UAIQhieXD/ wFFlEOq/HYGVn3e8lzJ3YDw699uFUSvJNylC7obfylCewc9SGZOhqfJHPuArK8m+rGg9b+ePBjy G1evX6IGnFhJxqY8b7OIhNpdH1CoY2apYONert1VztntbIHJsocve2RddF2wwG1TElM/3/qLa3j 00I1bKVLeSvSCOfItUcxgxxfbpu0z7vVwuJtLzozicDayZtmYN4i2gD/rv+sdrdibfHUgPJeBOQ kx+fieLB8n1vcVpF38Xomg+sq4ylkL/raD1hk8ybuHYZPONuPlEuKnjvDxDSjpoQ8nYkJJXpxF+ nJCtIgm3PmOx9OxA96XQB4G/V95nGiU+iG234FesuSMPvchNTJF4MFODYP50DQnMYdraUSzERGq Pj2PVBcTTWIQdK7nCzfs3UZJECLwtxOwEx1CUQ== X-Received: by 2002:a05:6a00:148d:b0:848:4424:2b83 with SMTP id d2e1a72fcca58-84ee492211bmr10553771b3a.77.1785796543456; Mon, 03 Aug 2026 15:35:43 -0700 (PDT) Received: from ryzen.lan ([2601:644:8000:7a86::e35]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-84edc2d4473sm4186790b3a.40.2026.08.03.15.35.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Aug 2026 15:35:42 -0700 (PDT) From: Rosen Penev To: linux-gpio@vger.kernel.org Cc: Madhavan Srinivasan , Michael Ellerman , Nicholas Piggin , "Christophe Leroy (CS GROUP)" , 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: [PATCHv2 1/8] gpio: move ppc4xx gpio driver from arch/powerpc to drivers/gpio Date: Mon, 3 Aug 2026 15:35:32 -0700 Message-ID: <20260803223539.86303-2-rosenp@gmail.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260803223539.86303-1-rosenp@gmail.com> References: <20260803223539.86303-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 | 7 +++++++ drivers/gpio/Makefile | 1 + .../platforms/44x/gpio.c => drivers/gpio/gpio-ppc44x.c | 0 7 files changed, 11 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 0dc537f6aff3..d351551e266f 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 af84285ed1bd..15fd5874f4ea 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig @@ -593,6 +593,13 @@ 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 + 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 fa14581e3995..dc9e6d643b5b 100644 --- a/drivers/gpio/Makefile +++ b/drivers/gpio/Makefile @@ -147,6 +147,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.55.0