treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / drivers / net / dsa / vitesse-vsc73xx.h
blob7478f8d4e0a992be4294b3f2bf532acb1c4a667c
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #include <linux/device.h>
3 #include <linux/etherdevice.h>
4 #include <linux/gpio/driver.h>
6 /**
7 * struct vsc73xx - VSC73xx state container
8 */
9 struct vsc73xx {
10 struct device *dev;
11 struct gpio_desc *reset;
12 struct dsa_switch *ds;
13 struct gpio_chip gc;
14 u16 chipid;
15 u8 addr[ETH_ALEN];
16 const struct vsc73xx_ops *ops;
17 void *priv;
20 struct vsc73xx_ops {
21 int (*read)(struct vsc73xx *vsc, u8 block, u8 subblock, u8 reg,
22 u32 *val);
23 int (*write)(struct vsc73xx *vsc, u8 block, u8 subblock, u8 reg,
24 u32 val);
27 int vsc73xx_is_addr_valid(u8 block, u8 subblock);
28 int vsc73xx_probe(struct vsc73xx *vsc);
29 int vsc73xx_remove(struct vsc73xx *vsc);