cust_gyro.h 839 B

1234567891011121314151617181920212223
  1. #ifndef __CUST_GYRO_H__
  2. #define __CUST_GYRO_H__
  3. #include <linux/types.h>
  4. #define GYRO_CUST_I2C_ADDR_NUM 2
  5. struct gyro_hw {
  6. unsigned short addr;
  7. int i2c_num; /*!< the i2c bus used by the chip */
  8. int direction; /*!< the direction of the chip */
  9. int power_id; /*!< the LDO ID of the chip, MT6516_POWER_NONE means the power is always on*/
  10. int power_vol; /*!< the Power Voltage used by the chip */
  11. int firlen; /*!< the length of low pass filter */
  12. int (*power)(struct gyro_hw *hw, unsigned int on, char *devname);
  13. unsigned char i2c_addr[GYRO_CUST_I2C_ADDR_NUM];
  14. int power_vio_id; /*!< the LDO ID of the chip, MT6516_POWER_NONE means the power is always on*/
  15. int power_vio_vol; /*!< the Power Voltage used by the chip */
  16. bool is_batch_supported;
  17. };
  18. struct gyro_hw *get_gyro_dts_func(const char *, struct gyro_hw*);
  19. #endif