stk1135.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*
  2. * STK1135 registers
  3. *
  4. * Copyright (c) 2013 Ondrej Zary
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 2 of the License, or
  9. * any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. */
  16. #define STK1135_REG_GCTRL 0x000 /* GPIO control */
  17. #define STK1135_REG_ICTRL 0x004 /* Interrupt control */
  18. #define STK1135_REG_IDATA 0x008 /* Interrupt data */
  19. #define STK1135_REG_RMCTL 0x00c /* Remote wakeup control */
  20. #define STK1135_REG_POSVA 0x010 /* Power-on strapping data */
  21. #define STK1135_REG_SENSO 0x018 /* Sensor select options */
  22. #define STK1135_REG_PLLFD 0x01c /* PLL frequency divider */
  23. #define STK1135_REG_SCTRL 0x100 /* Sensor control register */
  24. #define STK1135_REG_DCTRL 0x104 /* Decimation control register */
  25. #define STK1135_REG_CISPO 0x110 /* Capture image starting position */
  26. #define STK1135_REG_CIEPO 0x114 /* Capture image ending position */
  27. #define STK1135_REG_TCTRL 0x120 /* Test data control */
  28. #define STK1135_REG_SICTL 0x200 /* Serial interface control register */
  29. #define STK1135_REG_SBUSW 0x204 /* Serial bus write */
  30. #define STK1135_REG_SBUSR 0x208 /* Serial bus read */
  31. #define STK1135_REG_SCSI 0x20c /* Software control serial interface */
  32. #define STK1135_REG_GSBWP 0x210 /* General serial bus write port */
  33. #define STK1135_REG_GSBRP 0x214 /* General serial bus read port */
  34. #define STK1135_REG_ASIC 0x2fc /* Alternate serial interface control */
  35. #define STK1135_REG_TMGEN 0x300 /* Timing generator */
  36. #define STK1135_REG_TCP1 0x350 /* Timing control parameter 1 */
  37. struct stk1135_pkt_header {
  38. u8 flags;
  39. u8 seq;
  40. __le16 gpio;
  41. } __packed;
  42. #define STK1135_HDR_FRAME_START (1 << 7)
  43. #define STK1135_HDR_ODD (1 << 6)
  44. #define STK1135_HDR_I2C_VBLANK (1 << 5)
  45. #define STK1135_HDR_SEQ_MASK 0x3f