mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
input: sensors: accel: mxc6655xa: add missing sync events.
If there is no mutex lock between run and active in aidl, closing the sensor when reporting an event will cause an address exception. After we added the mutex lock, we found that the reading process would be blocked probabilistically when waking up from deep sleep, and activating the sensor at this time would cause a deadlock. Adding a sync event fixed this issue. Type: Fix Redmine ID: 472806 Associated modifications: https://10.10.10.29/c/android/rk/hardware/rk29/sensor/+/232874 Test: Deep sleep test Signed-off-by: Bian Jin chen <kenjc.bian@rock-chips.com> Change-Id: I5275af261be189ef70a30a8b544fcbd0c356ff41
This commit is contained in:
@@ -140,6 +140,7 @@ static int gsensor_report_value(struct i2c_client *client,
|
||||
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);
|
||||
input_sync(sensor->input_dev);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user