From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf0-f68.google.com ([209.85.215.68]:40147 "EHLO mail-lf0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751718AbeBYMx4 (ORCPT ); Sun, 25 Feb 2018 07:53:56 -0500 Received: by mail-lf0-f68.google.com with SMTP id 37so18420486lfs.7 for ; Sun, 25 Feb 2018 04:53:55 -0800 (PST) From: Linus Walleij To: Andrew Lunn , Florian Fainelli , "David S . Miller" Cc: netdev@vger.kernel.org, Laurent Pinchart , Linus Walleij Subject: [PATCH net-next 1/5] net: mdio-gpio: Localize platform data Date: Sun, 25 Feb 2018 13:51:28 +0100 Message-Id: <20180225125132.25275-2-linus.walleij@linaro.org> In-Reply-To: <20180225125132.25275-1-linus.walleij@linaro.org> References: <20180225125132.25275-1-linus.walleij@linaro.org> Sender: netdev-owner@vger.kernel.org List-ID: It is late on the day for platforms using platform data to pass information to drivers. As of today, the only thing in the kernel including the file is the MDIO GPIO driver itself. Essentially it is exposing a kernel-internal interface unused by any in-kernel code. Let's decomission this and make the MDIO GPIO driver more self-contained by starting to move this struct into the driver. Signed-off-by: Linus Walleij --- MAINTAINERS | 1 - drivers/net/phy/mdio-gpio.c | 19 ++++++++++++++++++- include/linux/platform_data/mdio-gpio.h | 33 --------------------------------- 3 files changed, 18 insertions(+), 35 deletions(-) delete mode 100644 include/linux/platform_data/mdio-gpio.h diff --git a/MAINTAINERS b/MAINTAINERS index 3bdc260e36b7..e5a1a06c09e8 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -5333,7 +5333,6 @@ F: include/linux/*mdio*.h F: include/linux/of_net.h F: include/linux/phy.h F: include/linux/phy_fixed.h -F: include/linux/platform_data/mdio-gpio.h F: include/linux/platform_data/mdio-bcm-unimac.h F: include/trace/events/mdio.h F: include/uapi/linux/mdio.h diff --git a/drivers/net/phy/mdio-gpio.c b/drivers/net/phy/mdio-gpio.c index 4333c6e14742..6d669f24c0e6 100644 --- a/drivers/net/phy/mdio-gpio.c +++ b/drivers/net/phy/mdio-gpio.c @@ -24,12 +24,29 @@ #include #include #include +#include #include -#include #include #include +struct mdio_gpio_platform_data { + /* GPIO numbers for bus pins */ + unsigned int mdc; + unsigned int mdio; + unsigned int mdo; + + bool mdc_active_low; + bool mdio_active_low; + bool mdo_active_low; + + u32 phy_mask; + u32 phy_ignore_ta_mask; + int irqs[PHY_MAX_ADDR]; + /* reset callback */ + int (*reset)(struct mii_bus *bus); +}; + struct mdio_gpio_info { struct mdiobb_ctrl ctrl; struct gpio_desc *mdc, *mdio, *mdo; diff --git a/include/linux/platform_data/mdio-gpio.h b/include/linux/platform_data/mdio-gpio.h deleted file mode 100644 index 11f00cdabe3d..000000000000 --- a/include/linux/platform_data/mdio-gpio.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * MDIO-GPIO bus platform data structures - * - * Copyright (C) 2008, Paulius Zaleckas - * - * This file is licensed under the terms of the GNU General Public License - * version 2. This program is licensed "as is" without any warranty of any - * kind, whether express or implied. - */ - -#ifndef __LINUX_MDIO_GPIO_H -#define __LINUX_MDIO_GPIO_H - -#include - -struct mdio_gpio_platform_data { - /* GPIO numbers for bus pins */ - unsigned int mdc; - unsigned int mdio; - unsigned int mdo; - - bool mdc_active_low; - bool mdio_active_low; - bool mdo_active_low; - - u32 phy_mask; - u32 phy_ignore_ta_mask; - int irqs[PHY_MAX_ADDR]; - /* reset callback */ - int (*reset)(struct mii_bus *bus); -}; - -#endif /* __LINUX_MDIO_GPIO_H */ -- 2.14.3