cust_acc.h 911 B

12345678910111213141516171819202122
  1. #ifndef __CUST_ACC_H__
  2. #define __CUST_ACC_H__
  3. #include <linux/types.h>
  4. #define G_CUST_I2C_ADDR_NUM 2
  5. struct acc_hw {
  6. int i2c_num; /*!< the i2c bus used by the chip */
  7. int direction; /*!< the direction of the chip */
  8. int power_id; /*!< the VDD LDO ID of the chip, MT6516_POWER_NONE means the power is always on */
  9. int power_vol; /*!< the VDD Power Voltage used by the chip */
  10. int firlen; /*!< the length of low pass filter */
  11. int (*power)(struct acc_hw *hw, unsigned int on, char *devname);
  12. /*!< i2c address list,for chips which has different addresses with different HW layout */
  13. unsigned char i2c_addr[G_CUST_I2C_ADDR_NUM];
  14. int power_vio_id; /*!< the VIO LDO ID of the chip, MT6516_POWER_NONE means the power is always on */
  15. int power_vio_vol; /*!< the VIO Power Voltage used by the chip */
  16. bool is_batch_supported;
  17. };
  18. struct acc_hw *get_accel_dts_func(const char *, struct acc_hw*);
  19. #endif