| xj | b04a402 | 2021-11-25 15:01:52 +0800 | [diff] [blame] | 1 | /* |
| 2 | * Platform data definition for the Realtek RTL8366RB/S ethernet switch driver |
| 3 | * |
| 4 | * Copyright (C) 2009-2010 Gabor Juhos <juhosg@openwrt.org> |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify it |
| 7 | * under the terms of the GNU General Public License version 2 as published |
| 8 | * by the Free Software Foundation. |
| 9 | */ |
| 10 | |
| 11 | #ifndef _RTL8366_H |
| 12 | #define _RTL8366_H |
| 13 | |
| 14 | #define RTL8366_DRIVER_NAME "rtl8366" |
| 15 | #define RTL8366S_DRIVER_NAME "rtl8366s" |
| 16 | #define RTL8366RB_DRIVER_NAME "rtl8366rb" |
| 17 | |
| 18 | struct rtl8366_smi; |
| 19 | |
| 20 | enum rtl8366_type { |
| 21 | RTL8366_TYPE_UNKNOWN, |
| 22 | RTL8366_TYPE_S, |
| 23 | RTL8366_TYPE_RB, |
| 24 | }; |
| 25 | |
| 26 | struct rtl8366_initval { |
| 27 | unsigned reg; |
| 28 | u16 val; |
| 29 | }; |
| 30 | |
| 31 | struct rtl8366_platform_data { |
| 32 | unsigned gpio_sda; |
| 33 | unsigned gpio_sck; |
| 34 | void (*hw_reset)(struct rtl8366_smi *smi, bool active); |
| 35 | |
| 36 | unsigned num_initvals; |
| 37 | struct rtl8366_initval *initvals; |
| 38 | }; |
| 39 | |
| 40 | enum rtl8366_type rtl8366_smi_detect(struct rtl8366_platform_data *pdata); |
| 41 | |
| 42 | #endif /* _RTL8366_H */ |