xref: /linux/drivers/tty/serial/sc16is7xx.h (revision f898c16a0624e7f2dcb0b1cda6916c9be6489197)
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /* SC16IS7xx SPI/I2C tty serial driver */
3 
4 #ifndef _SC16IS7XX_H_
5 #define _SC16IS7XX_H_
6 
7 #include <linux/mod_devicetable.h>
8 #include <linux/regmap.h>
9 #include <linux/types.h>
10 
11 #define SC16IS7XX_NAME		"sc16is7xx"
12 #define SC16IS7XX_MAX_PORTS	2 /* Maximum number of UART ports per IC. */
13 
14 struct device;
15 
16 struct sc16is7xx_devtype {
17 	char	name[10];
18 	int	nr_gpio;
19 	int	nr_uart;
20 };
21 
22 extern const struct regmap_config sc16is7xx_regcfg;
23 
24 extern const struct of_device_id sc16is7xx_dt_ids[];
25 
26 extern const struct sc16is7xx_devtype sc16is74x_devtype;
27 extern const struct sc16is7xx_devtype sc16is750_devtype;
28 extern const struct sc16is7xx_devtype sc16is752_devtype;
29 extern const struct sc16is7xx_devtype sc16is760_devtype;
30 extern const struct sc16is7xx_devtype sc16is762_devtype;
31 
32 const char *sc16is7xx_regmap_name(u8 port_id);
33 
34 unsigned int sc16is7xx_regmap_port_mask(unsigned int port_id);
35 
36 int sc16is7xx_probe(struct device *dev, const struct sc16is7xx_devtype *devtype,
37 		    struct regmap *regmaps[], int irq);
38 
39 void sc16is7xx_remove(struct device *dev);
40 
41 #endif /* _SC16IS7XX_H_ */
42