blob: 66c30a763b108c7fe096009b344320fc1c282325 [file] [log] [blame]
Paulius Zaleckasf004f3e2008-11-14 00:24:34 +00001/*
2 * MDIO-GPIO bus platform data structures
3 *
4 * Copyright (C) 2008, Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
5 *
6 * This file is licensed under the terms of the GNU General Public License
7 * version 2. This program is licensed "as is" without any warranty of any
8 * kind, whether express or implied.
9 */
10
11#ifndef __LINUX_MDIO_GPIO_H
12#define __LINUX_MDIO_GPIO_H
13
14#include <linux/mdio-bitbang.h>
15
16struct mdio_gpio_platform_data {
17 /* GPIO numbers for bus pins */
18 unsigned int mdc;
19 unsigned int mdio;
Guenter Roeckf1d54c42014-04-15 19:16:42 -070020 unsigned int mdo;
Paulius Zaleckasf004f3e2008-11-14 00:24:34 +000021
Guenter Roeck1d251482014-04-15 19:16:41 -070022 bool mdc_active_low;
23 bool mdio_active_low;
Guenter Roeckf1d54c42014-04-15 19:16:42 -070024 bool mdo_active_low;
Guenter Roeck1d251482014-04-15 19:16:41 -070025
Paulius Zaleckasf004f3e2008-11-14 00:24:34 +000026 unsigned int phy_mask;
27 int irqs[PHY_MAX_ADDR];
Srinivas Kandagatla64882702011-11-15 11:54:15 +000028 /* reset callback */
29 int (*reset)(struct mii_bus *bus);
Paulius Zaleckasf004f3e2008-11-14 00:24:34 +000030};
31
32#endif /* __LINUX_MDIO_GPIO_H */