smsir.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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. #define IR_DEFAULT_TIMEOUT 100
  25. struct smscore_device_t;
  26. struct ir_t {
  27. struct rc_dev *dev;
  28. char name[40];
  29. char phys[32];
  30. char *rc_codes;
  31. u32 timeout;
  32. u32 controller;
  33. };
  34. #ifdef CONFIG_SMS_SIANO_RC
  35. int sms_ir_init(struct smscore_device_t *coredev);
  36. void sms_ir_exit(struct smscore_device_t *coredev);
  37. void sms_ir_event(struct smscore_device_t *coredev,
  38. const char *buf, int len);
  39. #else
  40. inline static int sms_ir_init(struct smscore_device_t *coredev) {
  41. return 0;
  42. }
  43. inline static void sms_ir_exit(struct smscore_device_t *coredev) {};
  44. inline static void sms_ir_event(struct smscore_device_t *coredev,
  45. const char *buf, int len) {};
  46. #endif
  47. #endif /* __SMS_IR_H__ */