lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260112064950.3837737-1-rdunlap@infradead.org>
Date: Sun, 11 Jan 2026 22:49:50 -0800
From: Randy Dunlap <rdunlap@...radead.org>
To: linux-kernel@...r.kernel.org
Cc: Randy Dunlap <rdunlap@...radead.org>,
	Robert Marko <robert.marko@...tura.hr>,
	Linus Walleij <linusw@...nel.org>,
	Bartosz Golaszewski <brgl@...nel.org>,
	linux-gpio@...r.kernel.org,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Rob Herring <robh@...nel.org>,
	Krzysztof Kozlowski <krzk+dt@...nel.org>,
	Conor Dooley <conor+dt@...nel.org>,
	devicetree@...r.kernel.org
Subject: [PATCH] gpio: remove the gpio-tn48m driver

The gpio-tn48m driver is useless without the simple-mfd parent, which is
not present in the kernel tree, so delete it and all references to it.
Also delete references to the (missing) mfd driver.

Fixes: b3dcb5de6209 ("gpio: Add Delta TN48M CPLD GPIO driver")
Signed-off-by: Randy Dunlap <rdunlap@...radead.org>
---
Based on v6.19-rc4.

Cc: Robert Marko <robert.marko@...tura.hr>
Cc: Linus Walleij <linusw@...nel.org>
Cc: Bartosz Golaszewski <brgl@...nel.org>
Cc: linux-gpio@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Rob Herring <robh@...nel.org>
Cc: Krzysztof Kozlowski <krzk+dt@...nel.org>
Cc: Conor Dooley <conor+dt@...nel.org>
Cc: devicetree@...r.kernel.org

 .../devicetree/bindings/gpio/delta,tn48m-gpio.yaml |  39 --------
 .../devicetree/bindings/mfd/delta,tn48m-cpld.yaml  |  90 -------------------
 MAINTAINERS                                        |   9 --
 drivers/gpio/Kconfig                               |  12 ---
 drivers/gpio/Makefile                              |   1 -
 drivers/gpio/gpio-tn48m.c                          | 100 ---------------------
 6 files changed, 251 deletions(-)

