diff options
Diffstat (limited to 'include/linux/serdev.h')
| -rw-r--r-- | include/linux/serdev.h | 16 | 
1 files changed, 14 insertions, 2 deletions
diff --git a/include/linux/serdev.h b/include/linux/serdev.h index d4bb46a26dc3..f153b2c7f0cd 100644 --- a/include/linux/serdev.h +++ b/include/linux/serdev.h @@ -27,8 +27,10 @@ struct serdev_device;  /**   * struct serdev_device_ops - Callback operations for a serdev device - * @receive_buf:	Function called with data received from device. - * @write_wakeup:	Function called when ready to transmit more data. + * @receive_buf:	Function called with data received from device; + *			returns number of bytes accepted; may sleep. + * @write_wakeup:	Function called when ready to transmit more data; must + *			not sleep.   */  struct serdev_device_ops {  	int (*receive_buf)(struct serdev_device *, const unsigned char *, size_t); @@ -76,6 +78,12 @@ static inline struct serdev_device_driver *to_serdev_device_driver(struct device  	return container_of(d, struct serdev_device_driver, driver);  } +enum serdev_parity { +	SERDEV_PARITY_NONE, +	SERDEV_PARITY_EVEN, +	SERDEV_PARITY_ODD, +}; +  /*   * serdev controller structures   */ @@ -86,6 +94,7 @@ struct serdev_controller_ops {  	int (*open)(struct serdev_controller *);  	void (*close)(struct serdev_controller *);  	void (*set_flow_control)(struct serdev_controller *, bool); +	int (*set_parity)(struct serdev_controller *, enum serdev_parity);  	unsigned int (*set_baudrate)(struct serdev_controller *, unsigned int);  	void (*wait_until_sent)(struct serdev_controller *, long);  	int (*get_tiocm)(struct serdev_controller *); @@ -299,6 +308,9 @@ static inline int serdev_device_set_rts(struct serdev_device *serdev, bool enabl  		return serdev_device_set_tiocm(serdev, 0, TIOCM_RTS);  } +int serdev_device_set_parity(struct serdev_device *serdev, +			     enum serdev_parity parity); +  /*   * serdev hooks into TTY core   */  |