mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
add sensor version info
This commit is contained in:
@@ -192,7 +192,7 @@ static int sensor_report_value(struct i2c_client *client)
|
||||
}
|
||||
|
||||
//filter gyro data
|
||||
if( ((abs(axis.x) > pdata->x_min) & (abs(axis.x) < 240))||(abs(axis.x) > 260) || ((abs(axis.y) > pdata->y_min)& (abs(axis.y) < 240))||(abs(axis.y) > 260)|| ((abs(axis.z) > pdata->z_min) & (abs(axis.z) < 250)) || (abs(axis.z) > 260) )
|
||||
if((abs(axis.x) > pdata->x_min)||(abs(axis.y) > pdata->y_min)||(abs(axis.z) > pdata->z_min))
|
||||
{
|
||||
gyro_report_value(client, &axis);
|
||||
|
||||
|
||||
@@ -43,6 +43,9 @@
|
||||
#define DBG(x...)
|
||||
#endif
|
||||
|
||||
#define SENSOR_VERSION_AND_TIME "sensor-dev.c v1.0 2013-2-18"
|
||||
|
||||
|
||||
struct sensor_private_data *g_sensor[SENSOR_NUM_TYPES];
|
||||
static struct sensor_operate *sensor_ops[SENSOR_NUM_ID];
|
||||
static struct class *g_sensor_class[SENSOR_NUM_TYPES];
|
||||
@@ -1445,6 +1448,8 @@ static int __init sensor_init(void)
|
||||
pr_info("%s: Probe name %s\n", __func__, sensor_driver.driver.name);
|
||||
if (res)
|
||||
pr_err("%s failed\n", __func__);
|
||||
|
||||
printk("%s\n", SENSOR_VERSION_AND_TIME);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user