olpc.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. * OLPC touchpad PS/2 mouse driver
  3. *
  4. * Copyright (c) 2006 One Laptop Per Child, inc.
  5. *
  6. * This driver is partly based on the ALPS driver.
  7. * Copyright (c) 2003 Peter Osterlund <[email protected]>
  8. * Copyright (c) 2005 Vojtech Pavlik <[email protected]>
  9. *
  10. * This program is free software; you can redistribute it and/or modify it
  11. * under the terms of the GNU General Public License version 2 as published by
  12. * the Free Software Foundation.
  13. */
  14. #ifndef _OLPC_H
  15. #define _OLPC_H
  16. struct olpc_model_info {
  17. unsigned char signature[3];
  18. unsigned char flags;
  19. };
  20. struct olpc_data {
  21. struct input_dev *dev2; /* Relative device */
  22. struct psmouse *psmouse;
  23. char name[32]; /* Name */
  24. char phys[32]; /* Phys */
  25. struct olpc_model_info *i; /* Info */
  26. int pending_mode;
  27. int current_mode;
  28. s64 late;
  29. struct delayed_work mode_switch;
  30. };
  31. #ifdef CONFIG_MOUSE_PS2_OLPC
  32. int olpc_detect(struct psmouse *psmouse, int set_properties);
  33. int olpc_init(struct psmouse *psmouse);
  34. #else
  35. inline int olpc_detect(struct psmouse *psmouse, int set_properties)
  36. {
  37. return -ENOSYS;
  38. }
  39. inline int olpc_init(struct psmouse *psmouse)
  40. {
  41. return -ENOSYS;
  42. }
  43. #endif
  44. #endif