/include/linux/input/rmi_i2c.h

https://github.com/airy09/android_kernel_sony_apq8064 · C Header · 58 lines · 11 code · 6 blank · 41 comment · 0 complexity · e87fba0adc64c9fab412ddfd0702afbd MD5 · raw file

  1. /**
  2. *
  3. * Synaptics RMI over I2C Physical Layer Driver Header File.
  4. * Copyright (c) 2007 - 2011, Synaptics Incorporated
  5. *
  6. */
  7. /*
  8. * This file is licensed under the GPL2 license.
  9. *
  10. *#############################################################################
  11. * GPL
  12. *
  13. * This program is free software; you can redistribute it and/or modify it
  14. * under the terms of the GNU General Public License version 2 as published
  15. * by the Free Software Foundation.
  16. *
  17. * This program is distributed in the hope that it will be useful, but
  18. * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  19. * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
  20. * for more details.
  21. *
  22. *#############################################################################
  23. */
  24. #ifndef _RMI_I2C_H
  25. #define _RMI_I2C_H
  26. #include <linux/input/rmi_platformdata.h>
  27. /* Sensor-specific configuration data, to be included as the platform data
  28. * for the relevant i2c_board_info entry.
  29. *
  30. * This describes a single RMI4 sensor on an I2C bus, including:
  31. * its I2C address, IRQ (if any), the type of IRQ (if applicable), and an
  32. * optional list of any non-default settings (on a per function basis)
  33. * to be applied at start up.
  34. */
  35. struct rmi_i2c_platformdata {
  36. /* The seven-bit i2c address of the sensor. */
  37. int i2c_address;
  38. /* The number of the irq. Set to zero if polling is required. */
  39. int irq;
  40. /* The type of the irq (e.g., IRQF_TRIGGER_FALLING).
  41. * Only valid if irq != 0 */
  42. int irq_type;
  43. /* If >0, the driver will delay this many milliseconds before attempting
  44. * I2C communications. This is necessary because some horribly broken
  45. * development systems don't bring their I2C up very fast after system
  46. * power on or reboot. In most cases, you can safely ignore this.
  47. */
  48. int delay_ms;
  49. /* Use this to specify platformdata that is not I2C specific. */
  50. struct rmi_sensordata *sensordata;
  51. };
  52. #endif