mpu6500_platformdata.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * Copyright (C) 2013 Samsung Electronics. All rights reserved.
  3. *
  4. * This program is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU General Public License
  6. * version 2 as published by the Free Software Foundation.
  7. *
  8. * This program is distributed in the hope that it will be useful, but
  9. * WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. * General Public License for more details.
  12. *
  13. * You should have received a copy of the GNU General Public License
  14. * along with this program; if not, write to the Free Software
  15. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  16. * 02110-1301 USA
  17. */
  18. #ifndef _MPU6500_PLATFORMDATA_H_
  19. #define _MPU6500_PLATFORMDATA_H_
  20. #define MPU6500_TOP_LEFT_UPPER 0
  21. #define MPU6500_TOP_RIGHT_UPPER 1
  22. #define MPU6500_TOP_RIGHT_LOWER 2
  23. #define MPU6500_TOP_LEFT_LOWER 3
  24. #define MPU6500_BOTTOM_LEFT_UPPER 4
  25. #define MPU6500_BOTTOM_RIGHT_UPPER 5
  26. #define MPU6500_BOTTOM_RIGHT_LOWER 6
  27. #define MPU6500_BOTTOM_LEFT_LOWER 7
  28. struct mpu6500_platform_data {
  29. void (*get_pos)(int *);
  30. bool i2c_pull_up;
  31. int gpio_int;
  32. u32 irq_gpio_flags;
  33. int gpio_sda;
  34. u32 sda_gpio_flags;
  35. int gpio_scl;
  36. u32 scl_gpio_flags;
  37. const u8 *str_l6;
  38. const u8 *str_lvs1;
  39. const char *acc_cal_path;
  40. const char *gyro_cal_path;
  41. };
  42. #endif