diff options
| author | Ingo Molnar <mingo@kernel.org> | 2018-02-11 11:33:33 +0100 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2018-02-11 11:33:33 +0100 |
| commit | 7980033bea8a74692fdb987c44ec91b0be8e752b (patch) | |
| tree | 02b57329465d397b3a20468a683e56d1cda88cf6 /include/linux/serdev.h | |
| parent | 3197b04bb39b596613ff2f8143c5cd0a6908debf (diff) | |
| parent | f1517df8701c9f12dae9ce7f43a5d300a6917619 (diff) | |
| download | cachepc-linux-7980033bea8a74692fdb987c44ec91b0be8e752b.tar.gz cachepc-linux-7980033bea8a74692fdb987c44ec91b0be8e752b.zip | |
Merge branch 'linus' into x86/urgent, to pick up dependent commits
Signed-off-by: Ingo Molnar <mingo@kernel.org>
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 */ |
