input: sensor: accel: fix gsensor da223 calibrate fail

Signed-off-by: Wangqiang Guo <kay.guo@rock-chips.com>
Change-Id: If0868cb0b198dfc58cb9b380667a7a9a350a1507
This commit is contained in:
Wangqiang Guo
2022-06-06 01:20:55 +00:00
committed by Tao Huang
parent 2b5f381883
commit 2fe91f92a1

View File

@@ -39,7 +39,7 @@
/******************************************************************************/
#define GSENSOR_MIN 2
#define MIR3DA_PRECISION 11
#define MIR3DA_RANGE 1000000
#define MIR3DA_RANGE 16384
#define DA311_BOUNDARY (0x1 << (MIR3DA_PRECISION - 1))
#define DA311_GRAVITY_STEP (MIR3DA_RANGE/DA311_BOUNDARY)
/******************************************************************************/
@@ -775,9 +775,9 @@ static int sensor_report_value(struct i2c_client *client)
input_report_abs(sensor->input_dev, ABS_Y, (axis.y/64));
input_report_abs(sensor->input_dev, ABS_Z, -(axis.z/64));
#else
input_report_abs(sensor->input_dev, ABS_X, -(axis.x/64));
input_report_abs(sensor->input_dev, ABS_Y, (axis.y/64));
input_report_abs(sensor->input_dev, ABS_Z, -(axis.z/64));
input_report_abs(sensor->input_dev, ABS_X, -(axis.x));
input_report_abs(sensor->input_dev, ABS_Y, (axis.y));
input_report_abs(sensor->input_dev, ABS_Z, -(axis.z));
#endif
input_sync(sensor->input_dev);