From nobody Sun Oct 5 05:26:31 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 D01F3283145; Fri, 8 Aug 2025 15:19:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754666373; cv=none; b=VSOG6tGgcamWcIAEo1LSwmXiWa31Lpo3Xfr4qFCzORltSjAEcJ2YbCa1jXyoqtTKzt1LYLuxZ3qei52noKGqaKjrH69ruJ9ubX1kZxDxg325TPHGPXU0zd9245KJB2/AsZodoCTGGxKcf6ausRQy+AgtsFTOhlQ08WmOyirRA6U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754666373; c=relaxed/simple; bh=Ju9ikKO/kXioH3zFMYDsXK5SYo/GY0u9aYwCAwLDTHQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=o5HBt/eilrDOzivOYnMwrLq0RFyDlo+MFl/glr8S5VtmJv4FFJOvT5jv84RFw01TwNhmKIOO6HKYM1vNl7qoktdA3aCYffDIFWPyYm+PbEQIiGxiKVz9f/m0LSzGOMGNcA8yzHvBgJgEyci2h/sm3c/BrirsmIu72L+8HTqPEX0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=bZDkKsGx; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="bZDkKsGx" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5D830C4CEED; Fri, 8 Aug 2025 15:19:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1754666373; bh=Ju9ikKO/kXioH3zFMYDsXK5SYo/GY0u9aYwCAwLDTHQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bZDkKsGxlo+CoIVF5PBg1RRdrrokNpeq5e8oXCRGfjsa+Me+uZZjrBUefoLz7hUoI cryi7PzlJmQtcEUjFyYcqtxjHCc7nN3EERuy9ejFB8kGqcANuSoTFaDCo8MpbF0orh RpmR9uCBUrNuWRSMuILFdcB7LhWNUQ3s50gYbH6zj2w5W0Y8Z3GAarKNVXxrAapY28 x9z17JO+qeVCVkvkeSvGcgi+QhOQNkUpaiQtrAmkuseBXPjNsB4fua6oADqCKxdnZm bZK3MWRz1kPyqB4hus5+KrVE5e/oElqN005mFeTwcwURBmktCR9TpVEnuHS8VzNxJB iciki0XtEglLA== From: Arnd Bergmann To: Bartosz Golaszewski , Linus Walleij , linux-gpio@vger.kernel.org, Andrew Lunn , Sebastian Hesselbarth , Gregory Clement , Russell King , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Krzysztof Kozlowski Cc: Arnd Bergmann , Alim Akhtar , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH 01/21] ARM: select legacy gpiolib interfaces where used Date: Fri, 8 Aug 2025 17:17:45 +0200 Message-Id: <20250808151822.536879-2-arnd@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250808151822.536879-1-arnd@kernel.org> References: <20250808151822.536879-1-arnd@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Arnd Bergmann A few old machines have not been converted away from the old-style gpiolib interfaces. Make these select the new CONFIG_GPIOLIB_LEGACY symbol so the code still works where it is needed but can be left out otherwise. Signed-off-by: Arnd Bergmann Acked-by: Krzysztof Kozlowski --- arch/arm/mach-mv78xx0/Kconfig | 1 + arch/arm/mach-orion5x/Kconfig | 1 + arch/arm/mach-pxa/Kconfig | 1 + arch/arm/mach-s3c/Kconfig.s3c64xx | 1 + arch/arm/mach-sa1100/Kconfig | 1 + 5 files changed, 5 insertions(+) diff --git a/arch/arm/mach-mv78xx0/Kconfig b/arch/arm/mach-mv78xx0/Kconfig index 9de3bbc09c3a..670e6587827e 100644 --- a/arch/arm/mach-mv78xx0/Kconfig +++ b/arch/arm/mach-mv78xx0/Kconfig @@ -6,6 +6,7 @@ menuconfig ARCH_MV78XX0 depends on ATAGS select CPU_FEROCEON select GPIOLIB + select GPIOLIB_LEGACY select MVEBU_MBUS select FORCE_PCI select PLAT_ORION_LEGACY diff --git a/arch/arm/mach-orion5x/Kconfig b/arch/arm/mach-orion5x/Kconfig index ee449ca032d2..cef19bea6164 100644 --- a/arch/arm/mach-orion5x/Kconfig +++ b/arch/arm/mach-orion5x/Kconfig @@ -5,6 +5,7 @@ menuconfig ARCH_ORION5X depends on CPU_LITTLE_ENDIAN select CPU_FEROCEON select GPIOLIB + select GPIOLIB_LEGACY select MVEBU_MBUS select FORCE_PCI select PCI_QUIRKS diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig index 10e472f4fa43..66e26990e2c8 100644 --- a/arch/arm/mach-pxa/Kconfig +++ b/arch/arm/mach-pxa/Kconfig @@ -10,6 +10,7 @@ menuconfig ARCH_PXA select CPU_XSCALE if !CPU_XSC3 select GPIO_PXA select GPIOLIB + select GPIOLIB_LEGACY select PLAT_PXA help Support for Intel/Marvell's PXA2xx/PXA3xx processor line. diff --git a/arch/arm/mach-s3c/Kconfig.s3c64xx b/arch/arm/mach-s3c/Kconfig.= s3c64xx index 8f40af063ad6..3f97fba8e4f5 100644 --- a/arch/arm/mach-s3c/Kconfig.s3c64xx +++ b/arch/arm/mach-s3c/Kconfig.s3c64xx @@ -101,6 +101,7 @@ config MACH_WLF_CRAGG_6410 depends on ATAGS depends on I2C=3Dy select CPU_S3C6410 + select GPIOLIB_LEGACY select LEDS_GPIO_REGISTER select S3C64XX_DEV_SPI0 select S3C64XX_SETUP_FB_24BPP diff --git a/arch/arm/mach-sa1100/Kconfig b/arch/arm/mach-sa1100/Kconfig index 0fb4c24cfad5..e23700e0d6c8 100644 --- a/arch/arm/mach-sa1100/Kconfig +++ b/arch/arm/mach-sa1100/Kconfig @@ -13,6 +13,7 @@ menuconfig ARCH_SA1100 select CPU_FREQ select CPU_SA1100 select GPIOLIB + select GPIOLIB_LEGACY select IRQ_DOMAIN select ISA select NEED_MACH_MEMORY_H --=20 2.39.5 From nobody Sun Oct 5 05:26:31 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 892DB283FC8; Fri, 8 Aug 2025 15:19:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754666381; cv=none; b=DetNUIUpg9dFNA/Rqb+OjSMLuS1Y0ONucqPLQmje7A75V8CQbUpwgMjYDNoixm/V+d0tdc2NnVAAcKXYTyCEgfFdIhbhAzS98PdiZWFBVDRYMGWNSlkUKsrXvKhyXd7G5cxi2Ay/bCRxMS5C3Cgfb8UguZ667aKRsrT816Qui6Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754666381; c=relaxed/simple; bh=ELPLNWEdhv27CtXGcowWE2M8MhTaAbuHQctUhBNkFz0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=llA2yGhIi6oWhqi+iHfl+iix6Y4adXUMNnmPiF9ME+rAD6U8TywjPg1bLj8akfdEEwEYyg2l/1SaoqscssLOhwZI7OsC13rKHTwefCrLHvUgyeirX5/+8Mesej+yYC8UJFp7LeCm9npT1TKK+cckLIQupelxS8OYqNWCJmWlHnE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=GXgXAzgD; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="GXgXAzgD" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A1BE7C4CEF4; Fri, 8 Aug 2025 15:19:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1754666381; bh=ELPLNWEdhv27CtXGcowWE2M8MhTaAbuHQctUhBNkFz0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GXgXAzgDUvvCQ5ddKuKhfHgEyF5F3DVkDhZsxMeAppyP9d449wuxnhDvUQTubn7Ej 2Ab3AeRpfGiZ7TUCowuFxOQxrGAmKqUlDpFU/XkFSyzdXyMejWH8FdwaWUBWj3DC96 2T28ywnxX3WwVMRiLvhuprbk20zCAbjQENae4jsgRTlkeRNrrOfhG4qRvf2KZyfEWc U/YSJ1OOxm1I21hqwhkwVkB01jtTLBrKsBQMagIykzO2Gr2BoBiGJSOn47VVSoY28a sauApsUotyGnEbOCu85kkthQSfzaaAV6KkqhQvQETq4gwCscPHGW7UO7kXRKzkDc5q yyRKaQprFtxpw== From: Arnd Bergmann To: Bartosz Golaszewski , Linus Walleij , linux-gpio@vger.kernel.org, Geert Uytterhoeven Cc: Arnd Bergmann , Greg Ungerer , linux-m68k@lists.linux-m68k.org, linux-kernel@vger.kernel.org Subject: [PATCH 02/21] m68k: coldfire: select legacy gpiolib interface for mcfqspi Date: Fri, 8 Aug 2025 17:17:46 +0200 Message-Id: <20250808151822.536879-3-arnd@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250808151822.536879-1-arnd@kernel.org> References: <20250808151822.536879-1-arnd@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Arnd Bergmann The common coldfire code uses the old GPIO number based interfaces for at least the QSPI chipselect lines. Select the required Kconfig symbol to keep it building when that becomes optional. Apparently there are no devices attached to a QSPI controller in any of the coldfire boards, so this is not actually used in upstream kernels. Signed-off-by: Arnd Bergmann --- arch/m68k/Kconfig.cpu | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/m68k/Kconfig.cpu b/arch/m68k/Kconfig.cpu index c9a7e602d8a4..148f8a79d206 100644 --- a/arch/m68k/Kconfig.cpu +++ b/arch/m68k/Kconfig.cpu @@ -30,6 +30,7 @@ config COLDFIRE select CPU_HAS_NO_MULDIV64 select GENERIC_CSUM select GPIOLIB + select GPIOLIB_LEGACY if SPI_COLDFIRE_QSPI select HAVE_LEGACY_CLK select HAVE_PAGE_SIZE_8KB if !MMU =20 --=20 2.39.5 From nobody Sun Oct 5 05:26:31 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 29D6C283141; Fri, 8 Aug 2025 15:19:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754666394; cv=none; b=BwWuWRAu3jeCOJLHkp4ENqZvO7HjnvX6fQBxNQOtzm6mLwHuZCWy3lmLt92zs/tB5VT9kkYhCJN53oogc856Gp+QF/MJ1L/d144mVcqAeN+RMNMcVHnHyL6y9QWpEJFkT62XUWL0wQ0r2ghwc7UqkGv7NvJOXu8boRwGup4VcKI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754666394; c=relaxed/simple; bh=jrVReShttlw4WSCG9fL1fq8w/f/q4FwWTmPVMp4s4uo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=tXWD/jLwehkE45hNRF7FmHUtqfxtWyIjgdGoV+alc68f96CxhWSBVo0CuS4zPu+YO+UdSEFKkiRq5VbsIpV06IaM8TKCIHuj8r+xFpAhbDWMTGgDSD0xKz3lKbd/eqq5ZzWroAQduOf9CfnhY3jfq6wY8UddSFd+VZLtrA8aYVo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=TRI/MDRQ; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="TRI/MDRQ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C509EC4CEF4; Fri, 8 Aug 2025 15:19:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1754666393; bh=jrVReShttlw4WSCG9fL1fq8w/f/q4FwWTmPVMp4s4uo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TRI/MDRQD/kmJpJT7zK8JUMsUT6WicR1LCz6OLha8IFsvJQXXxQQ/MQFNnfRxLH2B DQ1GygEY6m5sjY7h3QyDwx2J+gTDn/Ztbivh/+N0ktALuqc0uCMUiwXwJtXdrFd437 P8Vf4HEJmo6JJM07KU25taUl7eu7f1IVH7H7dOexAPdlzMqODTgwUkvwc812VB7jIR C9hGmviJJq4tr57qPYJL3ts7Mz20iegMlC9uv/FsOSiqRn6+LX2gofBrdPhda3h1HO QojBpK8WyGTD569K96ma57Rc+QJM6y1FTmdrxJjA8ZeVYDRDpb8/cYdmUGbwCsqn/+ dS5qW/6ezOCsQ== From: Arnd Bergmann To: Bartosz Golaszewski , Linus Walleij , linux-gpio@vger.kernel.org, Thomas Bogendoerfer Cc: Arnd Bergmann , Andrew Morton , "Mike Rapoport (Microsoft)" , Masahiro Yamada , Dan Williams , Caleb James DeLisle , Eric Biggers , =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= , Dave Vasilevsky , Steven Rostedt , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 03/21] mips: select legacy gpiolib interfaces where used Date: Fri, 8 Aug 2025 17:17:47 +0200 Message-Id: <20250808151822.536879-4-arnd@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250808151822.536879-1-arnd@kernel.org> References: <20250808151822.536879-1-arnd@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Arnd Bergmann A few old machines have not been converted away from the old-style gpiolib interfaces. Make these select the new CONFIG_GPIOLIB_LEGACY symbol so the code still works where it is needed but can be left out otherwise. This is the list of all gpio_request() calls in mips: arch/mips/alchemy/board-mtx1.c: rc =3D gpio_request(mtx1_gpio_button[0].g= pio, arch/mips/alchemy/devboards/db1000.c: gpio_request(19, "sd0_cd"= ); arch/mips/alchemy/devboards/db1000.c: gpio_request(20, "sd1_cd"= ); arch/mips/alchemy/devboards/db1200.c: gpio_request(215, "otg-vbus"); arch/mips/bcm47xx/workarounds.c: err =3D gpio_request_one(usb_powe= r, GPIOF_OUT_INIT_HIGH, "usb_power"); arch/mips/bcm63xx/boards/board_bcm963xx.c: gpio_request_one(= board.ephy_reset_gpio, arch/mips/txx9/rbtx4927/setup.c: gpio_request(15, "sio-dtr"); Most of these should be easy enough to change to modern gpio descriptors or remove if they are no longer in use. Signed-off-by: Arnd Bergmann --- arch/mips/Kconfig | 5 +++++ arch/mips/alchemy/Kconfig | 1 - arch/mips/txx9/Kconfig | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index caf508f6e9ec..27f16c5b112a 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -205,6 +205,8 @@ config MIPS_ALCHEMY select CSRC_R4K select IRQ_MIPS_CPU select DMA_NONCOHERENT # Au1000,1500,1100 aren't, rest is + select GPIOLIB + select GPIOLIB_LEGACY select MIPS_FIXUP_BIGPHYS_ADDR if PCI select SYS_HAS_CPU_MIPS32_R1 select SYS_SUPPORTS_32BIT_KERNEL @@ -306,6 +308,7 @@ config BCM47XX select SYS_HAS_EARLY_PRINTK select USE_GENERIC_EARLY_PRINTK_8250 select GPIOLIB + select GPIOLIB_LEGACY select LEDS_GPIO_REGISTER select BCM47XX_NVRAM select BCM47XX_SPROM @@ -329,6 +332,7 @@ config BCM63XX select SYS_HAS_CPU_BMIPS4380 select SWAP_IO_SPACE select GPIOLIB + select GPIOLIB_LEGACY select MIPS_L1_CACHE_SHIFT_4 select HAVE_LEGACY_CLK help @@ -981,6 +985,7 @@ config MIKROTIK_RB532 select SWAP_IO_SPACE select BOOT_RAW select GPIOLIB + select GPIOLIB_LEGACY select MIPS_L1_CACHE_SHIFT_4 help Support the Mikrotik(tm) RouterBoard 532 series, diff --git a/arch/mips/alchemy/Kconfig b/arch/mips/alchemy/Kconfig index 6ca81e1bd35c..cf5ad52c0a0f 100644 --- a/arch/mips/alchemy/Kconfig +++ b/arch/mips/alchemy/Kconfig @@ -12,7 +12,6 @@ config MIPS_MTX1 =20 config MIPS_DB1XXX bool "Alchemy DB1XXX / PB1XXX boards" - select GPIOLIB select HAVE_PCI select HAVE_PATA_PLATFORM select SYS_SUPPORTS_LITTLE_ENDIAN diff --git a/arch/mips/txx9/Kconfig b/arch/mips/txx9/Kconfig index 7335efa4d528..92b759a434c0 100644 --- a/arch/mips/txx9/Kconfig +++ b/arch/mips/txx9/Kconfig @@ -37,6 +37,7 @@ config SOC_TX4927 select IRQ_TXX9 select PCI_TX4927 select GPIO_TXX9 + select GPIOLIB_LEGACY =20 config SOC_TX4938 bool --=20 2.39.5 From nobody Sun Oct 5 05:26:31 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 95DAF283141; Fri, 8 Aug 2025 15:20:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754666410; cv=none; b=KeBXQXs0OaMgN1p2R8uzCwJbGGARu+y2C2lxVsjqlvF8Uv3za8T963uJ/KfS9SSR5yarajbHhS4QYhE12+0AJscJ2o04cauNj4RmfQTpu9NmQgx7jlWXipmuiIV5N58ZoZ0ajWeURrBmQZlYju7G0roULX5kUsFHyNqHyYASPZ4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754666410; c=relaxed/simple; bh=75ld2ewRILgYi943fpVictpUlkWQ9Vf7v7jfrpBO0yM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=nd274kYolAVH9HAy/QRoSCquYiSE6O/WhNDW5+pNf2L7ceLGf0gepZhccgwTft5W4uWAkpJNkInY1RiP4ahxXiTrtlQq6rkQPt36vmDPKqf8Jg5WO5y3njtW7L7MviiE5oH998NwYBcH9ZLHgPdWQRBq/m+JwoPKBghDAQ+7X9o= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=B4vEHyt7; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="B4vEHyt7" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9C02DC4CEED; Fri, 8 Aug 2025 15:20:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1754666410; bh=75ld2ewRILgYi943fpVictpUlkWQ9Vf7v7jfrpBO0yM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=B4vEHyt7o58FJApQEXnLFlvpHynRZE+9UHEGodhKsxWL6CQxpEf39Y/jwvS2vqXm/ fvjGnMMpz0xIGaL9xQFUR/GVBYqYpeJzleKOqj7ObIE/Q6LRh2qyoBinsptmrdMk6Q B+8m478ojXCmAVtY/OGnNFVU1dvduSNvz6bSu7qz6zkwB22nnYMntwnnmBmQ3XBmAM xaF8GWN3KXSrRtX3wV0xzmqgx/iUQqIPlvLIX+CdXyt7OzlxPxwBUSTKUTzfuVHP6M 1Io1Y2/qghst3i7zFGL7Ldyv+ldAAV0k4m0mPXXlANxkb2wi2YtCiAdyv1atKc9jsJ XRNnuMlGWb/vw== From: Arnd Bergmann To: Bartosz Golaszewski , Linus Walleij , linux-gpio@vger.kernel.org, Yoshinori Sato , Rich Felker , John Paul Adrian Glaubitz Cc: Arnd Bergmann , Michael Ellerman , Steven Rostedt , "Paul E. McKenney" , Masahiro Yamada , Dave Vasilevsky , Geert Uytterhoeven , linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 04/21] sh: select legacy gpiolib interface Date: Fri, 8 Aug 2025 17:17:48 +0200 Message-Id: <20250808151822.536879-5-arnd@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250808151822.536879-1-arnd@kernel.org> References: <20250808151822.536879-1-arnd@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Arnd Bergmann Many board files on sh reference the legacy gpiolib interfaces that are becoming optional. To ensure the boards can keep building, select CONFIG_GPIOLIB_LEGACY on each of the boards that have one of the hardcoded calls. Signed-off-by: Arnd Bergmann --- arch/sh/Kconfig | 1 + arch/sh/boards/Kconfig | 8 ++++++++ arch/sh/boards/mach-highlander/Kconfig | 1 + arch/sh/boards/mach-rsk/Kconfig | 3 +++ 4 files changed, 13 insertions(+) diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index d5795067befa..d60f1d5a94c0 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig @@ -462,6 +462,7 @@ config CPU_SUBTYPE_SHX3 select CPU_SHX3 select GENERIC_CLOCKEVENTS_BROADCAST if SMP select GPIOLIB + select GPIOLIB_LEGACY select PINCTRL =20 # SH4AL-DSP Processor Support diff --git a/arch/sh/boards/Kconfig b/arch/sh/boards/Kconfig index 1af93be61b1f..d89b74177233 100644 --- a/arch/sh/boards/Kconfig +++ b/arch/sh/boards/Kconfig @@ -80,6 +80,7 @@ config SH_7724_SOLUTION_ENGINE select SOLUTION_ENGINE depends on CPU_SUBTYPE_SH7724 select GPIOLIB + select GPIOLIB_LEGACY select REGULATOR_FIXED_VOLTAGE if REGULATOR imply SND_SOC_AK4642 if SND_SIMPLE_CARD help @@ -199,6 +200,7 @@ config SH_SH7757LCR bool "SH7757LCR" depends on CPU_SUBTYPE_SH7757 select GPIOLIB + select GPIOLIB_LEGACY select REGULATOR_FIXED_VOLTAGE if REGULATOR =20 config SH_SH7785LCR @@ -226,6 +228,7 @@ config SH_URQUELL bool "Urquell" depends on CPU_SUBTYPE_SH7786 select GPIOLIB + select GPIOLIB_LEGACY select HAVE_PCI select NO_IOPORT_MAP if !PCI =20 @@ -233,6 +236,7 @@ config SH_MIGOR bool "Migo-R" depends on CPU_SUBTYPE_SH7722 select GPIOLIB + select GPIOLIB_LEGACY select REGULATOR_FIXED_VOLTAGE if REGULATOR help Select Migo-R if configuring for the SH7722 Migo-R platform @@ -242,6 +246,7 @@ config SH_AP325RXA bool "AP-325RXA" depends on CPU_SUBTYPE_SH7723 select GPIOLIB + select GPIOLIB_LEGACY select REGULATOR_FIXED_VOLTAGE if REGULATOR help Renesas "AP-325RXA" support. @@ -251,6 +256,7 @@ config SH_KFR2R09 bool "KFR2R09" depends on CPU_SUBTYPE_SH7724 select GPIOLIB + select GPIOLIB_LEGACY select REGULATOR_FIXED_VOLTAGE if REGULATOR help "Kit For R2R for 2009" support. @@ -259,6 +265,7 @@ config SH_ECOVEC bool "EcoVec" depends on CPU_SUBTYPE_SH7724 select GPIOLIB + select GPIOLIB_LEGACY select REGULATOR_FIXED_VOLTAGE if REGULATOR imply SND_SOC_DA7210 if SND_SIMPLE_CARD help @@ -329,6 +336,7 @@ config SH_MAGIC_PANEL_R2 bool "Magic Panel R2" depends on CPU_SUBTYPE_SH7720 select GPIOLIB + select GPIOLIB_LEGACY select REGULATOR_FIXED_VOLTAGE if REGULATOR help Select Magic Panel R2 if configuring for Magic Panel R2. diff --git a/arch/sh/boards/mach-highlander/Kconfig b/arch/sh/boards/mach-h= ighlander/Kconfig index b0abd03cac4e..cd3a553ce30c 100644 --- a/arch/sh/boards/mach-highlander/Kconfig +++ b/arch/sh/boards/mach-highlander/Kconfig @@ -20,6 +20,7 @@ config SH_R7785RP bool "R7785RP board support" depends on CPU_SUBTYPE_SH7785 select GPIOLIB + select GPIOLIB_LEGACY =20 endchoice =20 diff --git a/arch/sh/boards/mach-rsk/Kconfig b/arch/sh/boards/mach-rsk/Kcon= fig index f0299bc4416f..3810937aa5d4 100644 --- a/arch/sh/boards/mach-rsk/Kconfig +++ b/arch/sh/boards/mach-rsk/Kconfig @@ -12,16 +12,19 @@ config SH_RSK7201 config SH_RSK7203 bool "RSK7203" select GPIOLIB + select GPIOLIB_LEGACY depends on CPU_SUBTYPE_SH7203 =20 config SH_RSK7264 bool "RSK2+SH7264" select GPIOLIB + select GPIOLIB_LEGACY depends on CPU_SUBTYPE_SH7264 =20 config SH_RSK7269 bool "RSK2+SH7269" select GPIOLIB + select GPIOLIB_LEGACY depends on CPU_SUBTYPE_SH7269 =20 endchoice --=20 2.39.5 From nobody Sun Oct 5 05:26:31 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 DB74D236A73; Fri, 8 Aug 2025 15:20:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754666435; cv=none; b=Ti54lXAjFP+6Q7BeAQNjzNEiBrozk67w2aslfqz6M924quNXhpcrFIM8T5PGj7+YkDQDjJiONBnM42x33Gt+Go5atDwRbBAkpUcsV2JHA11dp5NblRrwp4rCpPmsr8+3Y20hEJcg0DmFBvDSDjePk6/TUzgyrumow5AsTix6/sQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754666435; c=relaxed/simple; bh=vwCFqwUL01DNTrnN+v0UHsEkzjzYJynmCUZDf9U+qXA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=nXf8ns4vFwjvdXGklMg91CiGfJLPARKlW12OxE7K6ajVirrj59I/+d32ePprC0/hrmIuwVyASg3gJjxBOIVgH9Gpz5BlriY9Jfd3hr/VwflqHI6OAoc+YP6pn4YvdW64RAQMKX1VIcwibi5mDhj872EQJIzuNYXkfxgBkEs/rgc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=iWsIAYmP; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="iWsIAYmP" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 19096C4CEF4; Fri, 8 Aug 2025 15:20:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1754666434; bh=vwCFqwUL01DNTrnN+v0UHsEkzjzYJynmCUZDf9U+qXA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iWsIAYmPgoX9KoJprcyqYPkZJzJ4NLmZYeLDW9qUqdoXnr7+hMt79yMQWmshi9dBU A6sxrbsXKH2jBtzwlcMN8UfNHTartAjNde06WnCAfIyaWLH6IujzoPV9trVL3wNr62 5RtFAVnf75Tpy3knWYF0anaro4MF1YiANqmma/7LgJQm3xVXFSNzGA/AUvAPgeQU6z P1D808bIJG+WyE4Flyn7Mo3fxyLvN5UapStY/U3l8ctPU/mzRJDlKcXSnHQ7DkTPxp wDDftM/eBeIETvt9ARsjJLkuN1XqTSC0Q1eay4exXTgUTTn1BlG1GGEkTIObHzD0pk rUg6kVFDdzOXQ== From: Arnd Bergmann To: Bartosz Golaszewski , Linus Walleij , linux-gpio@vger.kernel.org, Dmitry Torokhov , Hans de Goede , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= Cc: Arnd Bergmann , Lee Jones , Dzmitry Sankouski , Heiko Stuebner , "Dr. David Alan Gilbert" , =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= , Guenter Roeck , Andy Shevchenko , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, platform-driver-x86@vger.kernel.org Subject: [PATCH 05/21] x86/platform: select legacy gpiolib interfaces where used Date: Fri, 8 Aug 2025 17:17:49 +0200 Message-Id: <20250808151822.536879-6-arnd@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250808151822.536879-1-arnd@kernel.org> References: <20250808151822.536879-1-arnd@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Arnd Bergmann A few old machines have not been converted away from the old-style gpiolib interfaces. Make these select the new CONFIG_GPIOLIB_LEGACY symbol so the code still works where it is needed but can be left out otherwise. Signed-off-by: Arnd Bergmann --- drivers/input/misc/Kconfig | 3 +++ drivers/platform/x86/Kconfig | 3 +++ drivers/platform/x86/x86-android-tablets/Kconfig | 1 + 3 files changed, 7 insertions(+) diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig index 0fb21c99a5e3..681d4123ef2b 100644 --- a/drivers/input/misc/Kconfig +++ b/drivers/input/misc/Kconfig @@ -860,6 +860,9 @@ config INPUT_IDEAPAD_SLIDEBAR config INPUT_SOC_BUTTON_ARRAY tristate "Windows-compatible SoC Button Array" depends on KEYBOARD_GPIO && ACPI + depends on X86 + depends on GPIOLIB + select GPIOLIB_LEGACY help Say Y here if you have a SoC-based tablet that originally runs Windows 8 or a Microsoft Surface Book 2, Pro 5, Laptop 1 or later. diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig index 6d238e120dce..979a2fce8fc1 100644 --- a/drivers/platform/x86/Kconfig +++ b/drivers/platform/x86/Kconfig @@ -309,6 +309,7 @@ config MERAKI_MX100 depends on GPIOLIB depends on GPIO_ICH depends on LEDS_CLASS + select GPIOLIB_LEGACY select LEDS_GPIO help This driver provides support for the front button and LEDs on @@ -564,6 +565,7 @@ config PCENGINES_APU2 depends on INPUT && INPUT_KEYBOARD && GPIOLIB depends on LEDS_CLASS select GPIO_AMD_FCH + select GPIOLIB_LEGACY select KEYBOARD_GPIO_POLLED select LEDS_GPIO help @@ -591,6 +593,7 @@ config PORTWELL_EC config BARCO_P50_GPIO tristate "Barco P50 GPIO driver for identify LED/button" depends on GPIOLIB + select GPIOLIB_LEGACY help This driver provides access to the GPIOs for the identify button and led present on Barco P50 board. diff --git a/drivers/platform/x86/x86-android-tablets/Kconfig b/drivers/pla= tform/x86/x86-android-tablets/Kconfig index 193da15ee01c..54fa6112c9ea 100644 --- a/drivers/platform/x86/x86-android-tablets/Kconfig +++ b/drivers/platform/x86/x86-android-tablets/Kconfig @@ -8,6 +8,7 @@ config X86_ANDROID_TABLETS depends on I2C && SPI && SERIAL_DEV_BUS depends on GPIOLIB && PMIC_OPREGION depends on ACPI && EFI && PCI + select GPIOLIB_LEGACY select NEW_LEDS select LEDS_CLASS select POWER_SUPPLY --=20 2.39.5 From nobody Sun Oct 5 05:26:31 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 0B8D928466C; Fri, 8 Aug 2025 15:21:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754666469; cv=none; b=WsxiODGP8tPNq+Fow2LwvPSLjKm0RvetsTcOj6VoDPdDOfv9tHwViEjGyhpwwuV5gg4GJ+npD7wAMNUfMrlKfqt2SRyvENzjp3YUWAJJAkOQHHC6O2/drmncVNYH2RXP3iCFobICEv5ADRkwuxn8HNfNfSaZqGmsg1mYoBWq6yI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754666469; c=relaxed/simple; bh=0PmLEzDj8Yj8Gy2JvlZNRlKud3xi+D1wYx18pEUDYTs=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=bIbOLOml170ddKIM0Ji/XLu4pjIkjGYD5Xu93O8OA+kURSyf9PDyuKqjnwWM89BIcXge1MyuTdVS4sgtCQ6ueL4925Q+HOewYFsFfIVgjXxHCrVqybdrxYzcMlgSe3Ju/TapSfphM0UI3L4tL6afgz0ELFRh5AQsDqIkTHdsM6A= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=n0ExhBX/; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="n0ExhBX/" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5599EC4CEED; Fri, 8 Aug 2025 15:21:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1754666468; bh=0PmLEzDj8Yj8Gy2JvlZNRlKud3xi+D1wYx18pEUDYTs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=n0ExhBX/zBUccORFWN5ApzcDF4QrmhRaRoonMkINrmotPF79gtI/jGIFD23+O+9zm OTn0khB50ptVcYKBQXl/9C22shW0bt/yctH4XIRIF4tGBBI9vrXF8W6VYIRwVtGWfy nIzZQCx6c+lklTraZyb5FZmbiprqtfQBTYp0N1KxrPg5TjsWRUynKxJ6keL98m7M/D z/RiFH6qNnkuu5nASjeILyWY7QeOvojMwHlLH2JF+I2XeLrBrkNAS91RDu0F2WsLm2 ymEcAuxpuyr4GQNBdKWlNwJVWdOvUkxrbvl40pFc5elJCp5ZvYyh3T2oqu/skjma6y +B2llCwtMtr/g== From: Arnd Bergmann To: Bartosz Golaszewski , Linus Walleij , linux-gpio@vger.kernel.org, Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, Jaroslav Kysela , Takashi Iwai Cc: Arnd Bergmann , "H. Peter Anvin" , Andrew Morton , =?UTF-8?q?Mateusz=20Jo=C5=84czyk?= , linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org Subject: [PATCH 06/21] x86/olpc: select GPIOLIB_LEGACY Date: Fri, 8 Aug 2025 17:17:50 +0200 Message-Id: <20250808151822.536879-7-arnd@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250808151822.536879-1-arnd@kernel.org> References: <20250808151822.536879-1-arnd@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Arnd Bergmann The OLPC GPIO controller sets up a fixed number space that is used by at least two drivers: arch/x86/platform/olpc/olpc-xo1-sci.c: In function 'setup_ec_sci': arch/x86/platform/olpc/olpc-xo1-sci.c:358:13: error: implicit declaration o= f function 'gpio_request' [-Wimplicit-function-declaration] 358 | r =3D gpio_request(OLPC_GPIO_ECSCI, "OLPC-ECSCI"); | ^~~~~~~~~~~~ sound/pci/cs5535audio/cs5535audio_olpc.c: In function 'olpc_analog_input': sound/pci/cs5535audio/cs5535audio_olpc.c:41:9: error: implicit declaration = of function 'gpio_set_value'; did you mean 'gpiod_set_value'? [-Wimplicit-f= unction-declaration] 41 | gpio_set_value(OLPC_GPIO_MIC_AC, on); Select CONFIG_GPIOLIB_LEGACY for this platform and make sure the sound driver portion cannot be compiled without this. Signed-off-by: Arnd Bergmann Acked-by: Borislav Petkov (AMD) --- arch/x86/Kconfig | 1 + sound/pci/Kconfig | 1 + 2 files changed, 2 insertions(+) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 58d890fe2100..3fd5e378a9f1 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -3006,6 +3006,7 @@ config OLPC bool "One Laptop Per Child support" depends on !X86_PAE select GPIOLIB + select GPIOLIB_LEGACY select OF select OF_PROMTREE select IRQ_DOMAIN diff --git a/sound/pci/Kconfig b/sound/pci/Kconfig index e0996a9d90b0..6366f72b3667 100644 --- a/sound/pci/Kconfig +++ b/sound/pci/Kconfig @@ -300,6 +300,7 @@ config SND_CS5535AUDIO tristate "CS5535/CS5536 Audio" depends on X86_32 || MIPS || COMPILE_TEST depends on HAS_IOPORT + depends on GPIOLIB_LEGACY || !OLPC select SND_PCM select SND_AC97_CODEC help --=20 2.39.5 From nobody Sun Oct 5 05:26:31 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 CE726283FE4; Fri, 8 Aug 2025 15:21:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754666481; cv=none; b=feTaDzqFvS4EVkmL1hcF4k55oyGsoK6P+9wjPWF+gnzneAK3y9qscDy9zuwzM+CdjBxCGCvx7IkskSq4vpwgqEiNEPYMPg9cl5I+WtmI/FviGRdjROPYpDSqmIqd+YiR1Zkvv3M4Rmq7t4S4R9xCg3ZKHIMwjqYFCEyDdIMjMUs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754666481; c=relaxed/simple; bh=LPnYZia34xhAV/WjUeSggZiiEtdVJPX0U5P7LQUSwBU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Tm8qOiwoqSQOZvrxqy21MceWVh7hivrojBTdxdziYcwyQeqQXQ/ctiv7iWT5rwsgS2NE6eVaP4pf946zgsZzdqNBK7RP/d3mK8iLVAw6m8LrbSgGYnKoaRbRt7y2uqXDviXncIkRMKYf+uDgiEflF5r9+dhG15+El2cwICgvb3U= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=BPlb2I2B; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="BPlb2I2B" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8CBFAC4CEED; Fri, 8 Aug 2025 15:21:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1754666481; bh=LPnYZia34xhAV/WjUeSggZiiEtdVJPX0U5P7LQUSwBU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BPlb2I2BulQ2TssYoqMCCwm7OUr1C6ZZw4qaqxN+35Jl1z4m5D2gq6TfTX/pNPQdK 9VTlok1qOTFwQTCK+Q4BI10U1cp2BfFglu5Y6+AvmfDzjpwZ/PU+Ac6XUoRKkTMSRR YSHK9/wtf25oVghFW5cuXw8Jr+AnqhPO/OHkWAhqQiKR+BI1gRv6I2g1Wa3hZumRZu LLoqTuc0qGZNbzl5eolAVUWKWLgR76VM0abB1yhqLWoV2LYDIGEqvXAbrdK4hy8Yl0 quF/UiQmNocBmk3FrrCM9ga9bd4IqbV2xIObTHFF/Rlx41+NlQlvX6PnA3uwL2ort7 qs030c5QotjxQ== From: Arnd Bergmann To: Bartosz Golaszewski , Linus Walleij , linux-gpio@vger.kernel.org, Lee Jones Cc: Arnd Bergmann , Thomas Gleixner , "Jiri Slaby (SUSE)" , patches@opensource.cirrus.com, linux-kernel@vger.kernel.org Subject: [PATCH 07/21] mfd: wm8994: remove dead legacy-gpio code Date: Fri, 8 Aug 2025 17:17:51 +0200 Message-Id: <20250808151822.536879-8-arnd@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250808151822.536879-1-arnd@kernel.org> References: <20250808151822.536879-1-arnd@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Arnd Bergmann The old-style gpio handling in wm8994 came from a commit 7c8844481a1c ("mfd: wm8994: Emulate level triggered interrupts if required") in linux-3.11, but nothing in the kernel ever set the 'irq_gpio' member in the wm8994_pdata structure, so this was always dead code. Remove it now to reduce the dependency on the legacy gpio interfaces. Signed-off-by: Arnd Bergmann Reviewed-by: Bartosz Golaszewski --- drivers/mfd/wm8994-irq.c | 94 ++------------------------------ include/linux/mfd/wm8994/pdata.h | 5 -- 2 files changed, 4 insertions(+), 95 deletions(-) diff --git a/drivers/mfd/wm8994-irq.c b/drivers/mfd/wm8994-irq.c index 1475b1ac6983..a46cea948763 100644 --- a/drivers/mfd/wm8994-irq.c +++ b/drivers/mfd/wm8994-irq.c @@ -135,53 +135,9 @@ static const struct regmap_irq_chip wm8994_irq_chip = =3D { .runtime_pm =3D true, }; =20 -static void wm8994_edge_irq_enable(struct irq_data *data) -{ -} - -static void wm8994_edge_irq_disable(struct irq_data *data) -{ -} - -static struct irq_chip wm8994_edge_irq_chip =3D { - .name =3D "wm8994_edge", - .irq_disable =3D wm8994_edge_irq_disable, - .irq_enable =3D wm8994_edge_irq_enable, -}; - -static irqreturn_t wm8994_edge_irq(int irq, void *data) -{ - struct wm8994 *wm8994 =3D data; - - while (gpio_get_value_cansleep(wm8994->pdata.irq_gpio)) - handle_nested_irq(irq_find_mapping(wm8994->edge_irq, 0)); - - return IRQ_HANDLED; -} - -static int wm8994_edge_irq_map(struct irq_domain *h, unsigned int virq, - irq_hw_number_t hw) -{ - struct wm8994 *wm8994 =3D h->host_data; - - irq_set_chip_data(virq, wm8994); - irq_set_chip_and_handler(virq, &wm8994_edge_irq_chip, handle_edge_irq); - irq_set_nested_thread(virq, 1); - irq_set_noprobe(virq); - - return 0; -} - -static const struct irq_domain_ops wm8994_edge_irq_ops =3D { - .map =3D wm8994_edge_irq_map, - .xlate =3D irq_domain_xlate_twocell, -}; - int wm8994_irq_init(struct wm8994 *wm8994) { int ret; - unsigned long irqflags; - struct wm8994_pdata *pdata =3D &wm8994->pdata; =20 if (!wm8994->irq) { dev_warn(wm8994->dev, @@ -190,53 +146,11 @@ int wm8994_irq_init(struct wm8994 *wm8994) return 0; } =20 - /* select user or default irq flags */ - irqflags =3D IRQF_TRIGGER_HIGH | IRQF_ONESHOT; - if (pdata->irq_flags) - irqflags =3D pdata->irq_flags; - /* use a GPIO for edge triggered controllers */ - if (irqflags & (IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING)) { - if (gpio_to_irq(pdata->irq_gpio) !=3D wm8994->irq) { - dev_warn(wm8994->dev, "IRQ %d is not GPIO %d (%d)\n", - wm8994->irq, pdata->irq_gpio, - gpio_to_irq(pdata->irq_gpio)); - wm8994->irq =3D gpio_to_irq(pdata->irq_gpio); - } - - ret =3D devm_gpio_request_one(wm8994->dev, pdata->irq_gpio, - GPIOF_IN, "WM8994 IRQ"); - - if (ret !=3D 0) { - dev_err(wm8994->dev, "Failed to get IRQ GPIO: %d\n", - ret); - return ret; - } - - wm8994->edge_irq =3D irq_domain_create_linear(NULL, 1, &wm8994_edge_irq_= ops, wm8994); - - ret =3D regmap_add_irq_chip(wm8994->regmap, - irq_create_mapping(wm8994->edge_irq, - 0), - IRQF_ONESHOT, - wm8994->irq_base, &wm8994_irq_chip, - &wm8994->irq_data); - if (ret !=3D 0) { - dev_err(wm8994->dev, "Failed to get IRQ: %d\n", - ret); - return ret; - } - - ret =3D request_threaded_irq(wm8994->irq, - NULL, wm8994_edge_irq, - irqflags, - "WM8994 edge", wm8994); - } else { - ret =3D regmap_add_irq_chip(wm8994->regmap, wm8994->irq, - irqflags, - wm8994->irq_base, &wm8994_irq_chip, - &wm8994->irq_data); - } + ret =3D regmap_add_irq_chip(wm8994->regmap, wm8994->irq, + IRQF_TRIGGER_HIGH | IRQF_ONESHOT, + wm8994->irq_base, &wm8994_irq_chip, + &wm8994->irq_data); =20 if (ret !=3D 0) { dev_err(wm8994->dev, "Failed to register IRQ chip: %d\n", ret); diff --git a/include/linux/mfd/wm8994/pdata.h b/include/linux/mfd/wm8994/pd= ata.h index 6e2962ef5b81..b95a56a338c3 100644 --- a/include/linux/mfd/wm8994/pdata.h +++ b/include/linux/mfd/wm8994/pdata.h @@ -226,11 +226,6 @@ struct wm8994_pdata { * lines is mastered. */ int max_channels_clocked[WM8994_NUM_AIF]; - - /** - * GPIO for the IRQ pin if host only supports edge triggering - */ - int irq_gpio; }; =20 #endif --=20 2.39.5 From nobody Sun Oct 5 05:26:31 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 D969E2857E6; Fri, 8 Aug 2025 15:21:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754666492; cv=none; b=u+zifwoHkPBNIyoKmApwzwrXneJKbyMXpvl45HRfdcc/HbNP1oCU1m7xPy5nvU/EaVC9OtQCqmUyu26OGbt6kdIVd32AcxlKtjlBkmRcxw+ZBrolcd0KmCRIvkVmVlbHKt4/DiRj8C+/kWifrKwhEBwIEpPHwShpg00TLy1of4I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754666492; c=relaxed/simple; bh=ThCgznpMMMWkgStDQHqjK9eBTfpDlqOS3nFKQ6zpP9g=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=nFlMXpDxJKTR7JMDM9FDXsO0pOKFUR9F3Vm6K4JX3ZDB9zuelRF9WqXHerFKOwBnEtbAWlr8Z24UdrAnevFv42tCvX1NHOq2gn9y69jOiEbwBf9LDyYQ6a2Dh05Sd7FbkTXTVK+5uvoS/9CrNXkA78v1+PdZcABUM/B+tSF6FHI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=KwOAX1qu; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="KwOAX1qu" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B2A17C19424; Fri, 8 Aug 2025 15:21:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1754666491; bh=ThCgznpMMMWkgStDQHqjK9eBTfpDlqOS3nFKQ6zpP9g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KwOAX1qun9Vd1ACuNwj+0LT1IooLgenAvOLnlVpMJ7sB4PxvkfV33jlAWyP7x7Cib 4PRR1OkmAU9vytka5CZ4qzkB/0kzEzi2iL+LfWqJ/AtVfoQn5gz+ScFXQP+QT1brAt OIFUpXJ6RkA6/xOZ8vBa6r9GLV7Mn7kh2BdlmpI2S2n4JVCvvaLCJhELywMHxxtQ1J jdK+UTQ2ckOsJaVTcwxlfZeuE0hthmh4bcVgQgPZ9tf1rZz6+nHMlv9b4uVaIqQlu9 wHiIQPXlPAcpU1/VY+pLlpBBi4kEnZhVrfTPzoxB0Rzg89a6+xTVvq0gC/fOwcXmFX R5HF6GjXlG5kA== From: Arnd Bergmann To: Bartosz Golaszewski , Linus Walleij , linux-gpio@vger.kernel.org, Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Cc: Arnd Bergmann , ChiYuan Huang , Igor Prusov , Weidong Wang , Richard Fitzgerald , Binbin Zhou , Jack Yu , Shenghao Ding , Nuno Sa , =?UTF-8?q?Andr=C3=A9=20Apitzsch?= , linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 08/21] ASoC: add GPIOLIB_LEGACY dependency where needed Date: Fri, 8 Aug 2025 17:17:52 +0200 Message-Id: <20250808151822.536879-9-arnd@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250808151822.536879-1-arnd@kernel.org> References: <20250808151822.536879-1-arnd@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Arnd Bergmann In order to make the legacy gpiolib interfaces such as gpio_request() optional, mark the three ASoC driver that rely on it today with a dependency on the new Kconfig symbol. The tlv320dac33 and ak4641 drivers have no in-tree users, while the uda1380 driver is theoretically referened by two lpc3250 based boards, but neither of them work because of the legacy gpiolib dependency. Signed-off-by: Arnd Bergmann --- sound/soc/codecs/Kconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig index 6d7e4725d89c..759bcb8260cd 100644 --- a/sound/soc/codecs/Kconfig +++ b/sound/soc/codecs/Kconfig @@ -622,6 +622,7 @@ config SND_SOC_AK4619 config SND_SOC_AK4641 tristate depends on I2C + depends on GPIOLIB_LEGACY =20 config SND_SOC_AK4642 tristate "AKM AK4642 CODEC" @@ -2175,6 +2176,7 @@ config SND_SOC_TLV320AIC3X_SPI config SND_SOC_TLV320DAC33 tristate depends on I2C + depends on GPIOLIB_LEGACY =20 config SND_SOC_TLV320ADCX140 tristate "Texas Instruments TLV320ADCX140 CODEC family" @@ -2229,6 +2231,7 @@ config SND_SOC_UDA1342 config SND_SOC_UDA1380 tristate depends on I2C + depends on GPIOLIB_LEGACY =20 config SND_SOC_WCD_CLASSH tristate --=20 2.39.5 From nobody Sun Oct 5 05:26:31 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 19FFE2836AF; Fri, 8 Aug 2025 15:22:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754666530; cv=none; b=V39h8uFPolKtJXpgMPXrjXjjMAZJoIs7IzZVe0bMwBWMM2xKXT++q7DdwPVxOCBP4w+CE+5/P7saYjxQxYWOw7O7Kow+J5cCRMiZZzIgC7GkMbDWRI/4eLwPjwR675OKcWMId+sG+sca6evJYJQ46cBgjgSiiHq+0dgwqjsBCj8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754666530; c=relaxed/simple; bh=NWPfkLvSzYXpOS3JkL5/KajBbmF4O88cmr615YX9oHI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=XKn9Jt1HhbTNxl2BFWl2ASijj/VFEqfUImgaKzpiN5DPIdpPn2VK8l7NWm1AtCsaXcgRd+DhRDcgRPf2i/MG+ZFwoa4w22pCdAuBlZU+qgPLnMY0Ilm4w8rANrfhz8V1dWCpolDRVFjefZZexgBzDCnh7XM4DvdVA1Xo/+F6Tf0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=gs8U69l6; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="gs8U69l6" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6D141C4CEED; Fri, 8 Aug 2025 15:22:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1754666529; bh=NWPfkLvSzYXpOS3JkL5/KajBbmF4O88cmr615YX9oHI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gs8U69l6pTkBtbfrmTTcI1PVHkTpEocW8j7r53jtN+EIn8TwLb8RplwrfHIeFYG7V apMn0EbVyq9TKwD5X6kEwlsDRmB86149cDLTAjAF6rVZlZDjLTldLe+YgZ3rUlr0EW fbKNlG9g8VRyzbtDJHykKlhy4euYr48FsGOZfanSbBOmblz8XNedNjByLSnjyeiuJi 7KB0797CXA0MtwqJfOQ9+2rTVWSAMMZ4bxoQ8WckZt/TPGadYtnm5OuiDqQZWx/blk 8OL0ACb+7vkR7GJkzuSi8CNqMB5zsGVYAeDQ7TqMVZR1tUHLM6WzvJb6R5j5SSFT8O C6eEOZPvCJrwg== From: Arnd Bergmann To: Bartosz Golaszewski , Linus Walleij , linux-gpio@vger.kernel.org, Dmitry Torokhov , Matti Vaittinen , Lee Jones Cc: Arnd Bergmann , Gatien Chevallier , Fabrice Gasnier , Andy Shevchenko , Bartosz Golaszewski , Thomas Gleixner , Charles Keepax , Krzysztof Kozlowski , Christophe JAILLET , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 09/21] input: gpio-keys: make legacy gpiolib optional Date: Fri, 8 Aug 2025 17:17:53 +0200 Message-Id: <20250808151822.536879-10-arnd@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250808151822.536879-1-arnd@kernel.org> References: <20250808151822.536879-1-arnd@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Arnd Bergmann Most users of gpio-keys and gpio-keys-polled use modern gpiolib interfaces, but there are still number of ancient sh, arm32 and x86 machines that have never been converted. Add an #ifdef block for the parts of the driver that are only used on those legacy machines. Signed-off-by: Arnd Bergmann --- drivers/input/keyboard/gpio_keys.c | 5 +++-- drivers/input/keyboard/gpio_keys_polled.c | 2 ++ drivers/mfd/rohm-bd71828.c | 2 ++ drivers/mfd/rohm-bd718x7.c | 2 ++ include/linux/gpio_keys.h | 2 ++ 5 files changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gp= io_keys.c index f9db86da0818..984b20f773ed 100644 --- a/drivers/input/keyboard/gpio_keys.c +++ b/drivers/input/keyboard/gpio_keys.c @@ -528,6 +528,7 @@ static int gpio_keys_setup_key(struct platform_device *= pdev, */ bdata->gpiod =3D NULL; } +#ifdef CONFIG_GPIOLIB_LEGACY } else if (gpio_is_valid(button->gpio)) { /* * Legacy GPIO number, so request the GPIO here and @@ -546,6 +547,7 @@ static int gpio_keys_setup_key(struct platform_device *= pdev, =20 if (button->active_low ^ gpiod_is_active_low(bdata->gpiod)) gpiod_toggle_active_low(bdata->gpiod); +#endif } =20 if (bdata->gpiod) { @@ -583,8 +585,7 @@ static int gpio_keys_setup_key(struct platform_device *= pdev, if (irq < 0) { error =3D irq; dev_err_probe(dev, error, - "Unable to get irq number for GPIO %d\n", - button->gpio); + "Unable to get irq number for GPIO\n"); return error; } bdata->irq =3D irq; diff --git a/drivers/input/keyboard/gpio_keys_polled.c b/drivers/input/keyb= oard/gpio_keys_polled.c index e6707d72210e..0ae0e53910ea 100644 --- a/drivers/input/keyboard/gpio_keys_polled.c +++ b/drivers/input/keyboard/gpio_keys_polled.c @@ -301,6 +301,7 @@ static int gpio_keys_polled_probe(struct platform_devic= e *pdev) return dev_err_probe(dev, PTR_ERR(bdata->gpiod), "failed to get gpio\n"); } +#ifdef CONFIG_GPIOLIB_LEGACY } else if (gpio_is_valid(button->gpio)) { /* * Legacy GPIO number so request the GPIO here and @@ -323,6 +324,7 @@ static int gpio_keys_polled_probe(struct platform_devic= e *pdev) =20 if (button->active_low ^ gpiod_is_active_low(bdata->gpiod)) gpiod_toggle_active_low(bdata->gpiod); +#endif } =20 bdata->last_state =3D -1; diff --git a/drivers/mfd/rohm-bd71828.c b/drivers/mfd/rohm-bd71828.c index a14b7aa69c3c..fb68694fadca 100644 --- a/drivers/mfd/rohm-bd71828.c +++ b/drivers/mfd/rohm-bd71828.c @@ -21,7 +21,9 @@ =20 static struct gpio_keys_button button =3D { .code =3D KEY_POWER, +#ifdef CONFIG_GPIOLIB_LEGACY .gpio =3D -1, +#endif .type =3D EV_KEY, }; =20 diff --git a/drivers/mfd/rohm-bd718x7.c b/drivers/mfd/rohm-bd718x7.c index 25e494a93d48..6c99ab62e31b 100644 --- a/drivers/mfd/rohm-bd718x7.c +++ b/drivers/mfd/rohm-bd718x7.c @@ -20,7 +20,9 @@ =20 static struct gpio_keys_button button =3D { .code =3D KEY_POWER, +#ifdef CONFIG_GPIOLIB_LEGACY .gpio =3D -1, +#endif .type =3D EV_KEY, }; =20 diff --git a/include/linux/gpio_keys.h b/include/linux/gpio_keys.h index 80fa930b04c6..e8d6dc290efb 100644 --- a/include/linux/gpio_keys.h +++ b/include/linux/gpio_keys.h @@ -25,7 +25,9 @@ struct device; */ struct gpio_keys_button { unsigned int code; +#ifdef CONFIG_GPIOLIB_LEGACY int gpio; +#endif int active_low; const char *desc; unsigned int type; --=20 2.39.5 From nobody Sun Oct 5 05:26:31 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 4A2EC285063; Fri, 8 Aug 2025 15:22:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754666542; cv=none; b=mGSQmI7KzOmc1k2wzOBOHwTvfpR4AbWX44qGGgZXxxyolpRbppt1+vEbiYvaaOqYpy8iF68YffGsrDnIiG5pfexMj1Ote6w4YDtjMHO7ut40NerkAuWDvfOMog4Gz2rMEhMtjC/E4sSWbPnKluCwpwtd3JdGvPhUC7Uwy1FoUHs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754666542; c=relaxed/simple; bh=Rsa80nsfI+kc8HXUdwAuqZOmhTLHnOi2TSgx9oPYmQA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=m+c47gtYppYdiSHSltJlOcZri0DoNCwBZm7CzjX4W+yHpuL+qhARn/sPf/ZQrzq69e9PpNdGloGDo5Nn7sAeWYHpQ7z+3hS4fsrLhVhXJas5CUIDTFnZfU1pVj3WIDyh0edrK0fDMYZgVCBl6ZQp19Z63y+ElRi0Zn/QcD9eVj0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Rlmv0my5; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Rlmv0my5" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C554BC4CEF7; Fri, 8 Aug 2025 15:22:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1754666541; bh=Rsa80nsfI+kc8HXUdwAuqZOmhTLHnOi2TSgx9oPYmQA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Rlmv0my5qzqgX2Dt8yivi4jZu/nHvszgWyaeVbBRGBTr0eqIA5nuoLeSuRdZlN5Zf WZu/1ajnwGxRqV/Aa2bQqsw+SFC+okyPb1kICwr3izRgLSJxOTPO9n+ra1xRbWN9+R a1DM99RimFyRZpecAXbLPY2VD+6az4zJ+O56mgmBsHTDDvAkKKYBc6zQV9+KBu7jjX +8jIwwmwXmnGsu38qAvishI8usebT6AOtnhtd4thmFPTw1sSMYwpX5oQYOBGkw3IK4 4z9z8czhyZk+Tyi0Q9cWPMnp6dzispnTyvsF2y3Tt6LhUsSo3ZgL0L/F/5azbsa3xg zjfTJxeEeYsgA== From: Arnd Bergmann To: Bartosz Golaszewski , Linus Walleij , linux-gpio@vger.kernel.org, Lee Jones , Pavel Machek Cc: Arnd Bergmann , Javier Carrasco , "Gustavo A. R. Silva" , Andy Shevchenko , Kees Cook , Anish Kumar , Mukesh Ojha , Thomas Zimmermann , Dmitry Rokosov , linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 10/21] leds: gpio: make legacy gpiolib interface optional Date: Fri, 8 Aug 2025 17:17:54 +0200 Message-Id: <20250808151822.536879-11-arnd@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250808151822.536879-1-arnd@kernel.org> References: <20250808151822.536879-1-arnd@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Arnd Bergmann There are still a handful of ancient mips/armv5/sh boards that use the gpio_led:gpio member to pass an old-style gpio number, but all modern users have been converted to gpio descriptors. Make the code that deals with this optional so the legacy interfaces can be left out for all normal builds. Signed-off-by: Arnd Bergmann Reviewed-by: Linus Walleij --- drivers/leds/leds-gpio.c | 8 ++++++-- include/linux/leds.h | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/leds/leds-gpio.c b/drivers/leds/leds-gpio.c index a3428b22de3a..e43accfa78e9 100644 --- a/drivers/leds/leds-gpio.c +++ b/drivers/leds/leds-gpio.c @@ -212,7 +212,9 @@ static struct gpio_desc *gpio_led_get_gpiod(struct devi= ce *dev, int idx, const struct gpio_led *template) { struct gpio_desc *gpiod; +#ifdef CONFIG_GPIOLIB_LEGACY int ret; +#endif =20 /* * This means the LED does not come from the device tree @@ -228,6 +230,7 @@ static struct gpio_desc *gpio_led_get_gpiod(struct devi= ce *dev, int idx, return gpiod; } =20 +#ifdef CONFIG_GPIOLIB_LEGACY /* * This is the legacy code path for platform code that * still uses GPIO numbers. Ultimately we would like to get @@ -244,6 +247,7 @@ static struct gpio_desc *gpio_led_get_gpiod(struct devi= ce *dev, int idx, return ERR_PTR(ret); =20 gpiod =3D gpio_to_desc(template->gpio); +#endif if (!gpiod) return ERR_PTR(-EINVAL); =20 @@ -276,8 +280,8 @@ static int gpio_led_probe(struct platform_device *pdev) led_dat->gpiod =3D gpio_led_get_gpiod(dev, i, template); if (IS_ERR(led_dat->gpiod)) { - dev_info(dev, "Skipping unavailable LED gpio %d (%s)\n", - template->gpio, template->name); + dev_info(dev, "Skipping unavailable LED gpio %s\n", + template->name); continue; } =20 diff --git a/include/linux/leds.h b/include/linux/leds.h index b16b803cc1ac..034643f40152 100644 --- a/include/linux/leds.h +++ b/include/linux/leds.h @@ -676,7 +676,9 @@ typedef int (*gpio_blink_set_t)(struct gpio_desc *desc,= int state, struct gpio_led { const char *name; const char *default_trigger; +#ifdef CONFIG_GPIOLIB_LEGACY unsigned gpio; +#endif unsigned active_low : 1; unsigned retain_state_suspended : 1; unsigned panic_indicator : 1; --=20 2.39.5 From nobody Sun Oct 5 05:26:31 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 5DDA6285417; Fri, 8 Aug 2025 15:22:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754666550; cv=none; b=jzkf2KpiCyRWYPHnW7QF45BHqePmKioI9AGYZf4F+WvDh+CFOd+dnmMzp35KtgZ0tbjqcERjs/N4ZinQLAwFDz2ICPYWcuN9jRZGXkSsV8orsJ9hd6KxRdLfoXD8GAN83kWhs/Fse07h7ljMyf+ECclpDKjKnT4vkhX+l/OPptU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754666550; c=relaxed/simple; bh=76MpyQgmZefPDK6A+dtSLh6pRCK3T1QGcQVGiHd0WN4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ab5auPOwjrOvmrMyP6045eqUPJ6L0mwuR9EJFxcjjynBDI0hd/u8IUuJvt+vlypOmgrO7jv96IdBkILaE+4jaaK+BTPLlXDsL4O2q2e8si/mhQCAhXqjV5GPvqcZmp1tjeAANpZwdUL72Tdj79COC0nWqGSXgdxWwiAKiVdTPlE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Y6MVeCi2; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Y6MVeCi2" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7AA8CC4CEF4; Fri, 8 Aug 2025 15:22:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1754666550; bh=76MpyQgmZefPDK6A+dtSLh6pRCK3T1QGcQVGiHd0WN4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Y6MVeCi2p+89sktC3Hd+gd36a4WmsiSoctBr7nropIwhx3JsxONcVsUb27Twlj2ad 6513Z6xGJT7mmKhOfnlhcw78otf/eSI9YUq5J4wKQ7ZSxHaiVB7n5ZgQ4Laz0XhdXe OvSddarraZ76jsZjjVS7NA7i247P5MlbzUl1wavs//p/IapWxWCO4eSdlygopN5/U7 IJRbgretxjSIAQGKCOHE1LNYldK++10EkVV5cMadQOc2aemMm/O1cdveMGVFkna2yJ NkKVD/VCjTYelzD/qBkHuzhjY6hORA1Hy33sYDfMYEJ2L5juYpuMJq4hZXUuhkFfDN xD1qMCj0XebnA== From: Arnd Bergmann To: Bartosz Golaszewski , Linus Walleij , linux-gpio@vger.kernel.org, Mauro Carvalho Chehab Cc: Arnd Bergmann , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 11/21] media: em28xx: add special case for legacy gpiolib interface Date: Fri, 8 Aug 2025 17:17:55 +0200 Message-Id: <20250808151822.536879-12-arnd@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250808151822.536879-1-arnd@kernel.org> References: <20250808151822.536879-1-arnd@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Arnd Bergmann The em28xx driver uses the old-style gpio_request_one() inteface to switch the lna on the PCTV 290E card. This interface is becoming optional and should no longer be called by portable drivers. As I could not figure out an obvious replacement, select the new GPIOLIB_LEGACY symbol as a workaround. Signed-off-by: Arnd Bergmann --- drivers/media/usb/em28xx/Kconfig | 1 + drivers/media/usb/em28xx/em28xx-dvb.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/media/usb/em28xx/Kconfig b/drivers/media/usb/em28xx/Kc= onfig index cb61fd6cc6c6..3122d4bdfc59 100644 --- a/drivers/media/usb/em28xx/Kconfig +++ b/drivers/media/usb/em28xx/Kconfig @@ -68,6 +68,7 @@ config VIDEO_EM28XX_DVB select MEDIA_TUNER_XC5000 if MEDIA_SUBDRV_AUTOSELECT select MEDIA_TUNER_MT2060 if MEDIA_SUBDRV_AUTOSELECT select DVB_MXL692 if MEDIA_SUBDRV_AUTOSELECT + select GPIOLIB_LEGACY if GPIOLIB && DVB_CXD2820R help This adds support for DVB cards based on the Empiatech em28xx chips. diff --git a/drivers/media/usb/em28xx/em28xx-dvb.c b/drivers/media/usb/em28= xx/em28xx-dvb.c index 9fce59979e3b..b94f5c70ab75 100644 --- a/drivers/media/usb/em28xx/em28xx-dvb.c +++ b/drivers/media/usb/em28xx/em28xx-dvb.c @@ -727,7 +727,7 @@ static int em28xx_pctv_290e_set_lna(struct dvb_frontend= *fe) struct dtv_frontend_properties *c =3D &fe->dtv_property_cache; struct em28xx_i2c_bus *i2c_bus =3D fe->dvb->priv; struct em28xx *dev =3D i2c_bus->dev; -#ifdef CONFIG_GPIOLIB +#ifdef CONFIG_GPIOLIB_LEGACY struct em28xx_dvb *dvb =3D dev->dvb; int ret; unsigned long flags; @@ -1705,7 +1705,7 @@ static int em28xx_dvb_init(struct em28xx *dev) goto out_free; } =20 -#ifdef CONFIG_GPIOLIB +#ifdef CONFIG_GPIOLIB_LEGACY /* enable LNA for DVB-T, DVB-T2 and DVB-C */ result =3D gpio_request_one(dvb->lna_gpio, GPIOF_OUT_INIT_LOW, NULL); --=20 2.39.5 From nobody Sun Oct 5 05:26:31 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 293922836A4; Fri, 8 Aug 2025 15:22:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754666564; cv=none; b=KgJ5EwlVjtwaWjcnlFsj/Qz8E5nQEtgA66BZ3DYc8CqFQF1Vwk5xbEHDEc+Lmdb1lwxlZ6lu5zwaUQpVYn4f0D52duyFVPuJT4FDazbgJBilQ3qki52FkVXPxOiFwSAuhiNd6y4KCQ5gu1VeCdaixLY6Uez3o+tc/dwrvKdZbFs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754666564; c=relaxed/simple; bh=zmHMo93j0L5Snrv0b67PtRKhF2uXz8MO7dYX49srANA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=lzInjya0dfZJUdK3c2epWfPuCvcetmC9xCvBaUQb8c4E74Af6xXl1J5voNbe/b0rtDPUiA0RilTh/oQJBF/z392AXBq7vECxGe4no22oyg8yc6Gi1zEFTaw83DpplYixN1wLcmb9yB+wTrl6w0i5nxOkiNV0Vd/wz3J+kvj/dG8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ZsI4smAA; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ZsI4smAA" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C56BAC4CEED; Fri, 8 Aug 2025 15:22:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1754666563; bh=zmHMo93j0L5Snrv0b67PtRKhF2uXz8MO7dYX49srANA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZsI4smAADw7Mj0ZHDY+AAyS4BD7Q69MT4wmaP8sOLCsH73gnLHQvZmH/4xOz96hX9 a6vHRUMq3QHHb1xkLeLWq4okKm4dT3iM0miv3Iv7dfM8uU6kwRN+YtHXC6GSBs3yRh fhQ39dbxrbNt/xtS7Rh1nbl6DdpHedgzrFq2llleBOUaaLXyO0sHDYydj9tprQWFaT cTtsTiPNtOrLpoaSe0LF4GbMcDQta7j2hhT3MV+TBCHMzpR3qMt7XGhajaAF7XltkF vohbWZOlb9zulLkMUYpSpt92qG2b3nVsX943eITVLKfMEVrFukAOl6XIIFntkVWN4y hZoEOs8k9bdCA== From: Arnd Bergmann To: Bartosz Golaszewski , Linus Walleij , linux-gpio@vger.kernel.org, Lee Jones , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Cc: Arnd Bergmann , "Jiri Slaby (SUSE)" , Sakari Ailus , Charles Keepax , patches@opensource.cirrus.com, linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org Subject: [PATCH 12/21] mfd: arizona: make legacy gpiolib interface optional Date: Fri, 8 Aug 2025 17:17:56 +0200 Message-Id: <20250808151822.536879-13-arnd@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250808151822.536879-1-arnd@kernel.org> References: <20250808151822.536879-1-arnd@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Arnd Bergmann The only machine that still uses the old gpio number based interface is the wlf_cragg_6410 board file. In order to remove the dependency on the interfaces, add #ifdef blocks here. Signed-off-by: Arnd Bergmann --- drivers/mfd/arizona-irq.c | 5 ++++- include/linux/mfd/arizona/pdata.h | 6 ++++++ sound/soc/codecs/arizona-jack.c | 17 ++++++++++++++++- 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/drivers/mfd/arizona-irq.c b/drivers/mfd/arizona-irq.c index 3f8622ee0e59..544016d420fe 100644 --- a/drivers/mfd/arizona-irq.c +++ b/drivers/mfd/arizona-irq.c @@ -136,7 +136,7 @@ static irqreturn_t arizona_irq_thread(int irq, void *da= ta) dev_err(arizona->dev, "Failed to read main IRQ status: %d\n", ret); } - +#ifdef CONFIG_GPIOLIB_LEGACY /* * Poll the IRQ pin status to see if we're really done * if the interrupt controller can't do it for us. @@ -150,6 +150,7 @@ static irqreturn_t arizona_irq_thread(int irq, void *da= ta) !gpio_get_value_cansleep(arizona->pdata.irq_gpio)) { poll =3D true; } +#endif } while (poll); =20 pm_runtime_put_autosuspend(arizona->dev); @@ -349,6 +350,7 @@ int arizona_irq_init(struct arizona *arizona) goto err_map_main_irq; } =20 +#ifdef CONFIG_GPIOLIB_LEGACY /* Used to emulate edge trigger and to work around broken pinmux */ if (arizona->pdata.irq_gpio) { if (gpio_to_irq(arizona->pdata.irq_gpio) !=3D arizona->irq) { @@ -368,6 +370,7 @@ int arizona_irq_init(struct arizona *arizona) arizona->pdata.irq_gpio =3D 0; } } +#endif =20 ret =3D request_threaded_irq(arizona->irq, NULL, arizona_irq_thread, flags, "arizona", arizona); diff --git a/include/linux/mfd/arizona/pdata.h b/include/linux/mfd/arizona/= pdata.h index 2d13bbea4f3a..f72e6d4b14a7 100644 --- a/include/linux/mfd/arizona/pdata.h +++ b/include/linux/mfd/arizona/pdata.h @@ -117,8 +117,10 @@ struct arizona_pdata { /** Check for line output with HPDET method */ bool hpdet_acc_id_line; =20 +#ifdef CONFIG_GPIOLIB_LEGACY /** GPIO used for mic isolation with HPDET */ int hpdet_id_gpio; +#endif =20 /** Channel to use for headphone detection */ unsigned int hpdet_channel; @@ -129,8 +131,10 @@ struct arizona_pdata { /** Extra debounce timeout used during initial mic detection (ms) */ unsigned int micd_detect_debounce; =20 +#ifdef CONFIG_GPIOLIB_LEGACY /** GPIO for mic detection polarity */ int micd_pol_gpio; +#endif =20 /** Mic detect ramp rate */ unsigned int micd_bias_start_time; @@ -184,8 +188,10 @@ struct arizona_pdata { /** Haptic actuator type */ unsigned int hap_act; =20 +#ifdef CONFIG_GPIOLIB_LEGACY /** GPIO for primary IRQ (used for edge triggered emulation) */ int irq_gpio; +#endif =20 /** General purpose switch control */ unsigned int gpsw; diff --git a/sound/soc/codecs/arizona-jack.c b/sound/soc/codecs/arizona-jac= k.c index 22f9c431a0e5..6b55610ad535 100644 --- a/sound/soc/codecs/arizona-jack.c +++ b/sound/soc/codecs/arizona-jack.c @@ -461,7 +461,11 @@ static int arizona_hpdet_do_id(struct arizona_priv *in= fo, int *reading, bool *mic) { struct arizona *arizona =3D info->arizona; +#ifdef CONFIG_GPIOLIB_LEGACY int id_gpio =3D arizona->pdata.hpdet_id_gpio; +#else + int id_gpio =3D 0; +#endif =20 if (!arizona->pdata.hpdet_acc_id) return 0; @@ -472,6 +476,7 @@ static int arizona_hpdet_do_id(struct arizona_priv *inf= o, int *reading, */ info->hpdet_res[info->num_hpdet_res++] =3D *reading; =20 +#ifdef CONFIG_GPIOLIB_LEGACY /* Only check the mic directly if we didn't already ID it */ if (id_gpio && info->num_hpdet_res =3D=3D 1) { dev_dbg(arizona->dev, "Measuring mic\n"); @@ -489,6 +494,7 @@ static int arizona_hpdet_do_id(struct arizona_priv *inf= o, int *reading, ARIZONA_HP_POLL, ARIZONA_HP_POLL); return -EAGAIN; } +#endif =20 /* OK, got both. Now, compare... */ dev_dbg(arizona->dev, "HPDET measured %d %d\n", @@ -529,7 +535,9 @@ static irqreturn_t arizona_hpdet_irq(int irq, void *dat= a) { struct arizona_priv *info =3D data; struct arizona *arizona =3D info->arizona; +#ifdef CONFIG_GPIOLIB_LEGACY int id_gpio =3D arizona->pdata.hpdet_id_gpio; +#endif int ret, reading, state, report; bool mic =3D false; =20 @@ -585,8 +593,10 @@ static irqreturn_t arizona_hpdet_irq(int irq, void *da= ta) =20 arizona_extcon_hp_clamp(info, false); =20 +#ifdef CONFIG_GPIOLIB_LEGACY if (id_gpio) gpio_set_value_cansleep(id_gpio, 0); +#endif =20 /* If we have a mic then reenable MICDET */ if (state && (mic || info->mic)) @@ -1317,6 +1327,7 @@ int arizona_jack_codec_dev_probe(struct arizona_priv = *info, struct device *dev) regmap_update_bits(arizona->regmap, ARIZONA_GP_SWITCH_1, ARIZONA_SW1_MODE_MASK, arizona->pdata.gpsw); =20 +#ifdef CONFIG_GPIOLIB_LEGACY if (pdata->micd_pol_gpio > 0) { if (info->micd_modes[0].gpio) mode =3D GPIOF_OUT_INIT_HIGH; @@ -1332,7 +1343,9 @@ int arizona_jack_codec_dev_probe(struct arizona_priv = *info, struct device *dev) } =20 info->micd_pol_gpio =3D gpio_to_desc(pdata->micd_pol_gpio); - } else { + } else +#endif + { if (info->micd_modes[0].gpio) mode =3D GPIOD_OUT_HIGH; else @@ -1353,6 +1366,7 @@ int arizona_jack_codec_dev_probe(struct arizona_priv = *info, struct device *dev) } } =20 +#ifdef CONFIG_GPIOLIB_LEGACY if (arizona->pdata.hpdet_id_gpio > 0) { ret =3D devm_gpio_request_one(dev, arizona->pdata.hpdet_id_gpio, GPIOF_OUT_INIT_LOW, @@ -1364,6 +1378,7 @@ int arizona_jack_codec_dev_probe(struct arizona_priv = *info, struct device *dev) return ret; } } +#endif =20 return 0; } --=20 2.39.5 From nobody Sun Oct 5 05:26:31 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 5F93B284B33; Fri, 8 Aug 2025 15:23:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754666601; cv=none; b=TZQ9oym1vsFhlisDGLyJkQHUnhYcPoO1c+MbzRFFR8mQMMDrMyRWziQGcTFWojRw4ZBZJWMkJ6HuF78rJilF3b7JwSZ0Z0jjEcaW/WIa7Ynfz5C/MGB6YRXL8AeKyp+JtuMtSkou18tRO9TT2YKN3GFa6wyNVCqC9QW2XFPc5Y0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754666601; c=relaxed/simple; bh=V4JmB2szthDEq+aKg+Xa7ToR9O5+5pVOjG/0EWTfRoo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ZwUaM9Mi0Lkp/cck+1LQ6UM35wijI+UffNBRBu7fD1Y5PyKrYE0W81wI61bheOCVM8Ayty3RaAuKdhe1OfPeUstvc197PB/GxIl4KLjW9mgQfT1V3td+/r3XiWMFwEU2LvC6Oxlgbyk6plkxUpEiJcB9o6mhwyEQzRfZwPo3L8w= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=JLTcRbPF; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="JLTcRbPF" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CB0FCC4CEED; Fri, 8 Aug 2025 15:23:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1754666601; bh=V4JmB2szthDEq+aKg+Xa7ToR9O5+5pVOjG/0EWTfRoo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JLTcRbPF7331ZBxpI4Gi2vwix+7gV/qIKvuu0Dfq0K50q3gsKbWJX52Emvh2GcWsH Y3oV4fC99Sxhyb9l+K8Fvj115XSpSxjcB+lI7bve2yUF4UnbyweYaMKq9mjTkkdFv3 r++MoM8BxAa4TZECJWmQ7/aVlKu7UA2VPulozs/zN4nqwWRnA2U6C9kHcIBY624306 h8lrrKo9Cc251MyOrEqd0wUQWP0vsLnJeCcP3shYuEpnA8xMbw7d+H63k8RJ/CLEaE Fv1aaRQEbQfDnNStAaoSEJSzTU+teWbAGTrTy/G1YqHQuauSQDy/e7esmTZpa0j4Ek y1fDROLoSs0cQ== From: Arnd Bergmann To: Bartosz Golaszewski , Linus Walleij , linux-gpio@vger.kernel.org, Lee Jones , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Cc: Arnd Bergmann , kernel test robot , "Dr. David Alan Gilbert" , =?UTF-8?q?Andr=C3=A9=20Draszik?= , Krzysztof Kozlowski , Thomas Richard , Charles Keepax , linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org Subject: [PATCH 13/21] mfd: si476x: add GPIOLIB_LEGACY dependency Date: Fri, 8 Aug 2025 17:17:57 +0200 Message-Id: <20250808151822.536879-14-arnd@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250808151822.536879-1-arnd@kernel.org> References: <20250808151822.536879-1-arnd@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Arnd Bergmann This driver uses the legacy gpiolib interfaces to get gpio numbers from platform data: drivers/mfd/si476x-i2c.c: In function 'si476x_core_start': drivers/mfd/si476x-i2c.c:133:21: error: implicit declaration of function= 'gpio_is_valid'; did you mean 'uuid_is_valid'? [-Werror=3Dimplicit-functio= n-declaration] 133 | if (gpio_is_valid(core->gpio_reset)) There are no in-tree users of this driver, so nothing defines the platform data. Add a dependency on GPIOLIB_LEGACY for the moment to avoid the build failure, and make sure the sound driver does not get built without the mfd portion either pass that dependency along. Alternatively, we could remove the mfd driver along with the radio and sound portions. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202507231653.UFlH2dMO-lkp@int= el.com/ Signed-off-by: Arnd Bergmann --- drivers/mfd/Kconfig | 1 + sound/soc/codecs/Kconfig | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig index 425c5fba6cb1..6d52a3d22430 100644 --- a/drivers/mfd/Kconfig +++ b/drivers/mfd/Kconfig @@ -1411,6 +1411,7 @@ config MFD_SEC_I2C config MFD_SI476X_CORE tristate "Silicon Laboratories 4761/64/68 AM/FM radio." depends on I2C + depends on GPIOLIB_LEGACY select MFD_CORE select REGMAP_I2C help diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig index 759bcb8260cd..9d5b449fa747 100644 --- a/sound/soc/codecs/Kconfig +++ b/sound/soc/codecs/Kconfig @@ -1903,6 +1903,7 @@ config SND_SOC_SGTL5000 =20 config SND_SOC_SI476X tristate + depends on MFD_SI476X_CORE =20 config SND_SOC_SIGMADSP tristate --=20 2.39.5 From nobody Sun Oct 5 05:26:31 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 A06BC286402; Fri, 8 Aug 2025 15:23:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754666611; cv=none; b=JzlKKZ660UaQhbuSe11lssnbikN7cjl07DnrCTM43Js2bDKv6z2Inr1OhDwk/5+v7gpI5vV/m8kgdOwL33xwJgrRlrJXIriMW/3iPEpWltIJQHwVvhtQ7V/RmZinWDHMF0J+Pgi/QXpOT5V9N1c9lppx3NFU+fNahq10O9rmkTs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754666611; c=relaxed/simple; bh=QyoziH7eFTjreQvo7zxyM6YBQswPsmGNJzt+Kj9c6W8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=sb6QNviWoOCqDi0N6+YZkgMT86gSdpn2jddBXimrGfOZx1Gz47qSO5UT1qgsilGt+lEeddo9IMqmE5BZdg1Idj8WINjyZHq5AKUY5sxhd0OAuR8o3xSAAG7yOYO3cyW2z1pUzSdx0KZjX86Ypc1w4TeK56iXIb6BqrgeEF7vjIg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=CmUgA3UX; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="CmUgA3UX" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D0969C4CEF7; Fri, 8 Aug 2025 15:23:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1754666611; bh=QyoziH7eFTjreQvo7zxyM6YBQswPsmGNJzt+Kj9c6W8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CmUgA3UXSAtleN8QCMePagd3fwknaAzrvBF/OoK+8YWnk/lPGIOCe7YLtmQBleUXL 10xPoRK0s0EDVkXURb2azrQfYNEqmFBHIfRIyWPG0h/wLFbfrOYDi7E0flh7D7LXrJ zgYoLTLRRuXF1PBP0WVWOzGDjQmgVqg1nT30UL//5arcbw/pUKTXsuBBuajIxXgL/x 812m9iGYZBZKjhRIPNZM4vmDPeimEdZrAFLwkTNoG7MmHDSVe0IH23y30MXqqRDNe2 oCecdALkF7w6SDhUqP4wDbcskpQ/jPEOlwEVN673UNug47C/nvZdb5bQ+z2Wd+NZ+V 3LwS8HngVOOLQ== From: Arnd Bergmann To: Bartosz Golaszewski , Linus Walleij , linux-gpio@vger.kernel.org, Lee Jones Cc: Arnd Bergmann , "Dr. David Alan Gilbert" , =?UTF-8?q?Andr=C3=A9=20Draszik?= , Thomas Richard , Robert Marko , Charles Keepax , Sven Peter , Heiko Stuebner , Lukas Bulwahn , linux-kernel@vger.kernel.org Subject: [PATCH 14/21] mfd: aat2870: add GPIOLIB_LEGACY dependency Date: Fri, 8 Aug 2025 17:17:58 +0200 Message-Id: <20250808151822.536879-15-arnd@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250808151822.536879-1-arnd@kernel.org> References: <20250808151822.536879-1-arnd@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Arnd Bergmann This driver uses the legacy gpiolib interfaces to get gpio numbers from platform data. There are no in-tree users of this driver, so nothing defines the platform data. Add a dependency on GPIOLIB_LEGACY for the moment to avoid the build failure, and make sure the sound driver does not get built without the mfd portion either pass that dependency along. Alternatively, we could remove the mfd driver along with the backlight and regulator portions. Signed-off-by: Arnd Bergmann --- drivers/mfd/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig index 6d52a3d22430..d2bb88bd5917 100644 --- a/drivers/mfd/Kconfig +++ b/drivers/mfd/Kconfig @@ -129,6 +129,7 @@ config MFD_AAT2870_CORE select MFD_CORE depends on I2C=3Dy depends on GPIOLIB || COMPILE_TEST + depends on GPIOLIB_LEGACY help If you say yes here you get support for the AAT2870. This driver provides common support for accessing the device, --=20 2.39.5 From nobody Sun Oct 5 05:26:31 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 ECDC4286892; Fri, 8 Aug 2025 15:23:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754666627; cv=none; b=oKwlz8sfp6gVkBtOrK2R8INmrUtLXWfhSSidC/Kzt1jBAfvMA2NMwKhXrJXylZRRjYR/lZi2adgFWG/ETyY/FNcPqq7nK5GezTvKD6uTaaCBEvkkwpvZ7/vMOpYfKz6aXFfegYqCtFeck+CoRRH75glqs/lAIzmWt6Z8VwVcPuw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754666627; c=relaxed/simple; bh=Kb1FD+hpLQzBSNB/gTjqbR+cwX9zm9IL2DeUUYXs+lA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=k/N0P/IjDEeQtelkffg2u0mDtcWsyrl4a/5VqR72LsvVolLsnayJC/vr8VfbVnj4LQMlPCCIH1KC9t2lHHIkbgd8K0svnKMmIESzwlD+x0FmGaDHspDvjHWMLqbRu3gJaVymDkxe9vWSMAlEnx+Jr+ApgdIfaJzjIm0IuUXVbd4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=eCXQAgXR; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="eCXQAgXR" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 94989C4CEF4; Fri, 8 Aug 2025 15:23:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1754666626; bh=Kb1FD+hpLQzBSNB/gTjqbR+cwX9zm9IL2DeUUYXs+lA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eCXQAgXRmHo3wEbv5T2uyTCRFDcRydPQl1RR+oH0rHNDwAfLrgQLETEDwmv67dRxw fRYgBnBAeaJ6XAiGEtqSJaYt5V5KL/EfibsGi5krrvGs0LTS/7iLCzdoA4UQjUL4hF wnWr5CyjZzGuMIYnNoEO0TnkRuyZLPK/Vx/HOyPLRfsRgmTfTX/gJvdeieF+6Uejb9 l82lSfUiFV4d0ttNEGGNU8BqK+hHeZCVAJtcspHUR1LYh0yo7nko/iakiYdBFT5AZz 9I9vPxfCMtbSNAFkvqCFhmwqPOF/FkZYM1wx5Gsrz/Y/Msg4/gW68iWEsufWi0A1yD 6k6C2Jkwh/LjA== From: Arnd Bergmann To: Bartosz Golaszewski , Linus Walleij , linux-gpio@vger.kernel.org, Florian Fainelli , Andrew Lunn , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: Arnd Bergmann , Jonas Gorski , =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= , Kyle Hendry , "Russell King (Oracle)" , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 15/21] dsa: b53: hide legacy gpiolib usage on non-mips Date: Fri, 8 Aug 2025 17:17:59 +0200 Message-Id: <20250808151822.536879-16-arnd@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250808151822.536879-1-arnd@kernel.org> References: <20250808151822.536879-1-arnd@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Arnd Bergmann The MIPS bcm53xx platform still uses the legacy gpiolib interfaces based on gpio numbers, but other platforms do not. Hide these interfaces inside of the existing #ifdef block and use the modern interfaces in the common parts of the driver to allow building it when the gpio_set_value() is left out of the kernel. Signed-off-by: Arnd Bergmann Reviewed-by: Jonas Gorski --- drivers/net/dsa/b53/b53_common.c | 17 +++++------------ drivers/net/dsa/b53/b53_priv.h | 24 ++++++++++++++++++------ 2 files changed, 23 insertions(+), 18 deletions(-) diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_com= mon.c index 9942fb6f7f4b..cb57bcc56c63 100644 --- a/drivers/net/dsa/b53/b53_common.c +++ b/drivers/net/dsa/b53/b53_common.c @@ -19,7 +19,7 @@ =20 #include #include -#include +#include #include #include #include @@ -948,17 +948,17 @@ EXPORT_SYMBOL(b53_configure_vlan); =20 static void b53_switch_reset_gpio(struct b53_device *dev) { - int gpio =3D dev->reset_gpio; + struct gpio_desc *gpio =3D dev->reset_gpio; =20 - if (gpio < 0) + if (IS_ERR(gpio)) return; =20 /* Reset sequence: RESET low(50ms)->high(20ms) */ - gpio_set_value(gpio, 0); + gpiod_set_value(gpio, 0); mdelay(50); =20 - gpio_set_value(gpio, 1); + gpiod_set_value(gpio, 1); mdelay(20); =20 dev->current_page =3D 0xff; @@ -2925,7 +2925,6 @@ static int b53_switch_init(struct b53_device *dev) { u32 chip_id =3D dev->chip_id; unsigned int i; - int ret; =20 if (is63xx(dev)) chip_id =3D BCM63XX_DEVICE_ID; @@ -3005,12 +3004,6 @@ static int b53_switch_init(struct b53_device *dev) return -ENOMEM; =20 dev->reset_gpio =3D b53_switch_get_reset_gpio(dev); - if (dev->reset_gpio >=3D 0) { - ret =3D devm_gpio_request_one(dev->dev, dev->reset_gpio, - GPIOF_OUT_INIT_HIGH, "robo_reset"); - if (ret) - return ret; - } =20 return 0; } diff --git a/drivers/net/dsa/b53/b53_priv.h b/drivers/net/dsa/b53/b53_priv.h index 458775f95164..16e82653a7c6 100644 --- a/drivers/net/dsa/b53/b53_priv.h +++ b/drivers/net/dsa/b53/b53_priv.h @@ -136,7 +136,7 @@ struct b53_device { u8 duplex_reg; u8 jumbo_pm_reg; u8 jumbo_size_reg; - int reset_gpio; + struct gpio_desc *reset_gpio; u8 num_arl_bins; u16 num_arl_buckets; enum dsa_tag_protocol tag_protocol; @@ -375,22 +375,34 @@ static inline void b53_arl_from_entry_25(u64 *mac_vid, =20 #include #include -static inline int b53_switch_get_reset_gpio(struct b53_device *dev) +static inline gpio_desc *b53_switch_get_reset_gpio(struct b53_device *dev) { enum bcm47xx_board board =3D bcm47xx_board_get(); + int gpio, ret; =20 switch (board) { case BCM47XX_BOARD_LINKSYS_WRT300NV11: case BCM47XX_BOARD_LINKSYS_WRT310NV1: - return 8; + gpio =3D 8; + break; default: - return bcm47xx_nvram_gpio_pin("robo_reset"); + gpio =3D bcm47xx_nvram_gpio_pin("robo_reset"); } + + if (!gpio_is_valid(gpio)) + return ERR_PTR(-EINVAL); + + ret =3D devm_gpiod_request_one(dev->dev, gpio, + GPIOF_OUT_INIT_HIGH, "robo_reset"); + if (ret) + return ERR_PTR(ret); + + return gpio_to_desc(gpio); } #else -static inline int b53_switch_get_reset_gpio(struct b53_device *dev) +static inline struct gpio_desc *b53_switch_get_reset_gpio(struct b53_devic= e *dev) { - return -ENOENT; + return ERR_PTR(-ENODEV); } #endif =20 --=20 2.39.5 From nobody Sun Oct 5 05:26:31 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 97182284688; Fri, 8 Aug 2025 15:23:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754666634; cv=none; b=rjUKu2C7DibUr7fpgl85c45on3xWi2r5Kn3Kt3TOtmFfQVzw3IgRBIe1dlzf3ZQlLeXorSLKRO2LLqulbCRnUvQY4fVE8nmK5gXTxZb6GGK5v4LFpvcRxL2TPOx8V2I6rq64IGYh3Xu51zD+vDaLiV6WbthKhDJUPHtm4VzruZU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754666634; c=relaxed/simple; bh=oAFQA9TbeQJ0JUZrMnAe5qsvI2i9waFhIJMusddsYPc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=UJOozUpC5ThoBUv9lrubJXmmgYf6UDnq7kAUmiI6Z3KK19cajiPoal0dn5RGj0vx0VwoLaszrotFNbNh4/3D5WxsjXVBVDOVpUfN0uJH5OQbTaMsPwOFgaDgp040fjcSHO+SNmo6lLOoocgwvL5ZYwtIJYChumQ+ft0FvTFWyMo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=p83HcBtP; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="p83HcBtP" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AB95FC4CEED; Fri, 8 Aug 2025 15:23:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1754666634; bh=oAFQA9TbeQJ0JUZrMnAe5qsvI2i9waFhIJMusddsYPc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=p83HcBtPUk2RQWICi6LA+VYl/Qwb8fzNLUGwm4IU4Gotr0D0SkpnN2j3Mf4sE57VS YE1fpMV8MJBc6H+lj44sxARxOBgOo5KWAQo3XaYP8KunAdsE6ZYVwkE4KWD7dIZR4L l3ujmsdw4i4eWjxIAZsZrICO5oL9Ugdt6/LIcKInGAjmL6A0DN7x+GKcI5IzwYK9fN RFyD+iJtozyJW6/4ZBhkDJaReuUCcxBZKGeJwzuiTTM4rDiXvo3RT+trnFAr7N1CQT T0RSKOW2fY443efBYt+EjFY3BAFHE0a3aPIdqOpJ2aGbDmEpkkFOr0T+V2laHpSlvW m7QfkqlYe+8tg== From: Arnd Bergmann To: Bartosz Golaszewski , Linus Walleij , linux-gpio@vger.kernel.org, Jeff Johnson Cc: Arnd Bergmann , linux-wireless@vger.kernel.org, ath10k@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 16/21] ath10k: remove gpio number assignment Date: Fri, 8 Aug 2025 17:18:00 +0200 Message-Id: <20250808151822.536879-17-arnd@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250808151822.536879-1-arnd@kernel.org> References: <20250808151822.536879-1-arnd@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Arnd Bergmann The leds-gpio traditionally takes a global gpio number in its platform data, but the number assigned here is not actually such a number but only meant to be used internally to this driver. As part of the kernel-wide cleanup of the old gpiolib interfaces, the 'gpio' number field is going away, so to keep ath10k building, move the assignment into a private structure instead. Signed-off-by: Arnd Bergmann Reviewed-by: Baochen Qiang --- drivers/net/wireless/ath/ath10k/leds.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/leds.c b/drivers/net/wireless/= ath/ath10k/leds.c index 9b1d04eb4265..3a6c8111e7c6 100644 --- a/drivers/net/wireless/ath/ath10k/leds.c +++ b/drivers/net/wireless/ath/ath10k/leds.c @@ -27,7 +27,7 @@ static int ath10k_leds_set_brightness_blocking(struct led= _classdev *led_cdev, goto out; =20 ar->leds.gpio_state_pin =3D (brightness !=3D LED_OFF) ^ led->active_low; - ath10k_wmi_gpio_output(ar, led->gpio, ar->leds.gpio_state_pin); + ath10k_wmi_gpio_output(ar, ar->hw_params.led_pin, ar->leds.gpio_state_pin= ); =20 out: mutex_unlock(&ar->conf_mutex); @@ -64,7 +64,6 @@ int ath10k_leds_register(struct ath10k *ar) snprintf(ar->leds.label, sizeof(ar->leds.label), "ath10k-%s", wiphy_name(ar->hw->wiphy)); ar->leds.wifi_led.active_low =3D 1; - ar->leds.wifi_led.gpio =3D ar->hw_params.led_pin; ar->leds.wifi_led.name =3D ar->leds.label; ar->leds.wifi_led.default_state =3D LEDS_GPIO_DEFSTATE_KEEP; =20 --=20 2.39.5 From nobody Sun Oct 5 05:26:31 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 9796728469C; Fri, 8 Aug 2025 15:24:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754666645; cv=none; b=Ig6zoEIkPjioL6fF2HVWwzxli2iB/dwvUxQns8TD7vVi5/OY9/OV1Mna4L/Y678SiUSC08Ku8exVzLsmKt0QeogEBpjiPDcoEw4oLf8fR9huXZ2eo6yPzQWs9ff3j+m0QxU3QWNeaqOE9yXi7hSmmLWGZxMK1q77MP61q4YDXmY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754666645; c=relaxed/simple; bh=OKtBXU0nNWNrwQXXB3tXCDTVM8U2MxpSOes2aJ6zmRQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=AXdO2N0GTAr6ERCMvWKmYkbJeYuZO1svVKVcOy/J4dL0ogqm3amHJ/mFHy4E/peYENgHXm7rl6Kdnf+jzglXbPIdVRNEbJzcIOAURP03c6QEM2Q+tgOhcCnDidZMzUr37Nl66i9mRldCUd6ohW8TQt3hyelW1e5iPjHmNeS1UPY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=TEifatNV; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="TEifatNV" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6D09CC4CEF7; Fri, 8 Aug 2025 15:24:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1754666645; bh=OKtBXU0nNWNrwQXXB3tXCDTVM8U2MxpSOes2aJ6zmRQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TEifatNViLOS3YrW69LbPQxoLCMwCwzYH9OnnOX0WYM0GtSpRgiIfIQg/KsUxcWAP IhicAru2V0LDRSooIPTCpC2Ko8rwY2DlZjNoM4Mei5w37vWC1+0nmXzDGNT8XWQYfr 7SLiZkXMzWdps6BDRr3TlzYFcVZxt9EjpQeLyb76S/s000zm5DWIKWH0XbMVpdpUT2 PQz/5zPq6I45fjpBGctM5h7NTHnqXM2RhVN/7tYfPV3I+t3v8T1SrzJO5l19y4vFJj VPGjYfnNfIzflTOOHIWvh7PjbRmgeQtQRsea73kTamNQmb90eEVsgxSb7mna139pj3 JfDJ+AU+CaSRA== From: Arnd Bergmann To: Bartosz Golaszewski , Linus Walleij , linux-gpio@vger.kernel.org, Krzysztof Kozlowski Cc: Arnd Bergmann , Jakub Kicinski , Andy Shevchenko , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 17/21] nfc: marvell: convert to gpio descriptors Date: Fri, 8 Aug 2025 17:18:01 +0200 Message-Id: <20250808151822.536879-18-arnd@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250808151822.536879-1-arnd@kernel.org> References: <20250808151822.536879-1-arnd@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Arnd Bergmann The only reason this driver seems to still use the legacy gpio numbers is for the module parameter that lets users pass a different reset gpio. Since the fixed numbers are on their way out, and none of the platforms this driver is used on would have them any more, remove the module parameter and instead just use the reset information from firmware. Signed-off-by: Arnd Bergmann Reviewed-by: Andy Shevchenko Reviewed-by: Bartosz Golaszewski Reviewed-by: Krzysztof Kozlowski --- drivers/nfc/nfcmrvl/main.c | 47 +++++++++++------------------------ drivers/nfc/nfcmrvl/nfcmrvl.h | 5 ++-- drivers/nfc/nfcmrvl/uart.c | 5 ---- drivers/nfc/nfcmrvl/usb.c | 1 - 4 files changed, 18 insertions(+), 40 deletions(-) diff --git a/drivers/nfc/nfcmrvl/main.c b/drivers/nfc/nfcmrvl/main.c index 141bc4b66dcb..1b465a19a262 100644 --- a/drivers/nfc/nfcmrvl/main.c +++ b/drivers/nfc/nfcmrvl/main.c @@ -6,7 +6,7 @@ */ =20 #include -#include +#include #include #include #include @@ -112,14 +112,10 @@ struct nfcmrvl_private *nfcmrvl_nci_register_dev(enum= nfcmrvl_phy phy, =20 memcpy(&priv->config, pdata, sizeof(*pdata)); =20 - if (gpio_is_valid(priv->config.reset_n_io)) { - rc =3D gpio_request_one(priv->config.reset_n_io, - GPIOF_OUT_INIT_LOW, - "nfcmrvl_reset_n"); - if (rc < 0) { - priv->config.reset_n_io =3D -EINVAL; - nfc_err(dev, "failed to request reset_n io\n"); - } + priv->reset_n_io =3D gpiod_get_optional(dev, "reset-n-io", GPIOD_OUT_LOW); + if (IS_ERR(priv->reset_n_io)) { + nfc_err(dev, "failed to get reset_n gpio\n"); + return ERR_CAST(priv->reset_n_io); } =20 if (phy =3D=3D NFCMRVL_PHY_SPI) { @@ -172,8 +168,7 @@ struct nfcmrvl_private *nfcmrvl_nci_register_dev(enum n= fcmrvl_phy phy, error_free_dev: nci_free_device(priv->ndev); error_free_gpio: - if (gpio_is_valid(priv->config.reset_n_io)) - gpio_free(priv->config.reset_n_io); + gpiod_put(priv->reset_n_io); kfree(priv); return ERR_PTR(rc); } @@ -189,8 +184,7 @@ void nfcmrvl_nci_unregister_dev(struct nfcmrvl_private = *priv) =20 nfcmrvl_fw_dnld_deinit(priv); =20 - if (gpio_is_valid(priv->config.reset_n_io)) - gpio_free(priv->config.reset_n_io); + gpiod_put(priv->reset_n_io); =20 nci_free_device(ndev); kfree(priv); @@ -232,35 +226,24 @@ void nfcmrvl_chip_reset(struct nfcmrvl_private *priv) { /* Reset possible fault of previous session */ clear_bit(NFCMRVL_PHY_ERROR, &priv->flags); + if (!priv->reset_n_io) + return; =20 - if (gpio_is_valid(priv->config.reset_n_io)) { - nfc_info(priv->dev, "reset the chip\n"); - gpio_set_value(priv->config.reset_n_io, 0); - usleep_range(5000, 10000); - gpio_set_value(priv->config.reset_n_io, 1); - } else - nfc_info(priv->dev, "no reset available on this interface\n"); + nfc_info(priv->dev, "reset the chip\n"); + gpiod_set_value(priv->reset_n_io, 0); + usleep_range(5000, 10000); + gpiod_set_value(priv->reset_n_io, 1); } =20 void nfcmrvl_chip_halt(struct nfcmrvl_private *priv) { - if (gpio_is_valid(priv->config.reset_n_io)) - gpio_set_value(priv->config.reset_n_io, 0); + if (priv->reset_n_io) + gpiod_set_value(priv->reset_n_io, 0); } =20 int nfcmrvl_parse_dt(struct device_node *node, struct nfcmrvl_platform_data *pdata) { - int reset_n_io; - - reset_n_io =3D of_get_named_gpio(node, "reset-n-io", 0); - if (reset_n_io < 0) { - pr_info("no reset-n-io config\n"); - } else if (!gpio_is_valid(reset_n_io)) { - pr_err("invalid reset-n-io GPIO\n"); - return reset_n_io; - } - pdata->reset_n_io =3D reset_n_io; pdata->hci_muxed =3D of_property_read_bool(node, "hci-muxed"); =20 return 0; diff --git a/drivers/nfc/nfcmrvl/nfcmrvl.h b/drivers/nfc/nfcmrvl/nfcmrvl.h index f61a99e553db..156f46e1581f 100644 --- a/drivers/nfc/nfcmrvl/nfcmrvl.h +++ b/drivers/nfc/nfcmrvl/nfcmrvl.h @@ -53,8 +53,6 @@ struct nfcmrvl_platform_data { * Generic */ =20 - /* GPIO that is wired to RESET_N signal */ - int reset_n_io; /* Tell if transport is muxed in HCI one */ bool hci_muxed; =20 @@ -83,6 +81,9 @@ struct nfcmrvl_private { /* Platform configuration */ struct nfcmrvl_platform_data config; =20 + /* RESET_N GPIO line */ + struct gpio_desc *reset_n_io; + /* Parent dev */ struct nci_dev *ndev; =20 diff --git a/drivers/nfc/nfcmrvl/uart.c b/drivers/nfc/nfcmrvl/uart.c index 2037cd6d4f4f..cb2da7a1d91f 100644 --- a/drivers/nfc/nfcmrvl/uart.c +++ b/drivers/nfc/nfcmrvl/uart.c @@ -20,7 +20,6 @@ static unsigned int hci_muxed; static unsigned int flow_control; static unsigned int break_control; -static int reset_n_io =3D -EINVAL; =20 /* * NFCMRVL NCI OPS @@ -113,7 +112,6 @@ static int nfcmrvl_nci_uart_open(struct nci_uart *nu) if (!pdata) { pr_info("No platform data / DT -> fallback to module params\n"); config.hci_muxed =3D hci_muxed; - config.reset_n_io =3D reset_n_io; config.flow_control =3D flow_control; config.break_control =3D break_control; pdata =3D &config; @@ -201,6 +199,3 @@ MODULE_PARM_DESC(break_control, "Tell if UART driver mu= st drive break signal."); =20 module_param(hci_muxed, uint, 0); MODULE_PARM_DESC(hci_muxed, "Tell if transport is muxed in HCI one."); - -module_param(reset_n_io, int, 0); -MODULE_PARM_DESC(reset_n_io, "GPIO that is wired to RESET_N signal."); diff --git a/drivers/nfc/nfcmrvl/usb.c b/drivers/nfc/nfcmrvl/usb.c index ea7309453096..4cf19433fde1 100644 --- a/drivers/nfc/nfcmrvl/usb.c +++ b/drivers/nfc/nfcmrvl/usb.c @@ -294,7 +294,6 @@ static int nfcmrvl_probe(struct usb_interface *intf, =20 /* No configuration for USB */ memset(&config, 0, sizeof(config)); - config.reset_n_io =3D -EINVAL; =20 nfc_info(&udev->dev, "intf %p id %p\n", intf, id); =20 --=20 2.39.5 From nobody Sun Oct 5 05:26:31 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 BB418285068; Fri, 8 Aug 2025 15:24:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754666656; cv=none; b=pyWwZF5gmGjqsJkKEGoxvdkDORC+d+yGIQKaJ4N0RTU6U+2RgU+ocwZH6ju7Ct1NrBDaeICpbNU+FQ5FWSyQv+T/akSBy7x4s18ZcrmeNo2vaMxYYNA6APkdzgxE+MXRBuiH9qmf0wRYzbD3dUpPQY4BEeO5/vHoBQ/JzyEPikE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754666656; c=relaxed/simple; bh=Z6bqzKh73A7mDRbKN2x3ZXyov++aLEtSEolhGHyxyB0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ketbXA8LZxzSXfv+ccgel671gY0WrgXS/fBdIGRzc+uImze1u0Kr5FpVf3ra78g5Ly4YiFadKKzjnAACzaJMhVkhvo6almsdAbA5Oy5cK5Me+FfUT6kOEcVSreqZ71iUP3QmQpmLlCwBoxP2zF65eG+j45YZoHlks4N+6rvuBiM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=rqMjSejV; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="rqMjSejV" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 80A71C4CEED; Fri, 8 Aug 2025 15:24:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1754666656; bh=Z6bqzKh73A7mDRbKN2x3ZXyov++aLEtSEolhGHyxyB0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rqMjSejVYW8eeHalSrTc8ajJ06Vv7MhVmpcZFMsAHBbomw1S6tEVL+QUj/mWpdaO7 AOkYLldb4nraEYkt1dDprFcdXI3eO0o38qOW8v0VgDqgdLoacc7S4A6PL3WGn056Ru an+RTTOCd3HBM1o1QclRT9Imb+JxPyrWWteW/5MeLPsX3GdJz1CWjmRmIwpWoasJkc F+2ThC5HW7Z0HfEPVa4z6M4y2AKo3E9Tae5DT9WczuvVp6coEEmnFsPfscwTDcZV/9 p7T6FIDo2raNDaqLgzs+QBJh2hSTmu3DqcolGKhf70Ji3v7QYkwYga9nH8HYqagFCU m5q8GKs1qsTQw== From: Arnd Bergmann To: Bartosz Golaszewski , Linus Walleij , linux-gpio@vger.kernel.org, Krzysztof Kozlowski Cc: Arnd Bergmann , Sumanth Gavini , Jakub Kicinski , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 18/21] nfc: s3fwrn5: convert to gpio descriptors Date: Fri, 8 Aug 2025 17:18:02 +0200 Message-Id: <20250808151822.536879-19-arnd@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250808151822.536879-1-arnd@kernel.org> References: <20250808151822.536879-1-arnd@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Arnd Bergmann There is no need for this driver to still use the legacy interfaces, so convert all the legacy calls into their modern equivalents. Signed-off-by: Arnd Bergmann --- drivers/nfc/s3fwrn5/i2c.c | 42 +++++++++----------------------- drivers/nfc/s3fwrn5/phy_common.c | 12 ++++----- drivers/nfc/s3fwrn5/phy_common.h | 4 +-- drivers/nfc/s3fwrn5/uart.c | 30 ++++++----------------- 4 files changed, 28 insertions(+), 60 deletions(-) diff --git a/drivers/nfc/s3fwrn5/i2c.c b/drivers/nfc/s3fwrn5/i2c.c index 110d086cfe5b..411be709b397 100644 --- a/drivers/nfc/s3fwrn5/i2c.c +++ b/drivers/nfc/s3fwrn5/i2c.c @@ -8,7 +8,7 @@ =20 #include #include -#include +#include #include #include #include @@ -149,29 +149,22 @@ static irqreturn_t s3fwrn5_i2c_irq_thread_fn(int irq,= void *phy_id) static int s3fwrn5_i2c_parse_dt(struct i2c_client *client) { struct s3fwrn5_i2c_phy *phy =3D i2c_get_clientdata(client); - struct device_node *np =3D client->dev.of_node; + struct device *dev =3D &client->dev; =20 - if (!np) - return -ENODEV; - - phy->common.gpio_en =3D of_get_named_gpio(np, "en-gpios", 0); - if (!gpio_is_valid(phy->common.gpio_en)) { + phy->common.gpio_en =3D devm_gpiod_get(dev, "en", GPIOD_OUT_HIGH); + if (IS_ERR(phy->common.gpio_en)) { /* Support also deprecated property */ - phy->common.gpio_en =3D of_get_named_gpio(np, - "s3fwrn5,en-gpios", - 0); - if (!gpio_is_valid(phy->common.gpio_en)) - return -ENODEV; + phy->common.gpio_en =3D devm_gpiod_get(dev, "s3fwrn5,en", GPIOD_OUT_HIGH= ); + if (IS_ERR(phy->common.gpio_en)) + return PTR_ERR(phy->common.gpio_en); } =20 - phy->common.gpio_fw_wake =3D of_get_named_gpio(np, "wake-gpios", 0); - if (!gpio_is_valid(phy->common.gpio_fw_wake)) { + phy->common.gpio_fw_wake =3D devm_gpiod_get(dev, "wake", GPIOD_OUT_LOW); + if (IS_ERR(phy->common.gpio_fw_wake)) { /* Support also deprecated property */ - phy->common.gpio_fw_wake =3D of_get_named_gpio(np, - "s3fwrn5,fw-gpios", - 0); - if (!gpio_is_valid(phy->common.gpio_fw_wake)) - return -ENODEV; + phy->common.gpio_fw_wake =3D devm_gpiod_get(dev, "s3fwrn5,fw", GPIOD_OUT= _LOW); + if (IS_ERR(phy->common.gpio_fw_wake)) + return PTR_ERR(phy->common.gpio_en); } =20 return 0; @@ -197,17 +190,6 @@ static int s3fwrn5_i2c_probe(struct i2c_client *client) if (ret < 0) return ret; =20 - ret =3D devm_gpio_request_one(&phy->i2c_dev->dev, phy->common.gpio_en, - GPIOF_OUT_INIT_HIGH, "s3fwrn5_en"); - if (ret < 0) - return ret; - - ret =3D devm_gpio_request_one(&phy->i2c_dev->dev, - phy->common.gpio_fw_wake, - GPIOF_OUT_INIT_LOW, "s3fwrn5_fw_wake"); - if (ret < 0) - return ret; - /* * S3FWRN5 depends on a clock input ("XI" pin) to function properly. * Depending on the hardware configuration this could be an always-on diff --git a/drivers/nfc/s3fwrn5/phy_common.c b/drivers/nfc/s3fwrn5/phy_com= mon.c index deb2c039f0fd..e802b4e609c8 100644 --- a/drivers/nfc/s3fwrn5/phy_common.c +++ b/drivers/nfc/s3fwrn5/phy_common.c @@ -8,7 +8,7 @@ * Bongsu Jeon */ =20 -#include +#include #include #include =20 @@ -19,7 +19,7 @@ void s3fwrn5_phy_set_wake(void *phy_id, bool wake) struct phy_common *phy =3D phy_id; =20 mutex_lock(&phy->mutex); - gpio_set_value(phy->gpio_fw_wake, wake); + gpiod_set_value(phy->gpio_fw_wake, wake); if (wake) msleep(S3FWRN5_EN_WAIT_TIME); mutex_unlock(&phy->mutex); @@ -33,14 +33,14 @@ bool s3fwrn5_phy_power_ctrl(struct phy_common *phy, enu= m s3fwrn5_mode mode) =20 phy->mode =3D mode; =20 - gpio_set_value(phy->gpio_en, 1); - gpio_set_value(phy->gpio_fw_wake, 0); + gpiod_set_value(phy->gpio_en, 1); + gpiod_set_value(phy->gpio_fw_wake, 0); if (mode =3D=3D S3FWRN5_MODE_FW) - gpio_set_value(phy->gpio_fw_wake, 1); + gpiod_set_value(phy->gpio_fw_wake, 1); =20 if (mode !=3D S3FWRN5_MODE_COLD) { msleep(S3FWRN5_EN_WAIT_TIME); - gpio_set_value(phy->gpio_en, 0); + gpiod_set_value(phy->gpio_en, 0); msleep(S3FWRN5_EN_WAIT_TIME); } =20 diff --git a/drivers/nfc/s3fwrn5/phy_common.h b/drivers/nfc/s3fwrn5/phy_com= mon.h index 9cef25436bf9..5451f46f7e27 100644 --- a/drivers/nfc/s3fwrn5/phy_common.h +++ b/drivers/nfc/s3fwrn5/phy_common.h @@ -21,8 +21,8 @@ struct phy_common { struct nci_dev *ndev; =20 - int gpio_en; - int gpio_fw_wake; + struct gpio_desc *gpio_en; + struct gpio_desc *gpio_fw_wake; =20 struct mutex mutex; =20 diff --git a/drivers/nfc/s3fwrn5/uart.c b/drivers/nfc/s3fwrn5/uart.c index 9c09c10c2a46..39e3a64c4f4c 100644 --- a/drivers/nfc/s3fwrn5/uart.c +++ b/drivers/nfc/s3fwrn5/uart.c @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include =20 #include "phy_common.h" @@ -91,18 +91,15 @@ MODULE_DEVICE_TABLE(of, s3fwrn82_uart_of_match); static int s3fwrn82_uart_parse_dt(struct serdev_device *serdev) { struct s3fwrn82_uart_phy *phy =3D serdev_device_get_drvdata(serdev); - struct device_node *np =3D serdev->dev.of_node; + struct device *dev =3D &serdev->dev; =20 - if (!np) - return -ENODEV; + phy->common.gpio_en =3D devm_gpiod_get(dev, "en", GPIOD_OUT_HIGH); + if (IS_ERR(phy->common.gpio_en)) + return PTR_ERR(phy->common.gpio_en); =20 - phy->common.gpio_en =3D of_get_named_gpio(np, "en-gpios", 0); - if (!gpio_is_valid(phy->common.gpio_en)) - return -ENODEV; - - phy->common.gpio_fw_wake =3D of_get_named_gpio(np, "wake-gpios", 0); - if (!gpio_is_valid(phy->common.gpio_fw_wake)) - return -ENODEV; + phy->common.gpio_fw_wake =3D devm_gpiod_get(dev, "wake", GPIOD_OUT_LOW); + if (IS_ERR(phy->common.gpio_fw_wake)) + return PTR_ERR(phy->common.gpio_fw_wake); =20 return 0; } @@ -144,17 +141,6 @@ static int s3fwrn82_uart_probe(struct serdev_device *s= erdev) if (ret < 0) goto err_serdev; =20 - ret =3D devm_gpio_request_one(&phy->ser_dev->dev, phy->common.gpio_en, - GPIOF_OUT_INIT_HIGH, "s3fwrn82_en"); - if (ret < 0) - goto err_serdev; - - ret =3D devm_gpio_request_one(&phy->ser_dev->dev, - phy->common.gpio_fw_wake, - GPIOF_OUT_INIT_LOW, "s3fwrn82_fw_wake"); - if (ret < 0) - goto err_serdev; - ret =3D s3fwrn5_probe(&phy->common.ndev, phy, &phy->ser_dev->dev, &uart_phy_ops); if (ret < 0) --=20 2.39.5 From nobody Sun Oct 5 05:26:31 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 7BB23283144; Fri, 8 Aug 2025 15:25:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754666720; cv=none; b=VF6gih816jqN7LkAVGNIILHmiTnhE3ufs618px8Mt1Jzf6lj37WMDxrBkLmHQTUqzk/uTnJQS6qajWib5ifRo2Lp3szvnagwtbFJNN+I30EQzx6NA5psXbShqEaa7oFrpzZfNBFhZqf7RGRxMpobuFSZOrcdNnAr/ZPLtS+KxP0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754666720; c=relaxed/simple; bh=LkFYcsA0BuFkevXBP8rh1QCjNzyb8wILJJ74GWv73ww=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=NW9sy5ifHazRrzB3eAcgrWQ5vuqartK5Ij6JtMLreFa/FAZeoTb8IYGF0DdSjfYbBT2ezNWj0FcxXDGiBbSOmmiGeau6JtdwMDTdG0WbnfWNkPgCK2hUwtlbiv5E3E3c7liCIQnYQbr+pcxvn1GgEm4O7O4RNLPYq5DvKCw0aSg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=aYpkHOFD; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="aYpkHOFD" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 468E6C4CEED; Fri, 8 Aug 2025 15:25:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1754666720; bh=LkFYcsA0BuFkevXBP8rh1QCjNzyb8wILJJ74GWv73ww=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aYpkHOFDWiJ3r6/BXVEEGVYRXPaoT9GzAZBnr/uFx4keft92ivzJoGNwCU6v+IW8N /BLJ0mKvUm7BftbPUV3p7VFWD08rtOYUGlKVwMpGZSwfG/ZBa5cuDuTdQDJKPDVWIG eQraUHZZZHhgN/LtzGm7rN2uGm4yEppWQ50KhYRsGPSIVQPmINYXoi1WVvJPNIV0/K 47V2p7OwlVSQ+6i/v+crQAgQWpsuo0eTU8pN6ypQ1S/NxR3wywX4wswTPfrgZBkctU Yxa+XiH91d3AciU3m+n8irx9DF3C2hXvulTdGkyq1/B+7jztPti58Wvb8AfSV8sc0I dkYBxz/TRLfhw== From: Arnd Bergmann To: Bartosz Golaszewski , Linus Walleij , linux-gpio@vger.kernel.org, Daniel Mack , Haojian Zhuang , Robert Jarzmik , Russell King , Greg Kroah-Hartman Cc: Arnd Bergmann , Thomas Gleixner , Ingo Molnar , Andy Shevchenko , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org Subject: [PATCH 19/21] usb: udc: pxa: remove unused platform_data Date: Fri, 8 Aug 2025 17:18:04 +0200 Message-Id: <20250808151822.536879-20-arnd@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250808151822.536879-1-arnd@kernel.org> References: <20250808151822.536879-1-arnd@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Arnd Bergmann None of the remaining boards put useful data into the platform_data structures, so effectively this only works with DT based probing. Remove all code that references this data, to stop using the legacy gpiolib interfaces. The pxa27x version already supports gpio descriptors, while the pxa25x version now does it the same way. Signed-off-by: Arnd Bergmann Reviewed-by: Andy Shevchenko --- arch/arm/mach-pxa/devices.c | 7 ---- arch/arm/mach-pxa/gumstix.c | 1 - arch/arm/mach-pxa/udc.h | 8 ----- drivers/usb/gadget/udc/pxa25x_udc.c | 41 ++++++++---------------- drivers/usb/gadget/udc/pxa25x_udc.h | 2 +- drivers/usb/gadget/udc/pxa27x_udc.c | 35 +++----------------- drivers/usb/gadget/udc/pxa27x_udc.h | 2 -- include/linux/platform_data/pxa2xx_udc.h | 15 --------- 8 files changed, 19 insertions(+), 92 deletions(-) delete mode 100644 arch/arm/mach-pxa/udc.h diff --git a/arch/arm/mach-pxa/devices.c b/arch/arm/mach-pxa/devices.c index 7695cfce01a1..edad956a1483 100644 --- a/arch/arm/mach-pxa/devices.c +++ b/arch/arm/mach-pxa/devices.c @@ -11,7 +11,6 @@ #include #include =20 -#include "udc.h" #include #include #include "irqs.h" @@ -83,10 +82,6 @@ void __init pxa_set_mci_info(const struct pxamci_platfor= m_data *info, pr_err("Unable to create mci device: %d\n", err); } =20 -static struct pxa2xx_udc_mach_info pxa_udc_info =3D { - .gpio_pullup =3D -1, -}; - static struct resource pxa2xx_udc_resources[] =3D { [0] =3D { .start =3D 0x40600000, @@ -108,7 +103,6 @@ struct platform_device pxa25x_device_udc =3D { .resource =3D pxa2xx_udc_resources, .num_resources =3D ARRAY_SIZE(pxa2xx_udc_resources), .dev =3D { - .platform_data =3D &pxa_udc_info, .dma_mask =3D &udc_dma_mask, } }; @@ -119,7 +113,6 @@ struct platform_device pxa27x_device_udc =3D { .resource =3D pxa2xx_udc_resources, .num_resources =3D ARRAY_SIZE(pxa2xx_udc_resources), .dev =3D { - .platform_data =3D &pxa_udc_info, .dma_mask =3D &udc_dma_mask, } }; diff --git a/arch/arm/mach-pxa/gumstix.c b/arch/arm/mach-pxa/gumstix.c index 1713bdf3b71e..6074815a4bca 100644 --- a/arch/arm/mach-pxa/gumstix.c +++ b/arch/arm/mach-pxa/gumstix.c @@ -39,7 +39,6 @@ =20 #include "pxa25x.h" #include -#include "udc.h" #include "gumstix.h" #include "devices.h" =20 diff --git a/arch/arm/mach-pxa/udc.h b/arch/arm/mach-pxa/udc.h deleted file mode 100644 index 9a827e32db98..000000000000 --- a/arch/arm/mach-pxa/udc.h +++ /dev/null @@ -1,8 +0,0 @@ -/* - * arch/arm/mach-pxa/include/mach/udc.h - * - */ -#include - -extern void pxa_set_udc_info(struct pxa2xx_udc_mach_info *info); - diff --git a/drivers/usb/gadget/udc/pxa25x_udc.c b/drivers/usb/gadget/udc/p= xa25x_udc.c index b97fb7b0cb2c..bad151aedec1 100644 --- a/drivers/usb/gadget/udc/pxa25x_udc.c +++ b/drivers/usb/gadget/udc/pxa25x_udc.c @@ -12,7 +12,7 @@ /* #define VERBOSE_DEBUG */ =20 #include -#include +#include #include #include #include @@ -261,24 +261,12 @@ static void nuke (struct pxa25x_ep *, int status); /* one GPIO should control a D+ pullup, so host sees this device (or not) = */ static void pullup_off(void) { - struct pxa2xx_udc_mach_info *mach =3D the_controller->mach; - int off_level =3D mach->gpio_pullup_inverted; - - if (gpio_is_valid(mach->gpio_pullup)) - gpio_set_value(mach->gpio_pullup, off_level); - else if (mach->udc_command) - mach->udc_command(PXA2XX_UDC_CMD_DISCONNECT); + gpiod_set_value(the_controller->pullup_gpio, 0); } =20 static void pullup_on(void) { - struct pxa2xx_udc_mach_info *mach =3D the_controller->mach; - int on_level =3D !mach->gpio_pullup_inverted; - - if (gpio_is_valid(mach->gpio_pullup)) - gpio_set_value(mach->gpio_pullup, on_level); - else if (mach->udc_command) - mach->udc_command(PXA2XX_UDC_CMD_CONNECT); + gpiod_set_value(the_controller->pullup_gpio, 1); } =20 #if defined(CONFIG_CPU_BIG_ENDIAN) @@ -1190,8 +1178,7 @@ static int pxa25x_udc_pullup(struct usb_gadget *_gadg= et, int is_active) =20 udc =3D container_of(_gadget, struct pxa25x_udc, gadget); =20 - /* not all boards support pullup control */ - if (!gpio_is_valid(udc->mach->gpio_pullup) && !udc->mach->udc_command) + if (!udc->pullup_gpio) return -EOPNOTSUPP; =20 udc->pullup =3D (is_active !=3D 0); @@ -2343,19 +2330,17 @@ static int pxa25x_udc_probe(struct platform_device = *pdev) =20 /* other non-static parts of init */ dev->dev =3D &pdev->dev; - dev->mach =3D dev_get_platdata(&pdev->dev); =20 dev->transceiver =3D devm_usb_get_phy(&pdev->dev, USB_PHY_TYPE_USB2); =20 - if (gpio_is_valid(dev->mach->gpio_pullup)) { - retval =3D devm_gpio_request_one(&pdev->dev, dev->mach->gpio_pullup, - GPIOF_OUT_INIT_LOW, "pca25x_udc GPIO PULLUP"); - if (retval) { - dev_dbg(&pdev->dev, - "can't get pullup gpio %d, err: %d\n", - dev->mach->gpio_pullup, retval); - goto err; - } + dev->pullup_gpio =3D devm_gpiod_get_index_optional(&pdev->dev, "pullup", = 0, + GPIOD_OUT_LOW); + if (IS_ERR(dev->pullup_gpio)) { + dev_dbg(&pdev->dev, + "can't get pullup gpio err: %ld\n", + PTR_ERR(dev->pullup_gpio)); + retval =3D PTR_ERR(dev->pullup_gpio); + goto err; } =20 timer_setup(&dev->timer, udc_watchdog, 0); @@ -2439,7 +2424,7 @@ static int pxa25x_udc_suspend(struct platform_device = *dev, pm_message_t state) struct pxa25x_udc *udc =3D platform_get_drvdata(dev); unsigned long flags; =20 - if (!gpio_is_valid(udc->mach->gpio_pullup) && !udc->mach->udc_command) + if (!udc->pullup_gpio) WARNING("USB host won't detect disconnect!\n"); udc->suspended =3D 1; =20 diff --git a/drivers/usb/gadget/udc/pxa25x_udc.h b/drivers/usb/gadget/udc/p= xa25x_udc.h index 6ab6047edc83..3452cf54286c 100644 --- a/drivers/usb/gadget/udc/pxa25x_udc.h +++ b/drivers/usb/gadget/udc/pxa25x_udc.h @@ -112,7 +112,7 @@ struct pxa25x_udc { =20 struct device *dev; struct clk *clk; - struct pxa2xx_udc_mach_info *mach; + struct gpio_desc *pullup_gpio; struct usb_phy *transceiver; u64 dma_mask; struct pxa25x_ep ep [PXA_UDC_NUM_ENDPOINTS]; diff --git a/drivers/usb/gadget/udc/pxa27x_udc.c b/drivers/usb/gadget/udc/p= xa27x_udc.c index 897f53601b5b..dbce931d7d3b 100644 --- a/drivers/usb/gadget/udc/pxa27x_udc.c +++ b/drivers/usb/gadget/udc/pxa27x_udc.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include @@ -1423,14 +1422,7 @@ static const struct usb_ep_ops pxa_ep_ops =3D { */ static void dplus_pullup(struct pxa_udc *udc, int on) { - if (udc->gpiod) { - gpiod_set_value(udc->gpiod, on); - } else if (udc->udc_command) { - if (on) - udc->udc_command(PXA2XX_UDC_CMD_CONNECT); - else - udc->udc_command(PXA2XX_UDC_CMD_DISCONNECT); - } + gpiod_set_value(udc->gpiod, on); udc->pullup_on =3D on; } =20 @@ -1520,7 +1512,7 @@ static int pxa_udc_pullup(struct usb_gadget *_gadget,= int is_active) { struct pxa_udc *udc =3D to_gadget_udc(_gadget); =20 - if (!udc->gpiod && !udc->udc_command) + if (!udc->gpiod) return -EOPNOTSUPP; =20 dplus_pullup(udc, is_active); @@ -2354,26 +2346,9 @@ MODULE_DEVICE_TABLE(of, udc_pxa_dt_ids); static int pxa_udc_probe(struct platform_device *pdev) { struct pxa_udc *udc =3D &memory; - int retval =3D 0, gpio; - struct pxa2xx_udc_mach_info *mach =3D dev_get_platdata(&pdev->dev); - - if (mach) { - gpio =3D mach->gpio_pullup; - if (gpio_is_valid(gpio)) { - retval =3D devm_gpio_request_one(&pdev->dev, gpio, - GPIOF_OUT_INIT_LOW, - "USB D+ pullup"); - if (retval) - return retval; - udc->gpiod =3D gpio_to_desc(mach->gpio_pullup); - - if (mach->gpio_pullup_inverted ^ gpiod_is_active_low(udc->gpiod)) - gpiod_toggle_active_low(udc->gpiod); - } - udc->udc_command =3D mach->udc_command; - } else { - udc->gpiod =3D devm_gpiod_get(&pdev->dev, NULL, GPIOD_ASIS); - } + int retval =3D 0; + + udc->gpiod =3D devm_gpiod_get(&pdev->dev, NULL, GPIOD_ASIS); =20 udc->regs =3D devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(udc->regs)) diff --git a/drivers/usb/gadget/udc/pxa27x_udc.h b/drivers/usb/gadget/udc/p= xa27x_udc.h index 31bf79ce931c..2c28b691010a 100644 --- a/drivers/usb/gadget/udc/pxa27x_udc.h +++ b/drivers/usb/gadget/udc/pxa27x_udc.h @@ -426,7 +426,6 @@ struct udc_stats { * @usb_gadget: udc gadget structure * @driver: bound gadget (zero, g_ether, g_mass_storage, ...) * @dev: device - * @udc_command: machine specific function to activate D+ pullup * @gpiod: gpio descriptor of gpio for D+ pullup (or NULL if none) * @transceiver: external transceiver to handle vbus sense and D+ pullup * @ep0state: control endpoint state machine state @@ -452,7 +451,6 @@ struct pxa_udc { struct usb_gadget gadget; struct usb_gadget_driver *driver; struct device *dev; - void (*udc_command)(int); struct gpio_desc *gpiod; struct usb_phy *transceiver; =20 diff --git a/include/linux/platform_data/pxa2xx_udc.h b/include/linux/platf= orm_data/pxa2xx_udc.h index bc99cc6a3c5f..c1e4d03bae2c 100644 --- a/include/linux/platform_data/pxa2xx_udc.h +++ b/include/linux/platform_data/pxa2xx_udc.h @@ -10,21 +10,6 @@ #ifndef PXA2XX_UDC_H #define PXA2XX_UDC_H =20 -struct pxa2xx_udc_mach_info { - int (*udc_is_connected)(void); /* do we see host? */ - void (*udc_command)(int cmd); -#define PXA2XX_UDC_CMD_CONNECT 0 /* let host see us */ -#define PXA2XX_UDC_CMD_DISCONNECT 1 /* so host won't see us */ - - /* Boards following the design guidelines in the developer's manual, - * with on-chip GPIOs not Lubbock's weird hardware, can have a sane - * VBUS IRQ and omit the methods above. Store the GPIO number - * here. Note that sometimes the signals go through inverters... - */ - bool gpio_pullup_inverted; - int gpio_pullup; /* high =3D=3D pullup activated */ -}; - #ifdef CONFIG_PXA27x extern void pxa27x_clear_otgph(void); #else --=20 2.39.5 From nobody Sun Oct 5 05:26:31 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 B7573285C91; Fri, 8 Aug 2025 15:25:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754666729; cv=none; b=A/6DYsnsVVsyuIEXxCWkarFAyEHSsmyewxitVtq3a0v2uFNLYbY+asQZJFIQIWpxeoJfzZwYxqEMyHak6FdIjXRBfuds9CEuVvVxFM9sxXyjSDzJJkcxOjuUaqWKBepeP3+mkOU72RbHGeTq7ls9VReslUWQrbQ2ORovyHxl9HM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754666729; c=relaxed/simple; bh=ql43Pm5ZVVpFZkt/lmAyISGZXPuox8rw7R6mqwFTem0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=qqNKYZHPIiKByXeF+LPTq9pekfEP7cAoDN6t/EoKK4ubGDuHonSTJJPPB0xiVMEdubuBJziWTpfgYftUpJFOoeNuKbxY/zDT/vapnqL2XKlpe1SbUeeKuWgX3SVAN0aZc30y+w3zDIQC/aooeHrm/wfKGAOHeMEEv+TLK10PGLA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=d1o2Rd1n; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="d1o2Rd1n" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B5C25C4CEED; Fri, 8 Aug 2025 15:25:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1754666729; bh=ql43Pm5ZVVpFZkt/lmAyISGZXPuox8rw7R6mqwFTem0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=d1o2Rd1nJHSRYFCzylvP+3x9U8gc1HC0fXIU0YsQVx7xGvfqmXhr0IuqJsRnpv0Tk nRHkvuOOLCFr8tAX2twv/foDjaDtd5bB3P62pK8RanglCpRoAF3UhTbPGsDquJjVsM YnhVgSXaPTaY7/NrDnIo9XaYFyC3+e+N+gElNMZin1iMb3Baoweh+Ekj1fYoF7TZwr M6qYj8IFllGuc/2eFH3faF/K84LpxFhw4YCNb7Us3cKHIOgqBJ7urKJdf1CJulU6aO YNKq6Fvb4njTbSm7YegOPQmoYDAtj1OpwXd4NDQL0TQf2UrAcffq2kN8kCH1HWJYiV 8szml0eaARUgw== From: Arnd Bergmann To: Bartosz Golaszewski , Linus Walleij , linux-gpio@vger.kernel.org, Daniel Mack , Haojian Zhuang , Robert Jarzmik , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Cc: Arnd Bergmann , Kuninori Morimoto , linux-arm-kernel@lists.infradead.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 20/21] ASoC: pxa: add GPIOLIB_LEGACY dependency Date: Fri, 8 Aug 2025 17:18:05 +0200 Message-Id: <20250808151822.536879-21-arnd@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250808151822.536879-1-arnd@kernel.org> References: <20250808151822.536879-1-arnd@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Arnd Bergmann The pxa27x platform uses the legacy gpiolib interfaces, including in its sound drivers: sound/arm/pxa2xx-ac97-lib.c: In function 'pxa2xx_ac97_hw_probe': sound/arm/pxa2xx-ac97-lib.c:374:23: error: implicit declaration of function= 'gpio_request_one' [-Wimplicit-function-declaration] 374 | ret =3D gpio_request_one(reset_gpio, GPIOF_OUT_INIT= _HIGH, Make sure we don't select those drivers for compile-testing unless we are building for a pxa27x system, or CONFIG_GPIOLIB_LEGACY is already enabled. The SND_PXA_SOC_SSP driver accidentally used a dependency on PLAT_PXA, which includes both ARCH_PXA and ARCH_MMP, but it is only used on the former. Signed-off-by: Arnd Bergmann --- sound/soc/pxa/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/pxa/Kconfig b/sound/soc/pxa/Kconfig index e026f9912a6d..e54abcd39f79 100644 --- a/sound/soc/pxa/Kconfig +++ b/sound/soc/pxa/Kconfig @@ -3,7 +3,7 @@ menu "PXA" =20 config SND_PXA2XX_SOC tristate "SoC Audio for the Intel PXA2xx chip" - depends on ARCH_PXA || COMPILE_TEST + depends on ARCH_PXA || (COMPILE_TEST && GPIOLIB_LEGACY) select SND_PXA2XX_LIB help Say Y or M if you want to add support for codecs attached to @@ -26,7 +26,7 @@ config SND_PXA2XX_SOC_I2S =20 config SND_PXA_SOC_SSP tristate "Soc Audio via PXA2xx/PXA3xx SSP ports" - depends on PLAT_PXA + depends on ARCH_PXA select PXA_SSP select SND_PXA2XX_LIB =20 --=20 2.39.5 From nobody Sun Oct 5 05:26:31 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 75598284B33; Fri, 8 Aug 2025 15:25:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754666746; cv=none; b=s//zVN3vvLlInJGH4lkcaiph3hHQ0xesF9fnimDAmF19G5srvlW8zrFwbhfw1pp3eBeqst/m+p6L/pVVzglF3vmYvLXDeVL3mcJw3m3GKJltEmaeeVxl4mtN1pjtCl9kRkQBKb0wVJOqEPNX8PG21mGCIziVWdedsmilwgC612Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754666746; c=relaxed/simple; bh=Q7LJqYntC3C0kPPrvn7+7VaNuFpGlm/sR/DRdUSA6H0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=JVGnJVtDi+nB7FERHd0ZzXOIpFwqB1fhylC8E+3o7+Ecba7XYdvvHo7x7TaEhE3EauKqJTzqGMHkv3bW0xOvmknfZlUxAlxmUS0CuPIlDCm6vUr15XSRtmCM/+1vrrRNi4kfe1+dmbVQG3EdlmQkCj3UQbzkyHuL3UX4V0KUR/g= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ORwDYNVG; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ORwDYNVG" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 55BE3C4CEED; Fri, 8 Aug 2025 15:25:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1754666746; bh=Q7LJqYntC3C0kPPrvn7+7VaNuFpGlm/sR/DRdUSA6H0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ORwDYNVGaH/T0ODn+KGGXIMdkJ0mdcA6ZaPRahTP4I1kcEGH+cJ+g0hybo4niIij5 oHAp2+IyZt9aMHwB11WQ+m57WDqT0qZbL+szNmKt2K7cGIrTpB/TMFeOLLBFk+7DUi 5EfrZzEYORNmIx7+ZX4Jt/6mWSiw17I2/a8rVWdmboaZMuJTU6TOnTAhu7viNLmxBk fbyIrjY8haWR9vvU9qMZQU76GGp6rwxPwQ7urtTciHLcHieqym9DQlsegTh+WONr99 AN4YOVZ8zd9u+wths+Ad8GEsMOpEW9ac1r/8qIbD4lXYMzX16cHw/mmEZL63Ip096H ahnaJWnqipT3Q== From: Arnd Bergmann To: Bartosz Golaszewski , Linus Walleij , linux-gpio@vger.kernel.org Cc: Arnd Bergmann , Peng Fan , Geert Uytterhoeven , Koichiro Den , =?UTF-8?q?Andr=C3=A9=20Draszik?= , Andy Shevchenko , linux-kernel@vger.kernel.org Subject: [PATCH 21/21] gpiolib: turn off legacy interface by default Date: Fri, 8 Aug 2025 17:18:06 +0200 Message-Id: <20250808151822.536879-22-arnd@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250808151822.536879-1-arnd@kernel.org> References: <20250808151822.536879-1-arnd@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Arnd Bergmann All users of the legacy interface now select CONFIG_GPIOLIB_LEGACY, so it can be turned off by default. Allow turning it on manually for compile testing, in order to keep the build coverage of the legacy drivers. Signed-off-by: Arnd Bergmann --- drivers/gpio/Kconfig | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig index e43abb322fa6..2b57ba776c13 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig @@ -12,10 +12,17 @@ menuconfig GPIOLIB =20 If unsure, say N. =20 +if GPIOLIB + config GPIOLIB_LEGACY - def_bool y + bool "Legacy GPIO interfaces" if COMPILE_TEST + help + There are a few legacy platforms that use the traditional GPIO + number based interfaces instead of GPIO descriptors. + Say Y here to enable build testing drivers that are specific + to those platforms. =20 -if GPIOLIB + If unsure, say N. =20 config GPIOLIB_FASTPATH_LIMIT int "Maximum number of GPIOs for fast path" --=20 2.39.5