示例#1
0
static ssize_t gyro_selftest_show(struct device *dev,
	struct device_attribute *attr, char *buf)
{
	struct ssp_data *data = dev_get_drvdata(dev);
#ifdef K330_REV
	if (data->ap_rev >= K330_REV)
		return k330_gyro_selftest(buf, data);
	else
		return mpu6500_gyro_selftest(buf, data);
#else
	return mpu6500_gyro_selftest(buf, data);
#endif
}
static ssize_t gyro_selftest_show(struct device *dev,
                                  struct device_attribute *attr, char *buf)
{
    struct ssp_data *data = dev_get_drvdata(dev);

    if (k330_rev > 0) {
        if (is_jf_eur == true) {
            if (data->ap_rev == 13)
                return mpu6500_gyro_selftest(buf, data);
            else if (data->ap_rev >= k330_rev)
                return k330_gyro_selftest(buf, data);
            else
                return mpu6500_gyro_selftest(buf, data);
        } else {
            if (data->ap_rev >= k330_rev)
                return k330_gyro_selftest(buf, data);
            else
                return mpu6500_gyro_selftest(buf, data);
        }
    } else
        return mpu6500_gyro_selftest(buf, data);
}
示例#3
0
static ssize_t gyro_selftest_show(struct device *dev,
	struct device_attribute *attr, char *buf)
{
	struct ssp_data *data = dev_get_drvdata(dev);
	return mpu6500_gyro_selftest(buf, data);
}