smsir.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. *
  4. * Siano Mobile Silicon, Inc.
  5. * MDTV receiver kernel modules.
  6. * Copyright (C) 2006-2009, Uri Shkolnik
  7. *
  8. * Copyright (c) 2010 - Mauro Carvalho Chehab
  9. * - Ported the driver to use rc-core
  10. * - IR raw event decoding is now done at rc-core
  11. * - Code almost re-written
  12. */
  13. #ifndef __SMS_IR_H__
  14. #define __SMS_IR_H__
  15. #include <linux/input.h>
  16. #include <media/rc-core.h>
  17. struct smscore_device_t;
  18. struct ir_t {
  19. struct rc_dev *dev;
  20. char name[40];
  21. char phys[32];
  22. char *rc_codes;
  23. u32 timeout;
  24. u32 controller;
  25. };
  26. #ifdef CONFIG_SMS_SIANO_RC
  27. int sms_ir_init(struct smscore_device_t *coredev);
  28. void sms_ir_exit(struct smscore_device_t *coredev);
  29. void sms_ir_event(struct smscore_device_t *coredev,
  30. const char *buf, int len);
  31. #else
  32. inline static int sms_ir_init(struct smscore_device_t *coredev) {
  33. return 0;
  34. }
  35. inline static void sms_ir_exit(struct smscore_device_t *coredev) {};
  36. inline static void sms_ir_event(struct smscore_device_t *coredev,
  37. const char *buf, int len) {};
  38. #endif
  39. #endif /* __SMS_IR_H__ */