2009-12-08 10:29:35 +00:00
|
|
|
/*
|
2011-07-24 14:40:23 +00:00
|
|
|
* Platform data definition for the Realtek RTL8366RB/S ethernet switch driver
|
2009-12-08 10:29:35 +00:00
|
|
|
*
|
2010-01-22 17:38:07 +00:00
|
|
|
* Copyright (C) 2009-2010 Gabor Juhos <juhosg@openwrt.org>
|
2009-12-08 10:29:35 +00:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify it
|
|
|
|
* under the terms of the GNU General Public License version 2 as published
|
|
|
|
* by the Free Software Foundation.
|
|
|
|
*/
|
|
|
|
|
2011-07-24 14:40:23 +00:00
|
|
|
#ifndef _RTL8366_H
|
|
|
|
#define _RTL8366_H
|
2009-12-08 10:29:35 +00:00
|
|
|
|
2011-07-24 14:40:23 +00:00
|
|
|
#define RTL8366_DRIVER_NAME "rtl8366"
|
2010-01-22 17:38:07 +00:00
|
|
|
#define RTL8366S_DRIVER_NAME "rtl8366s"
|
2011-07-24 14:40:23 +00:00
|
|
|
#define RTL8366RB_DRIVER_NAME "rtl8366rb"
|
2010-01-22 17:38:07 +00:00
|
|
|
|
2011-07-24 14:40:31 +00:00
|
|
|
enum rtl8366_type {
|
|
|
|
RTL8366_TYPE_UNKNOWN,
|
|
|
|
RTL8366_TYPE_S,
|
|
|
|
RTL8366_TYPE_RB,
|
|
|
|
};
|
|
|
|
|
2011-07-24 14:40:23 +00:00
|
|
|
struct rtl8366_initval {
|
2011-01-26 20:35:46 +00:00
|
|
|
unsigned reg;
|
|
|
|
u16 val;
|
|
|
|
};
|
|
|
|
|
2011-07-24 14:40:23 +00:00
|
|
|
struct rtl8366_platform_data {
|
2009-12-08 10:29:35 +00:00
|
|
|
unsigned gpio_sda;
|
|
|
|
unsigned gpio_sck;
|
2012-08-02 09:54:21 +00:00
|
|
|
void (*hw_reset)(bool active);
|
|
|
|
|
2011-01-26 20:35:46 +00:00
|
|
|
unsigned num_initvals;
|
2011-07-24 14:40:23 +00:00
|
|
|
struct rtl8366_initval *initvals;
|
2009-12-08 10:29:35 +00:00
|
|
|
};
|
|
|
|
|
2011-07-24 14:40:31 +00:00
|
|
|
enum rtl8366_type rtl8366_smi_detect(struct rtl8366_platform_data *pdata);
|
|
|
|
|
2011-07-24 14:40:23 +00:00
|
|
|
#endif /* _RTL8366_H */
|