| .. | .. |
|---|
| 39 | 39 | /******************************************************************************/ |
|---|
| 40 | 40 | #define GSENSOR_MIN 2 |
|---|
| 41 | 41 | #define MIR3DA_PRECISION 11 |
|---|
| 42 | | -#define MIR3DA_RANGE 1000000 |
|---|
| 42 | +#define MIR3DA_RANGE 16384 |
|---|
| 43 | 43 | #define DA311_BOUNDARY (0x1 << (MIR3DA_PRECISION - 1)) |
|---|
| 44 | 44 | #define DA311_GRAVITY_STEP (MIR3DA_RANGE/DA311_BOUNDARY) |
|---|
| 45 | 45 | /******************************************************************************/ |
|---|
| .. | .. |
|---|
| 775 | 775 | input_report_abs(sensor->input_dev, ABS_Y, (axis.y/64)); |
|---|
| 776 | 776 | input_report_abs(sensor->input_dev, ABS_Z, -(axis.z/64)); |
|---|
| 777 | 777 | #else |
|---|
| 778 | | - input_report_abs(sensor->input_dev, ABS_X, -(axis.x/64)); |
|---|
| 779 | | - input_report_abs(sensor->input_dev, ABS_Y, (axis.y/64)); |
|---|
| 780 | | - input_report_abs(sensor->input_dev, ABS_Z, -(axis.z/64)); |
|---|
| 778 | + input_report_abs(sensor->input_dev, ABS_X, -(axis.x)); |
|---|
| 779 | + input_report_abs(sensor->input_dev, ABS_Y, (axis.y)); |
|---|
| 780 | + input_report_abs(sensor->input_dev, ABS_Z, -(axis.z)); |
|---|
| 781 | 781 | #endif |
|---|
| 782 | 782 | |
|---|
| 783 | 783 | input_sync(sensor->input_dev); |
|---|
| .. | .. |
|---|
| 838 | 838 | } |
|---|
| 839 | 839 | |
|---|
| 840 | 840 | /******************************************************************************/ |
|---|
| 841 | | -struct sensor_operate gsensor_ops = { |
|---|
| 841 | +static struct sensor_operate gsensor_ops = { |
|---|
| 842 | 842 | .name = MIR3DA_DRV_NAME, |
|---|
| 843 | 843 | .type = SENSOR_TYPE_ACCEL, |
|---|
| 844 | 844 | .id_i2c = ACCEL_ID_MIR3DA, |
|---|