sc16is7xx.h 1.1 KB

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