hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/input/sensors/accel/da223_cust.c
....@@ -39,7 +39,7 @@
3939 /******************************************************************************/
4040 #define GSENSOR_MIN 2
4141 #define MIR3DA_PRECISION 11
42
-#define MIR3DA_RANGE 1000000
42
+#define MIR3DA_RANGE 16384
4343 #define DA311_BOUNDARY (0x1 << (MIR3DA_PRECISION - 1))
4444 #define DA311_GRAVITY_STEP (MIR3DA_RANGE/DA311_BOUNDARY)
4545 /******************************************************************************/
....@@ -775,9 +775,9 @@
775775 input_report_abs(sensor->input_dev, ABS_Y, (axis.y/64));
776776 input_report_abs(sensor->input_dev, ABS_Z, -(axis.z/64));
777777 #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));
781781 #endif
782782
783783 input_sync(sensor->input_dev);
....@@ -838,7 +838,7 @@
838838 }
839839
840840 /******************************************************************************/
841
-struct sensor_operate gsensor_ops = {
841
+static struct sensor_operate gsensor_ops = {
842842 .name = MIR3DA_DRV_NAME,
843843 .type = SENSOR_TYPE_ACCEL,
844844 .id_i2c = ACCEL_ID_MIR3DA,