diff options
Diffstat (limited to 'include/linux/serdev.h')
| -rw-r--r-- | include/linux/serdev.h | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/include/linux/serdev.h b/include/linux/serdev.h index cda76c6506ca..e69402d4a8ae 100644 --- a/include/linux/serdev.h +++ b/include/linux/serdev.h | |||
| @@ -195,6 +195,7 @@ int serdev_device_open(struct serdev_device *); | |||
| 195 | void serdev_device_close(struct serdev_device *); | 195 | void serdev_device_close(struct serdev_device *); |
| 196 | unsigned int serdev_device_set_baudrate(struct serdev_device *, unsigned int); | 196 | unsigned int serdev_device_set_baudrate(struct serdev_device *, unsigned int); |
| 197 | void serdev_device_set_flow_control(struct serdev_device *, bool); | 197 | void serdev_device_set_flow_control(struct serdev_device *, bool); |
| 198 | int serdev_device_write_buf(struct serdev_device *, const unsigned char *, size_t); | ||
| 198 | void serdev_device_wait_until_sent(struct serdev_device *, long); | 199 | void serdev_device_wait_until_sent(struct serdev_device *, long); |
| 199 | int serdev_device_get_tiocm(struct serdev_device *); | 200 | int serdev_device_get_tiocm(struct serdev_device *); |
| 200 | int serdev_device_set_tiocm(struct serdev_device *, int, int); | 201 | int serdev_device_set_tiocm(struct serdev_device *, int, int); |
| @@ -236,6 +237,12 @@ static inline unsigned int serdev_device_set_baudrate(struct serdev_device *sdev | |||
| 236 | return 0; | 237 | return 0; |
| 237 | } | 238 | } |
| 238 | static inline void serdev_device_set_flow_control(struct serdev_device *sdev, bool enable) {} | 239 | static inline void serdev_device_set_flow_control(struct serdev_device *sdev, bool enable) {} |
| 240 | static inline int serdev_device_write_buf(struct serdev_device *serdev, | ||
| 241 | const unsigned char *buf, | ||
| 242 | size_t count) | ||
| 243 | { | ||
| 244 | return -ENODEV; | ||
| 245 | } | ||
| 239 | static inline void serdev_device_wait_until_sent(struct serdev_device *sdev, long timeout) {} | 246 | static inline void serdev_device_wait_until_sent(struct serdev_device *sdev, long timeout) {} |
| 240 | static inline int serdev_device_get_tiocm(struct serdev_device *serdev) | 247 | static inline int serdev_device_get_tiocm(struct serdev_device *serdev) |
| 241 | { | 248 | { |
| @@ -301,7 +308,7 @@ struct tty_driver; | |||
| 301 | struct device *serdev_tty_port_register(struct tty_port *port, | 308 | struct device *serdev_tty_port_register(struct tty_port *port, |
| 302 | struct device *parent, | 309 | struct device *parent, |
| 303 | struct tty_driver *drv, int idx); | 310 | struct tty_driver *drv, int idx); |
| 304 | void serdev_tty_port_unregister(struct tty_port *port); | 311 | int serdev_tty_port_unregister(struct tty_port *port); |
| 305 | #else | 312 | #else |
| 306 | static inline struct device *serdev_tty_port_register(struct tty_port *port, | 313 | static inline struct device *serdev_tty_port_register(struct tty_port *port, |
| 307 | struct device *parent, | 314 | struct device *parent, |
| @@ -309,14 +316,10 @@ static inline struct device *serdev_tty_port_register(struct tty_port *port, | |||
| 309 | { | 316 | { |
| 310 | return ERR_PTR(-ENODEV); | 317 | return ERR_PTR(-ENODEV); |
| 311 | } | 318 | } |
| 312 | static inline void serdev_tty_port_unregister(struct tty_port *port) {} | 319 | static inline int serdev_tty_port_unregister(struct tty_port *port) |
| 313 | #endif /* CONFIG_SERIAL_DEV_CTRL_TTYPORT */ | ||
| 314 | |||
| 315 | static inline int serdev_device_write_buf(struct serdev_device *serdev, | ||
| 316 | const unsigned char *data, | ||
| 317 | size_t count) | ||
| 318 | { | 320 | { |
| 319 | return serdev_device_write(serdev, data, count, 0); | 321 | return -ENODEV; |
| 320 | } | 322 | } |
| 323 | #endif /* CONFIG_SERIAL_DEV_CTRL_TTYPORT */ | ||
| 321 | 324 | ||
| 322 | #endif /*_LINUX_SERDEV_H */ | 325 | #endif /*_LINUX_SERDEV_H */ |
