From nobody Mon Nov 25 20:23:23 2024 Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C78C722B64E for ; Thu, 24 Oct 2024 19:28:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729798086; cv=none; b=e8EKzfNR0bHMQdP5+OD9WIpyP7WZD/nvP8P0+0leqnUgTb2n+LPQmO540B7oQa4q21FDwt7TZ/Dw4GJ/M8LrXopqtHxm56Xl9+dXUMWepDNJ6n7NSI6QXmWrMFto6T48csgNDqNouIF+T8sFL0onLzZHsIelx6h634lr6rkttwA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729798086; c=relaxed/simple; bh=MsyvLUEN4KieeGQry7Tv4XWLnz4E0IXotwSViA85eLY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=K1bHrkeTqRjqxj6+fDVvKdjoR2xfH4ayatu1qK+0dINKhfrDJWC2zYt2vnlEh1P6SOcpapl00t7TAROYcnMJKju+62FNrVvi71o851spk4XQ5koHaf+xipVpGeszBedaPjkoL3+8dGGTXZgtkYqPYDUCBr3TdoYmKeBCrV/0DWw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl; spf=none smtp.mailfrom=bgdev.pl; dkim=pass (2048-bit key) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.b=1BHC8B7Z; arc=none smtp.client-ip=209.85.128.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bgdev.pl Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.b="1BHC8B7Z" Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-431481433bdso13042955e9.3 for ; Thu, 24 Oct 2024 12:28:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1729798081; x=1730402881; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=f1q0PHtLM9oOfhL2Z2oj0+Ljqs3Vx/uHZamBZV8iG/8=; b=1BHC8B7Z2aYzgqCCg8lH0AMd6JM2/30IEUHBpId6Pt6iIoz5F4If3WsGonvOBeNLuy LP16RbgJNF/kLbM9Nwjo5jQZz7RQZ7Cwk2EIWcI6176wFGohivIOjgBUrLUEmwdmohS2 TFtVTmnmgVsOQ4p1q1XXCrG09+hyQlNnPueM8j4jPNfm9xkHRkaFEOUgmtlEGvRZ0Pip 6+WeYEgiKrqr/xMKEr8UkMkn4HRiGQZyYOv2REh5Yzfl+CUPis3XK7IYYvbAVyp8IqHa P2RAshLIUxXPDhQRNfz6j6SRYgX+Fbvzhll2YPBY5huruWFVIgSIrel8uXELY9d9OoPg oAbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729798081; x=1730402881; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=f1q0PHtLM9oOfhL2Z2oj0+Ljqs3Vx/uHZamBZV8iG/8=; b=EXv95GNwTH2R3RY/yCGofnUodSNupm69gITEh7CQ8rzimFh5bb85kBDU5epnqk7dwE NY95pJ7LEEBHyeRR9XEEQIdmJ3lpRC3eS4+J6MyyYDXwCbXci9fYDu5Qs5RCF0eFSfHs a+Ch7W8feSBZH+47xx1ayMF99r0jw3zgMrcsTnCb5QPDWnh+aPRkc7ZTrcBqcP4mrIgL zukYCNk6JsYcR39/9t0OwiiFyQg00jckQuw0tFIFUyPGsEmUYDF1PyTYDifuFzYbE8Gr Jep15s6x6prEQpr1aKRehMyOowRmCRiTr5m5ryO7Jg4hNYQM+DRw7oDiKjUsQhvT1l3b boHQ== X-Forwarded-Encrypted: i=1; AJvYcCUuecZetQv5oXq1z56OtzDiLF6qHuymTF5BeG/GaPdju59ABdHNjeTjDMxO0n/ymmXMXR6dbp8LXCE0v+o=@vger.kernel.org X-Gm-Message-State: AOJu0Ywjd4jeEiJX1xfNpHevH+ohUYUadPsoa2g/RYW9gTQO3BBAKZsa uCoYxEnPIv0ufGMooDQ6vi+3ORUjh4yfCqwGloW0+/rKap54XVhiMoZV2YY+fQc= X-Google-Smtp-Source: AGHT+IHFpuXVrhH2+2o95unPzjtnawUrafTLPCcKc2hxw01Xf1w6bhQu0NUvXHDdt6Pfz1Tg7m0jpA== X-Received: by 2002:a05:600c:5490:b0:431:5d14:1cae with SMTP id 5b1f17b1804b1-4318415fee0mr59414155e9.19.1729798080857; Thu, 24 Oct 2024 12:28:00 -0700 (PDT) Received: from brgl-uxlite.home ([2a01:cb1d:dc:7e00:17a2:e679:56a4:a25a]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43186c0e06dsm54234685e9.33.2024.10.24.12.28.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Oct 2024 12:28:00 -0700 (PDT) From: Bartosz Golaszewski To: Linus Walleij Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH] gpio: relax the Kconfig dependency on OF_GPIO in drivers Date: Thu, 24 Oct 2024 21:27:57 +0200 Message-ID: <20241024192758.91748-1-brgl@bgdev.pl> X-Mailer: git-send-email 2.45.2 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: Bartosz Golaszewski None of the symbols exported in gpiolib-of.h are used by any of the GPIO drivers we maintain. Even if they were, there are stubs for !OF_GPIO. There's no reason for any of the drivers to depend at build-time on GPIO_OF. We can drop all such cases. Signed-off-by: Bartosz Golaszewski --- drivers/gpio/Kconfig | 34 ++++------------------------------ 1 file changed, 4 insertions(+), 30 deletions(-) diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig index e28efd5f9c17..652413e9c14c 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig @@ -134,7 +134,6 @@ menu "Memory mapped GPIO drivers" =20 config GPIO_74XX_MMIO tristate "GPIO driver for 74xx-ICs with MMIO access" - depends on OF_GPIO select GPIO_GENERIC help Say yes here to support GPIO functionality for 74xx-compatible ICs @@ -148,7 +147,6 @@ config GPIO_74XX_MMIO =20 config GPIO_ALTERA tristate "Altera GPIO" - depends on OF_GPIO select GPIOLIB_IRQCHIP select OF_GPIO_MM_GPIOCHIP help @@ -192,7 +190,6 @@ config GPIO_ATH79 config GPIO_RASPBERRYPI_EXP tristate "Raspberry Pi 3 GPIO Expander" default RASPBERRYPI_FIRMWARE - depends on OF_GPIO # Make sure not 'y' when RASPBERRYPI_FIRMWARE is 'm'. This can only # happen when COMPILE_TEST=3Dy, hence the added !RASPBERRYPI_FIRMWARE. depends on (ARCH_BCM2835 && RASPBERRYPI_FIRMWARE) || (COMPILE_TEST && !RA= SPBERRYPI_FIRMWARE) @@ -208,7 +205,7 @@ config GPIO_BCM_KONA =20 config GPIO_BCM_XGS_IPROC tristate "BRCM XGS iProc GPIO support" - depends on OF_GPIO && (ARCH_BCM_IPROC || COMPILE_TEST) + depends on ARCH_BCM_IPROC || COMPILE_TEST select GPIO_GENERIC select GPIOLIB_IRQCHIP default ARCH_BCM_IPROC @@ -218,7 +215,7 @@ config GPIO_BCM_XGS_IPROC config GPIO_BRCMSTB tristate "BRCMSTB GPIO support" default y if (ARCH_BRCMSTB || BMIPS_GENERIC) - depends on OF_GPIO && (ARCH_BRCMSTB || ARCH_BCM2835 || BMIPS_GENERIC || C= OMPILE_TEST) + depends on ARCH_BRCMSTB || ARCH_BCM2835 || BMIPS_GENERIC || COMPILE_TEST select GPIO_GENERIC select IRQ_DOMAIN help @@ -226,7 +223,6 @@ config GPIO_BRCMSTB =20 config GPIO_CADENCE tristate "Cadence GPIO support" - depends on OF_GPIO select GPIO_GENERIC select GPIOLIB_IRQCHIP help @@ -257,7 +253,6 @@ config GPIO_DWAPB config GPIO_EIC_SPRD tristate "Spreadtrum EIC support" depends on ARCH_SPRD || COMPILE_TEST - depends on OF_GPIO select GPIOLIB_IRQCHIP help Say yes here to support Spreadtrum EIC device. @@ -306,7 +301,6 @@ config GPIO_GE_FPGA =20 config GPIO_FTGPIO010 bool "Faraday FTGPIO010 GPIO" - depends on OF_GPIO select GPIO_GENERIC select GPIOLIB_IRQCHIP default (ARCH_GEMINI || ARCH_MOXART) @@ -359,7 +353,6 @@ config GPIO_HISI =20 config GPIO_HLWD tristate "Nintendo Wii (Hollywood) GPIO" - depends on OF_GPIO select GPIO_GENERIC select GPIOLIB_IRQCHIP help @@ -412,7 +405,6 @@ config GPIO_LOONGSON config GPIO_LOONGSON_64BIT tristate "Loongson 64 bit GPIO support" depends on LOONGARCH || COMPILE_TEST - depends on OF_GPIO select GPIO_GENERIC help Say yes here to support the GPIO functionality of a number of @@ -424,7 +416,7 @@ config GPIO_LOONGSON_64BIT config GPIO_LPC18XX tristate "NXP LPC18XX/43XX GPIO support" default y if ARCH_LPC18XX - depends on OF_GPIO && (ARCH_LPC18XX || COMPILE_TEST) + depends on ARCH_LPC18XX || COMPILE_TEST select IRQ_DOMAIN_HIERARCHY help Select this option to enable GPIO driver for @@ -432,7 +424,7 @@ config GPIO_LPC18XX =20 config GPIO_LPC32XX tristate "NXP LPC32XX GPIO support" - depends on OF_GPIO && (ARCH_LPC32XX || COMPILE_TEST) + depends on ARCH_LPC32XX || COMPILE_TEST help Select this option to enable GPIO driver for NXP LPC32XX devices. @@ -477,7 +469,6 @@ config GPIO_MPC8XXX config GPIO_MT7621 bool "Mediatek MT7621 GPIO Support" depends on SOC_MT7620 || SOC_MT7621 || COMPILE_TEST - depends on OF_GPIO select GPIO_GENERIC select GPIOLIB_IRQCHIP help @@ -562,7 +553,6 @@ config GPIO_RCAR config GPIO_RDA bool "RDA Micro GPIO controller support" depends on ARCH_RDA || COMPILE_TEST - depends on OF_GPIO select GPIO_GENERIC select GPIOLIB_IRQCHIP help @@ -612,7 +602,6 @@ config GPIO_RTD config GPIO_SAMA5D2_PIOBU tristate "SAMA5D2 PIOBU GPIO support" depends on MFD_SYSCON - depends on OF_GPIO depends on ARCH_AT91 || COMPILE_TEST select GPIO_SYSCON help @@ -624,7 +613,6 @@ config GPIO_SAMA5D2_PIOBU =20 config GPIO_SIFIVE tristate "SiFive GPIO support" - depends on OF_GPIO select IRQ_DOMAIN_HIERARCHY select GPIO_GENERIC select GPIOLIB_IRQCHIP @@ -643,7 +631,6 @@ config GPIO_SIOX config GPIO_SNPS_CREG bool "Synopsys GPIO via CREG (Control REGisters) driver" depends on ARC || COMPILE_TEST - depends on OF_GPIO help This driver supports GPIOs via CREG on various Synopsys SoCs. This is a single-register MMIO GPIO driver for complex cases @@ -660,7 +647,6 @@ config GPIO_SPEAR_SPICS config GPIO_SPRD tristate "Spreadtrum GPIO support" depends on ARCH_SPRD || COMPILE_TEST - depends on OF_GPIO select GPIOLIB_IRQCHIP help Say yes here to support Spreadtrum GPIO device. @@ -668,7 +654,6 @@ config GPIO_SPRD config GPIO_STP_XWAY bool "XWAY STP GPIOs" depends on SOC_XWAY || COMPILE_TEST - depends on OF_GPIO help This enables support for the Serial To Parallel (STP) unit found on XWAY SoC. The STP allows the SoC to drive a shift registers cascade, @@ -703,7 +688,6 @@ config GPIO_TEGRA tristate "NVIDIA Tegra GPIO support" default ARCH_TEGRA depends on ARCH_TEGRA || COMPILE_TEST - depends on OF_GPIO select GPIOLIB_IRQCHIP select IRQ_DOMAIN_HIERARCHY help @@ -713,7 +697,6 @@ config GPIO_TEGRA186 tristate "NVIDIA Tegra186 GPIO support" default ARCH_TEGRA_186_SOC || ARCH_TEGRA_194_SOC depends on ARCH_TEGRA_186_SOC || ARCH_TEGRA_194_SOC || COMPILE_TEST - depends on OF_GPIO select GPIOLIB_IRQCHIP select IRQ_DOMAIN_HIERARCHY help @@ -721,7 +704,6 @@ config GPIO_TEGRA186 =20 config GPIO_TS4800 tristate "TS-4800 DIO blocks and compatibles" - depends on OF_GPIO depends on SOC_IMX51 || COMPILE_TEST select GPIO_GENERIC help @@ -741,7 +723,6 @@ config GPIO_THUNDERX config GPIO_UNIPHIER tristate "UniPhier GPIO support" depends on ARCH_UNIPHIER || COMPILE_TEST - depends on OF_GPIO select IRQ_DOMAIN_HIERARCHY help Say yes here to support UniPhier GPIOs. @@ -757,7 +738,6 @@ config GPIO_VF610 config GPIO_VISCONTI tristate "Toshiba Visconti GPIO support" depends on ARCH_VISCONTI || COMPILE_TEST - depends on OF_GPIO select GPIOLIB_IRQCHIP select GPIO_GENERIC select IRQ_DOMAIN_HIERARCHY @@ -1071,7 +1051,6 @@ menu "I2C GPIO expanders" =20 config GPIO_ADNP tristate "Avionic Design N-bit GPIO expander" - depends on OF_GPIO select GPIOLIB_IRQCHIP help This option enables support for N GPIOs found on Avionic Design @@ -1104,7 +1083,6 @@ config GPIO_DS4520 =20 config GPIO_GW_PLD tristate "Gateworks PLD GPIO Expander" - depends on OF_GPIO help Say yes here to provide access to the Gateworks I2C PLD GPIO Expander. This is used at least on the Cambria GW2358-4. @@ -1466,7 +1444,6 @@ config GPIO_PALMAS config GPIO_PMIC_EIC_SPRD tristate "Spreadtrum PMIC EIC support" depends on MFD_SC27XX_PMIC || COMPILE_TEST - depends on OF_GPIO select GPIOLIB_IRQCHIP help Say yes here to support Spreadtrum PMIC EIC device. @@ -1495,7 +1472,6 @@ config GPIO_SL28CPLD config GPIO_STMPE bool "STMPE GPIOs" depends on MFD_STMPE - depends on OF_GPIO select GPIOLIB_IRQCHIP help This enables support for the GPIOs found on the STMPE I/O @@ -1504,7 +1480,6 @@ config GPIO_STMPE config GPIO_TC3589X bool "TC3589X GPIOs" depends on MFD_TC3589X - depends on OF_GPIO select GPIOLIB_IRQCHIP help This enables support for the GPIOs found on the TC3589X @@ -1785,7 +1760,6 @@ menu "SPI GPIO expanders" =20 config GPIO_74X164 tristate "74x164 serial-in/parallel-out 8-bits shift register" - depends on OF_GPIO help Driver for 74x164 compatible serial-in/parallel-out 8-outputs shift registers. This driver can be used to provide access --=20 2.45.2