/* This function validates the chip ID of device */
static int drv_acc_gyro_bosch_bmi260_validate_id(i2c_dev_t *drv, uint8_t id_value)
/* This function validates the chip ID of device */
static int drv_acc_gyro_bosch_bmi260_validate_id(i2c_dev_t *drv, uint8_t id_value)
{
    uint8_t value = 0x00;
    int     ret = 0;
    if(drv == NULL) {
        return -1;
    }
    ret = sensor_i2c_read(drv, BMI2_CHIP_ID_ADDR, &value, I2C_DATA_LEN,
                          I2C_OP_RETRIES);
    if(unlikely(ret) != 0) {
        printf("read CHIPID failed \n");
        return ret;
    }
    printf("!!!!!!read CHIPID  %x\n", value);
    if(id_value != (value & 0x20)) {
        printf("!!!!!failed read CHIPID  %x\n", value);
        return -1;
    }
    return 0;
}