smsir.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /****************************************************************
  2. Siano Mobile Silicon, Inc.
  3. MDTV receiver kernel modules.
  4. Copyright (C) 2006-2009, Uri Shkolnik
  5. Copyright (c) 2010 - Mauro Carvalho Chehab
  6. - Ported the driver to use rc-core
  7. - IR raw event decoding is now done at rc-core
  8. - Code almost re-written
  9. This program is free software: you can redistribute it and/or modify
  10. it under the terms of the GNU General Public License as published by
  11. the Free Software Foundation, either version 2 of the License, or
  12. (at your option) any later version.
  13. This program is distributed in the hope that it will be useful,
  14. but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. GNU General Public License for more details.
  17. You should have received a copy of the GNU General Public License
  18. along with this program. If not, see <http://www.gnu.org/licenses/>.
  19. ****************************************************************/
  20. #ifndef __SMS_IR_H__
  21. #define __SMS_IR_H__
  22. #include <linux/input.h>
  23. #include <media/rc-core.h>
  24. struct smscore_device_t;
  25. struct ir_t {
  26. struct rc_dev *dev;
  27. char name[40];
  28. char phys[32];
  29. char *rc_codes;
  30. u32 timeout;
  31. u32 controller;
  32. };
  33. #ifdef CONFIG_SMS_SIANO_RC
  34. int sms_ir_init(struct smscore_device_t *coredev);
  35. void sms_ir_exit(struct smscore_device_t *coredev);
  36. void sms_ir_event(struct smscore_device_t *coredev,
  37. const char *buf, int len);
  38. #else
  39. inline static int sms_ir_init(struct smscore_device_t *coredev) {
  40. return 0;
  41. }
  42. inline static void sms_ir_exit(struct smscore_device_t *coredev) {};
  43. inline static void sms_ir_event(struct smscore_device_t *coredev,
  44. const char *buf, int len) {};
  45. #endif
  46. #endif /* __SMS_IR_H__ */