1 /* SPDX-License-Identifier: GPL-2.0 */
2 #include <linux/device.h>
3 #include <linux/mutex.h>
4 #include <linux/regmap.h>
5 #include <linux/workqueue.h>
6 #include <linux/u64_stats_sync.h>
7 #include <uapi/linux/if_link.h>
15 extern const struct xrs700x_info xrs7003e_info;
16 extern const struct xrs700x_info xrs7003f_info;
17 extern const struct xrs700x_info xrs7004e_info;
18 extern const struct xrs700x_info xrs7004f_info;
21 struct mutex mib_mutex; /* protects mib_data */
23 struct rtnl_link_stats64 stats64;
24 struct u64_stats_sync syncp;
28 struct dsa_switch *ds;
31 struct regmap *regmap;
32 struct regmap_field *ps_forward;
33 struct regmap_field *ps_management;
34 struct regmap_field *ps_sel_speed;
35 struct regmap_field *ps_cur_speed;
36 struct delayed_work mib_work;
37 struct xrs700x_port *ports;
40 struct xrs700x *xrs700x_switch_alloc(struct device *base, void *devpriv);
41 int xrs700x_switch_register(struct xrs700x *priv);
42 void xrs700x_switch_remove(struct xrs700x *priv);
43 void xrs700x_switch_shutdown(struct xrs700x *priv);