diff --git a/Documentation/devicetree/bindings/gpio/delta,tn48m-gpio.yaml b/Documentation/devicetree/bindings/gpio/delta,tn48m-gpio.yaml
deleted file mode 100644
index e3e668a12091..000000000000
--- a/Documentation/devicetree/bindings/gpio/delta,tn48m-gpio.yaml
+++ /dev/null
@@ -1,39 +0,0 @@
-# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
-%YAML 1.2
----
-$id: http://devicetree.org/schemas/gpio/delta,tn48m-gpio.yaml#
-$schema: http://devicetree.org/meta-schemas/core.yaml#
-
-title: Delta Networks TN48M CPLD GPIO controller
-
-maintainers:
-  - Robert Marko <robert.marko@...tura.hr>
-
-description: |
-  This module is part of the Delta TN48M multi-function device. For more
-  details see ../mfd/delta,tn48m-cpld.yaml.
-
-  Delta TN48M has an onboard Lattice CPLD that is used as an GPIO expander.
-  It provides 12 pins in total, they are input-only or ouput-only type.
-
-properties:
-  compatible:
-    enum:
-      - delta,tn48m-gpo
-      - delta,tn48m-gpi
-
-  reg:
-    maxItems: 1
-
-  "#gpio-cells":
-    const: 2
-
-  gpio-controller: true
-
-required:
-  - compatible
-  - reg
-  - "#gpio-cells"
-  - gpio-controller
-
-additionalProperties: false
diff --git a/Documentation/devicetree/bindings/mfd/delta,tn48m-cpld.yaml b/Documentation/devicetree/bindings/mfd/delta,tn48m-cpld.yaml
deleted file mode 100644
index d3b79140cce2..000000000000
--- a/Documentation/devicetree/bindings/mfd/delta,tn48m-cpld.yaml
+++ /dev/null
@@ -1,90 +0,0 @@
-# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
-%YAML 1.2
----
-$id: http://devicetree.org/schemas/mfd/delta,tn48m-cpld.yaml#
-$schema: http://devicetree.org/meta-schemas/core.yaml#
-
-title: Delta Networks TN48M CPLD controller
-
-maintainers:
-  - Robert Marko <robert.marko@...tura.hr>
-
-description: |
-  Lattice CPLD onboard the TN48M switches is used for system
-  management.
-
-  It provides information about the hardware model, revision,
-  PSU status etc.
-
-  It is also being used as a GPIO expander and reset controller
-  for the switch MAC-s and other peripherals.
-
-properties:
-  compatible:
-    const: delta,tn48m-cpld
-
-  reg:
-    description:
-      I2C device address.
-    maxItems: 1
-
-  "#address-cells":
-    const: 1
-
-  "#size-cells":
-    const: 0
-
-required:
-  - compatible
-  - reg
-  - "#address-cells"
-  - "#size-cells"
-
-patternProperties:
-  "^gpio(@[0-9a-f]+)?$":
-    $ref: /schemas/gpio/delta,tn48m-gpio.yaml
-
-  "^reset-controller?$":
-    $ref: /schemas/reset/delta,tn48m-reset.yaml
-
-additionalProperties: false
-
-examples:
-  - |
-    i2c {
-        #address-cells = <1>;
-        #size-cells = <0>;
-
-        cpld@41 {
-            compatible = "delta,tn48m-cpld";
-            reg = <0x41>;
-            #address-cells = <1>;
-            #size-cells = <0>;
-
-            gpio@31 {
-                compatible = "delta,tn48m-gpo";
-                reg = <0x31>;
-                gpio-controller;
-                #gpio-cells = <2>;
-            };
-
-            gpio@3a {
-                compatible = "delta,tn48m-gpi";
-                reg = <0x3a>;
-                gpio-controller;
-                #gpio-cells = <2>;
-            };
-
-            gpio@40 {
-                compatible = "delta,tn48m-gpi";
-                reg = <0x40>;
-                gpio-controller;
-                #gpio-cells = <2>;
-            };
-
-            reset-controller {
-              compatible = "delta,tn48m-reset";
-              #reset-cells = <1>;
-            };
-        };
-    };
diff --git a/MAINTAINERS b/MAINTAINERS
index 765ad2daa218..7d3c0d2375c8 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -7107,15 +7107,6 @@ S:	Maintained
 F:	Documentation/hwmon/dps920ab.rst
 F:	drivers/hwmon/pmbus/dps920ab.c
 
-DELTA NETWORKS TN48M CPLD DRIVERS
-M:	Robert Marko <robert.marko@...tura.hr>
-S:	Maintained
-F:	Documentation/devicetree/bindings/gpio/delta,tn48m-gpio.yaml
-F:	Documentation/devicetree/bindings/mfd/delta,tn48m-cpld.yaml
-F:	Documentation/devicetree/bindings/reset/delta,tn48m-reset.yaml
-F:	drivers/gpio/gpio-tn48m.c
-F:	include/dt-bindings/reset/delta,tn48m-reset.h
-
 DELTA ST MEDIA DRIVER
 M:	Hugues Fruchet <hugues.fruchet@...s.st.com>
 L:	linux-media@...r.kernel.org
diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
index bd185482a7fd..d1d3f98b87f6 100644
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -1619,18 +1619,6 @@ config GPIO_TIMBERDALE
 	help
 	Add support for the GPIO IP in the timberdale FPGA.
 
-config GPIO_TN48M_CPLD
-	tristate "Delta Networks TN48M switch CPLD GPIO driver"
-	depends on MFD_TN48M_CPLD || COMPILE_TEST
-	select GPIO_REGMAP
-	help
-	  This enables support for the GPIOs found on the Delta
-	  Networks TN48M switch Lattice CPLD. It provides 12 pins in total,
-	  they are input-only or output-only type.
-
-	  This driver can also be built as a module. If so, the
-	  module will be called gpio-tn48m.
-
 config GPIO_TPS65086
 	tristate "TI TPS65086 GPO"
 	depends on MFD_TPS65086
diff --git a/drivers/gpio/Makefile b/drivers/gpio/Makefile
index 2421a8fd3733..c3ee30133c24 100644
--- a/drivers/gpio/Makefile
+++ b/drivers/gpio/Makefile
@@ -181,7 +181,6 @@ obj-$(CONFIG_GPIO_TEGRA186)		+= gpio-tegra186.o
 obj-$(CONFIG_GPIO_TEGRA)		+= gpio-tegra.o
 obj-$(CONFIG_GPIO_THUNDERX)		+= gpio-thunderx.o
 obj-$(CONFIG_GPIO_TIMBERDALE)		+= gpio-timberdale.o
