cm36686.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*
  2. * This software is licensed under the terms of the GNU General Public
  3. * License version 2, as published by the Free Software Foundation, and
  4. * may be copied, distributed, and modified under those terms.
  5. *
  6. * This program is distributed in the hope that it will be useful,
  7. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  8. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  9. * GNU General Public License for more details.
  10. *
  11. */
  12. /*
  13. * Definitions for CM36686 als/ps sensor chip.
  14. */
  15. #ifndef __CM36686_H__
  16. #define __CM36686_H__
  17. #include <linux/ioctl.h>
  18. /*cm36686 als/ps sensor register related macro*/
  19. #define CM36686_REG_ALS_CONF 0X00
  20. #define CM36686_REG_ALS_THDH 0X01
  21. #define CM36686_REG_ALS_THDL 0X02
  22. #define CM36686_REG_PS_CONF1_2 0X03
  23. #define CM36686_REG_PS_CONF3_MS 0x04
  24. #define CM36686_REG_PS_CANC 0X05
  25. #define CM36686_REG_PS_THDL 0X06
  26. #define CM36686_REG_PS_THDH 0X07
  27. #define CM36686_REG_PS_DATA 0X08
  28. #define CM36686_REG_ALS_DATA 0X09
  29. #define CM36686_REG_INT_FLAG 0X0B
  30. #define CM36686_REG_ID_MODE 0X0C
  31. /*CM36686 related driver tag macro*/
  32. #define CM36686_SUCCESS (0)
  33. #define CM36686_ERR_I2C (-1)
  34. #define CM36686_ERR_STATUS (-3)
  35. #define CM36686_ERR_SETUP_FAILURE (-4)
  36. #define CM36686_ERR_GETGSENSORDATA (-5)
  37. #define CM36686_ERR_IDENTIFICATION (-6)
  38. #endif