diff mbox series

[net-next] net: mdio-gpio: remove support for platform data

Message ID 20240821122530.20529-1-brgl@bgdev.pl (mailing list archive)
State Not Applicable
Delegated to: Netdev Maintainers
Headers show
Series [net-next] net: mdio-gpio: remove support for platform data | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 16 this patch: 16
netdev/build_tools success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers success CCed 8 of 8 maintainers
netdev/build_clang success Errors and warnings before: 16 this patch: 16
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 16 this patch: 16
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 32 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest fail net-next-2024-08-21--21-00 (tests: 712)

Commit Message

Bartosz Golaszewski Aug. 21, 2024, 12:25 p.m. UTC
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

There are no more board files defining platform data for this driver so
remove the header and drop the support.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
 MAINTAINERS                             |  1 -
 drivers/net/mdio/mdio-gpio.c            |  7 -------
 include/linux/platform_data/mdio-gpio.h | 14 --------------
 3 files changed, 22 deletions(-)
 delete mode 100644 include/linux/platform_data/mdio-gpio.h

Comments

Andrew Lunn Aug. 21, 2024, 12:42 p.m. UTC | #1
On Wed, Aug 21, 2024 at 02:25:29PM +0200, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> 
> There are no more board files defining platform data for this driver so
> remove the header and drop the support.

There are a number of out of tree x86 boards which use this, flying in
various aircraft, so have a long life, and do get kernel updates.

I'm happy to support this code, and as a PHYLIB Maintainer, it adds
little overhead to my maintenance works. If you really insist, i can
try to get code added to drivers/platform/x86/ which use this.

	Andrew
Bartosz Golaszewski Aug. 21, 2024, 12:45 p.m. UTC | #2
On Wed, Aug 21, 2024 at 2:42 PM Andrew Lunn <andrew@lunn.ch> wrote:
>
> On Wed, Aug 21, 2024 at 02:25:29PM +0200, Bartosz Golaszewski wrote:
> > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> >
> > There are no more board files defining platform data for this driver so
> > remove the header and drop the support.
>
> There are a number of out of tree x86 boards which use this, flying in
> various aircraft, so have a long life, and do get kernel updates.
>
> I'm happy to support this code, and as a PHYLIB Maintainer, it adds
> little overhead to my maintenance works. If you really insist, i can
> try to get code added to drivers/platform/x86/ which use this.
>

We typically don't care about out-of-tree board files upstream. Having
users for this struct in mainline would of course be great and a
perfect reason to keep it.

Bart
Andrew Lunn Aug. 26, 2024, 3:54 p.m. UTC | #3
On Wed, Aug 21, 2024 at 02:25:29PM +0200, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> 
> There are no more board files defining platform data for this driver so
> remove the header and drop the support.
> 
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

FYI: I'm working on a rework which changes the default for when there
is no DT node. That will allow the removal of the platform data.

It is being built tested at the moment, so i will probably post the
series tomorrow.

	Andrew
diff mbox series

Patch

diff --git a/MAINTAINERS b/MAINTAINERS
index a7cb909ffa1d..146f4eb95e7c 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -8413,7 +8413,6 @@  F:	include/linux/phy.h
 F:	include/linux/phy_fixed.h
 F:	include/linux/phylib_stubs.h
 F:	include/linux/platform_data/mdio-bcm-unimac.h
-F:	include/linux/platform_data/mdio-gpio.h
 F:	include/trace/events/mdio.h
 F:	include/uapi/linux/mdio.h
 F:	include/uapi/linux/mii.h
diff --git a/drivers/net/mdio/mdio-gpio.c b/drivers/net/mdio/mdio-gpio.c
index 82088741debd..9e194ebfe7d2 100644
--- a/drivers/net/mdio/mdio-gpio.c
+++ b/drivers/net/mdio/mdio-gpio.c
@@ -23,7 +23,6 @@ 
 #include <linux/mdio-gpio.h>
 #include <linux/module.h>
 #include <linux/of_mdio.h>
-#include <linux/platform_data/mdio-gpio.h>
 #include <linux/platform_device.h>
 #include <linux/slab.h>
 
@@ -110,7 +109,6 @@  static struct mii_bus *mdio_gpio_bus_init(struct device *dev,
 					  struct mdio_gpio_info *bitbang,
 					  int bus_id)
 {
-	struct mdio_gpio_platform_data *pdata = dev_get_platdata(dev);
 	struct mii_bus *new_bus;
 
 	bitbang->ctrl.ops = &mdio_gpio_ops;
@@ -127,11 +125,6 @@  static struct mii_bus *mdio_gpio_bus_init(struct device *dev,
 	else
 		strscpy(new_bus->id, "gpio", sizeof(new_bus->id));
 
-	if (pdata) {
-		new_bus->phy_mask = pdata->phy_mask;
-		new_bus->phy_ignore_ta_mask = pdata->phy_ignore_ta_mask;
-	}
-
 	if (device_is_compatible(dev, "microchip,mdio-smi0")) {
 		bitbang->ctrl.op_c22_read = 0;
 		bitbang->ctrl.op_c22_write = 0;
diff --git a/include/linux/platform_data/mdio-gpio.h b/include/linux/platform_data/mdio-gpio.h
deleted file mode 100644
index 13874fa6e767..000000000000
--- a/include/linux/platform_data/mdio-gpio.h
+++ /dev/null
@@ -1,14 +0,0 @@ 
-/* SPDX-License-Identifier: GPL-2.0 */
-/*
- * MDIO-GPIO bus platform data structure
- */
-
-#ifndef __LINUX_MDIO_GPIO_PDATA_H
-#define __LINUX_MDIO_GPIO_PDATA_H
-
-struct mdio_gpio_platform_data {
-	u32 phy_mask;
-	u32 phy_ignore_ta_mask;
-};
-
-#endif /* __LINUX_MDIO_GPIO_PDATA_H */