HID: amd_sfh: Disable the interrupt for all command

Sensor data is processed in polling mode. Hence disable the interrupt
for all sensor command.

Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
This commit is contained in:
Basavaraj Natikar 2022-02-08 17:51:10 +05:30 committed by Jiri Kosina
parent aa0b724a2b
commit b300667b33
1 changed files with 3 additions and 0 deletions

View File

@ -53,6 +53,7 @@ static void amd_start_sensor_v2(struct amd_mp2_dev *privdata, struct amd_mp2_sen
cmd_base.ul = 0; cmd_base.ul = 0;
cmd_base.cmd_v2.cmd_id = ENABLE_SENSOR; cmd_base.cmd_v2.cmd_id = ENABLE_SENSOR;
cmd_base.cmd_v2.intr_disable = 1;
cmd_base.cmd_v2.period = info.period; cmd_base.cmd_v2.period = info.period;
cmd_base.cmd_v2.sensor_id = info.sensor_idx; cmd_base.cmd_v2.sensor_id = info.sensor_idx;
cmd_base.cmd_v2.length = 16; cmd_base.cmd_v2.length = 16;
@ -70,6 +71,7 @@ static void amd_stop_sensor_v2(struct amd_mp2_dev *privdata, u16 sensor_idx)
cmd_base.ul = 0; cmd_base.ul = 0;
cmd_base.cmd_v2.cmd_id = DISABLE_SENSOR; cmd_base.cmd_v2.cmd_id = DISABLE_SENSOR;
cmd_base.cmd_v2.intr_disable = 1;
cmd_base.cmd_v2.period = 0; cmd_base.cmd_v2.period = 0;
cmd_base.cmd_v2.sensor_id = sensor_idx; cmd_base.cmd_v2.sensor_id = sensor_idx;
cmd_base.cmd_v2.length = 16; cmd_base.cmd_v2.length = 16;
@ -83,6 +85,7 @@ static void amd_stop_all_sensor_v2(struct amd_mp2_dev *privdata)
union sfh_cmd_base cmd_base; union sfh_cmd_base cmd_base;
cmd_base.cmd_v2.cmd_id = STOP_ALL_SENSORS; cmd_base.cmd_v2.cmd_id = STOP_ALL_SENSORS;
cmd_base.cmd_v2.intr_disable = 1;
cmd_base.cmd_v2.period = 0; cmd_base.cmd_v2.period = 0;
cmd_base.cmd_v2.sensor_id = 0; cmd_base.cmd_v2.sensor_id = 0;