-obj-$(CONFIG_GPIO_TN48M_CPLD)		+= gpio-tn48m.o
 obj-$(CONFIG_GPIO_TPIC2810)		+= gpio-tpic2810.o
 obj-$(CONFIG_GPIO_TPS65086)		+= gpio-tps65086.o
 obj-$(CONFIG_GPIO_TPS65218)		+= gpio-tps65218.o
diff --git a/drivers/gpio/gpio-tn48m.c b/drivers/gpio/gpio-tn48m.c
deleted file mode 100644
index cd4a80b22794..000000000000
--- a/drivers/gpio/gpio-tn48m.c
+++ /dev/null
@@ -1,100 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-only
-/*
- * Delta TN48M CPLD GPIO driver
- *
- * Copyright (C) 2021 Sartura Ltd.
- *
- * Author: Robert Marko <robert.marko@...tura.hr>
- */
-
-#include <linux/device.h>
-#include <linux/gpio/driver.h>
-#include <linux/gpio/regmap.h>
-#include <linux/mod_devicetable.h>
-#include <linux/module.h>
-#include <linux/platform_device.h>
-#include <linux/regmap.h>
-
-enum tn48m_gpio_type {
-	TN48M_GP0 = 1,
-	TN48M_GPI,
-};
-
-struct tn48m_gpio_config {
-	int ngpio;
-	int ngpio_per_reg;
-	enum tn48m_gpio_type type;
-};
-
-static const struct tn48m_gpio_config tn48m_gpo_config = {
-	.ngpio = 4,
-	.ngpio_per_reg = 4,
-	.type = TN48M_GP0,
-};
-
-static const struct tn48m_gpio_config tn48m_gpi_config = {
-	.ngpio = 4,
-	.ngpio_per_reg = 4,
-	.type = TN48M_GPI,
-};
-
-static int tn48m_gpio_probe(struct platform_device *pdev)
-{
-	const struct tn48m_gpio_config *gpio_config;
-	struct gpio_regmap_config config = {};
-	struct regmap *regmap;
-	u32 base;
-	int ret;
-
-	if (!pdev->dev.parent)
-		return -ENODEV;
-
-	gpio_config = device_get_match_data(&pdev->dev);
-	if (!gpio_config)
-		return -ENODEV;
-
-	ret = device_property_read_u32(&pdev->dev, "reg", &base);
-	if (ret)
-		return ret;
-
-	regmap = dev_get_regmap(pdev->dev.parent, NULL);
-	if (!regmap)
-		return -ENODEV;
-
-	config.regmap = regmap;
-	config.parent = &pdev->dev;
-	config.ngpio = gpio_config->ngpio;
-	config.ngpio_per_reg = gpio_config->ngpio_per_reg;
-	switch (gpio_config->type) {
-	case TN48M_GP0:
-		config.reg_set_base = base;
-		break;
-	case TN48M_GPI:
-		config.reg_dat_base = base;
-		break;
-	default:
-		return -EINVAL;
-	}
-
-	return PTR_ERR_OR_ZERO(devm_gpio_regmap_register(&pdev->dev, &config));
-}
-
-static const struct of_device_id tn48m_gpio_of_match[] = {
-	{ .compatible = "delta,tn48m-gpo", .data = &tn48m_gpo_config },
-	{ .compatible = "delta,tn48m-gpi", .data = &tn48m_gpi_config },
-	{ }
-};
-MODULE_DEVICE_TABLE(of, tn48m_gpio_of_match);
-
-static struct platform_driver tn48m_gpio_driver = {
-	.driver = {
-		.name = "delta-tn48m-gpio",
-		.of_match_table = tn48m_gpio_of_match,
-	},
-	.probe = tn48m_gpio_probe,
-};
-module_platform_driver(tn48m_gpio_driver);
-
-MODULE_AUTHOR("Robert Marko <robert.marko@...tura.hr>");
-MODULE_DESCRIPTION("Delta TN48M CPLD GPIO driver");
-MODULE_LICENSE("GPL");

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