usb_notify_sysfs.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * Copyright (C) 2015 Samsung Electronics Co. Ltd.
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation; either version 2 of the License, or
  7. * (at your option) any later version.
  8. */
  9. #ifndef __LINUX_USB_NOTIFY_SYSFS_H__
  10. #define __LINUX_USB_NOTIFY_SYSFS_H__
  11. #define MAX_DISABLE_STR_LEN 32
  12. enum otg_notify_block_type {
  13. NOTIFY_BLOCK_TYPE_NONE = 0,
  14. NOTIFY_BLOCK_TYPE_HOST = (1 << 0),
  15. NOTIFY_BLOCK_TYPE_CLIENT = (1 << 1),
  16. NOTIFY_BLOCK_TYPE_ALL = (1 << 0 | 1 << 1),
  17. };
  18. struct usb_notify_dev {
  19. const char *name;
  20. struct device *dev;
  21. int index;
  22. unsigned long disable_state;
  23. char disable_state_cmd[MAX_DISABLE_STR_LEN];
  24. int (*set_disable)(struct usb_notify_dev *, int);
  25. };
  26. extern int usb_notify_dev_register(struct usb_notify_dev *ndev);
  27. extern void usb_notify_dev_unregister(struct usb_notify_dev *ndev);
  28. extern int usb_notify_class_init(void);
  29. extern void usb_notify_class_exit(void);
  30. #endif