diff options
author | Paulius Zaleckas <paulius.zaleckas@teltonika.lt> | 2008-11-13 19:24:34 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-16 21:59:45 -0500 |
commit | f004f3ea34209d8b836426b26ade3dc502631b18 (patch) | |
tree | bf58002618bc3dd98db2416bb20cbeb016ecdd23 /include/linux/mdio-gpio.h | |
parent | 72af187f216ed83c77ca3e6f22dfc9caf72e9347 (diff) |
phylib: make mdio-gpio work without OF (v4)
make mdio-gpio work with non OpenFirmware gpio implementation.
Aditional changes to mdio-gpio:
- use gpio_request() and gpio_free()
- place irq[] array in struct mdio_gpio_info
- add module description, author and license
- add note about compiling this driver as module
- rename mdc and mdio function (were ugly names)
- change MII to MDIO in bus name
- add __init __exit to module (un)loading functions
- probe fails if no phys added to the bus
- kzalloc bitbang with sizeof(*bitbang)
Changes since v3:
- keep bus naming "%x" to be compatible with existing drivers.
Changes since v2:
- more #ifdefs reduction
- platform driver will be registered on OF platforms also
- unified platform and OF bus_id to phy%i
Changes since v1:
- removed NO_IRQ
- reduced #idefs
Laurent, please test this driver under OF.
Signed-off-by: Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/mdio-gpio.h')
-rw-r--r-- | include/linux/mdio-gpio.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/include/linux/mdio-gpio.h b/include/linux/mdio-gpio.h new file mode 100644 index 000000000000..e9d3fdfe41d7 --- /dev/null +++ b/include/linux/mdio-gpio.h | |||
@@ -0,0 +1,25 @@ | |||
1 | /* | ||
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 | |||
16 | struct mdio_gpio_platform_data { | ||
17 | /* GPIO numbers for bus pins */ | ||
18 | unsigned int mdc; | ||
19 | unsigned int mdio; | ||
20 | |||
21 | unsigned int phy_mask; | ||
22 | int irqs[PHY_MAX_ADDR]; | ||
23 | }; | ||
24 | |||
25 | #endif /* __LINUX_MDIO_GPIO_H */ | ||