xref: /linux/drivers/net/dsa/realtek/rtl83xx.h (revision 6e7fd890f1d6ac83805409e9c346240de2705584)
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 
3 #ifndef _RTL83XX_H
4 #define _RTL83XX_H
5 
6 struct realtek_interface_info {
7 	int (*reg_read)(void *ctx, u32 reg, u32 *val);
8 	int (*reg_write)(void *ctx, u32 reg, u32 val);
9 };
10 
11 void rtl83xx_lock(void *ctx);
12 void rtl83xx_unlock(void *ctx);
13 int rtl83xx_setup_user_mdio(struct dsa_switch *ds);
14 struct realtek_priv *
15 rtl83xx_probe(struct device *dev,
16 	      const struct realtek_interface_info *interface_info);
17 int rtl83xx_register_switch(struct realtek_priv *priv);
18 void rtl83xx_unregister_switch(struct realtek_priv *priv);
19 void rtl83xx_shutdown(struct realtek_priv *priv);
20 void rtl83xx_remove(struct realtek_priv *priv);
21 void rtl83xx_reset_assert(struct realtek_priv *priv);
22 void rtl83xx_reset_deassert(struct realtek_priv *priv);
23 
24 #endif /* _RTL83XX_H */
25