diff options
| author | wzedlare <vedatak01@gmail.com> | 2017-06-18 16:38:26 +0000 |
|---|---|---|
| committer | wzedlare <vedatak01@gmail.com> | 2017-06-19 16:57:11 +0000 |
| commit | c7d4e3fd588e3ba3d3fa4d5cfa224aa54bc288bf (patch) | |
| tree | b8b64cb9deb6832c1e41f58f0f143514beafc709 /include/linux/usb/tty_diag.h | |
| parent | 28c99c87b881bb664c44bb26e80a681f87d54e60 (diff) | |
Change-Id: Ia4c94f09e29843b1af34d466243378a357e97b70
Diffstat (limited to 'include/linux/usb/tty_diag.h')
| -rw-r--r-- | include/linux/usb/tty_diag.h | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/include/linux/usb/tty_diag.h b/include/linux/usb/tty_diag.h new file mode 100644 index 00000000..665f77ac --- /dev/null +++ b/include/linux/usb/tty_diag.h @@ -0,0 +1,60 @@ +#ifndef _DRIVERS_TTY_DIAG_H_ +#define _DRIVERS_TTY_DIAG_H_ + +#ifdef CONFIG_DIAG_OVER_USB +#include <linux/usb/usbdiag.h> +#endif + +#ifdef CONFIG_DIAG_OVER_TTY +struct usb_diag_ch *tty_diag_channel_open(const char *name, void *priv, + void (*notify)(void *, unsigned, struct diag_request *)); +void tty_diag_channel_close(struct usb_diag_ch *diag_ch); +int tty_diag_channel_read(struct usb_diag_ch *diag_ch, + struct diag_request *d_req); +int tty_diag_channel_write(struct usb_diag_ch *diag_ch, + struct diag_request *d_req); +void tty_diag_channel_abandon_request(void); +int tty_diag_get_dbg_ftm_flag_value(void); +int tty_diag_set_dbg_ftm_flag_value(int val); +#else +static inline struct usb_diag_ch *tty_diag_channel_open(const char *name, + void *priv, + void (*notify)(void *, unsigned, struct diag_request *)) +{ + return ERR_PTR(-ENODEV); +} + +static inline void tty_diag_channel_close(struct usb_diag_ch *diag_ch) +{ +} + +static inline int tty_diag_channel_read(struct usb_diag_ch *diag_ch, + struct diag_request *d_req) +{ + return -ENODEV; +} + +static inline int tty_diag_channel_write(struct usb_diag_ch *diag_ch, + struct diag_request *d_req) +{ + return -ENODEV; +} + +static inline void tty_diag_channel_abandon_request(void) +{ + return -ENODEV; +} + +static inline int tty_diag_get_dbg_ftm_flag_value(void) +{ + return -ENODEV; +} + +static inline int tty_diag_set_dbg_ftm_flag_value(int val) +{ + return -ENODEV; +} + +#endif + +#endif /* _DRIVERS_TTY_DIAG_H_ */ |
