ir-kbd-i2c.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #ifndef _IR_I2C
  2. #define _IR_I2C
  3. #include <media/ir-common.h>
  4. struct IR_i2c;
  5. struct IR_i2c {
  6. struct ir_scancode_table *ir_codes;
  7. struct i2c_client *c;
  8. struct input_dev *input;
  9. struct ir_input_state ir;
  10. /* Used to avoid fast repeating */
  11. unsigned char old;
  12. struct delayed_work work;
  13. char name[32];
  14. char phys[32];
  15. int (*get_key)(struct IR_i2c*, u32*, u32*);
  16. };
  17. enum ir_kbd_get_key_fn {
  18. IR_KBD_GET_KEY_CUSTOM = 0,
  19. IR_KBD_GET_KEY_PIXELVIEW,
  20. IR_KBD_GET_KEY_PV951,
  21. IR_KBD_GET_KEY_HAUP,
  22. IR_KBD_GET_KEY_KNC1,
  23. IR_KBD_GET_KEY_FUSIONHDTV,
  24. IR_KBD_GET_KEY_HAUP_XVR,
  25. IR_KBD_GET_KEY_AVERMEDIA_CARDBUS,
  26. };
  27. /* Can be passed when instantiating an ir_video i2c device */
  28. struct IR_i2c_init_data {
  29. struct ir_scancode_table *ir_codes;
  30. const char *name;
  31. int type; /* IR_TYPE_RC5, IR_TYPE_PD, etc */
  32. /*
  33. * Specify either a function pointer or a value indicating one of
  34. * ir_kbd_i2c's internal get_key functions
  35. */
  36. int (*get_key)(struct IR_i2c*, u32*, u32*);
  37. enum ir_kbd_get_key_fn internal_get_key_func;
  38. };
  39. #endif