Lines Matching refs:en

754 int MPLSensor::onPower(int en)  in onPower()  argument
763 en, mpu.power_state, getTimestamp()); in onPower()
770 if (en != curr_power_state) { in onPower()
771 if((res = write_sysfs_int(mpu.power_state, en)) < 0) { in onPower()
777 curr_power_state, en); in onPower()
782 int MPLSensor::onDMP(int en) in onDMP() argument
810 } else if (status != en) { in onDMP()
811 res = write_sysfs_int(mpu.dmp_on, en); in onDMP()
813 if (write_sysfs_int(mpu.dmp_int_on, en) < 0) { in onDMP()
832 int MPLSensor::enableLPQuaternion(int en) in enableLPQuaternion() argument
836 if (!en) { in enableLPQuaternion()
852 int MPLSensor::enableQuaternionData(int en) in enableQuaternionData() argument
858 res = write_sysfs_int(mpu.quaternion_on, en); in enableQuaternionData()
860 if (!en) { in enableQuaternionData()
866 write_sysfs_int(mpu.in_quat_r_en, en); in enableQuaternionData()
867 write_sysfs_int(mpu.in_quat_x_en, en); in enableQuaternionData()
868 write_sysfs_int(mpu.in_quat_y_en, en); in enableQuaternionData()
869 write_sysfs_int(mpu.in_quat_z_en, en); in enableQuaternionData()
873 if (!en) { in enableQuaternionData()
901 int MPLSensor::masterEnable(int en) in masterEnable() argument
904 return write_sysfs_int(mpu.chip_enable, en); in masterEnable()
907 int MPLSensor::enableGyro(int en) in enableGyro() argument
915 res = write_sysfs_int(mpu.gyro_enable, en); in enableGyro()
917 if (!en) { in enableGyro()
921 write_sysfs_int(mpu.gyro_x_fifo_enable, en); in enableGyro()
922 write_sysfs_int(mpu.gyro_y_fifo_enable, en); in enableGyro()
923 res = write_sysfs_int(mpu.gyro_z_fifo_enable, en); in enableGyro()
929 int MPLSensor::enableAccel(int en) in enableAccel() argument
937 res = write_sysfs_int(mpu.accel_enable, en); in enableAccel()
939 if (!en) { in enableAccel()
943 write_sysfs_int(mpu.accel_x_fifo_enable, en); in enableAccel()
944 write_sysfs_int(mpu.accel_y_fifo_enable, en); in enableAccel()
945 res = write_sysfs_int(mpu.accel_z_fifo_enable, en); in enableAccel()
951 int MPLSensor::enableCompass(int en) in enableCompass() argument
955 int res = mCompassSensor->enable(ID_M, en); in enableCompass()
956 if (!en) { in enableCompass()
1008 int MPLSensor::enableOneSensor(int en, const char *name, int (MPLSensor::*enabler)(int)) { in enableOneSensor() argument
1009 LOGV_IF(PROCESS_VERBOSE, "HAL:enableSensors - %s %s", en ? "enabled" : "disable", name); in enableOneSensor()
1010 return (this->*enabler)(en); in enableOneSensor()
1293 int MPLSensor::enable(int32_t handle, int en) in enable() argument
1305 (en? "en" : "dis")); in enable()
1306 enableDmpOrientation(en && isDmpDisplayOrientationOn()); in enable()
1312 mDmpOrientationEnabled = en; in enable()
1355 int newState = en ? 1 : 0; in enable()
1399 if ((en && !(lastEnabled & ((1 << Orientation) | (1 << RotationVector) | in enable()
1401 (!en && !(mEnabled & ((1 << Orientation) | (1 << RotationVector) | in enable()
2129 int MPLSensor::enableDmpOrientation(int en) in enableDmpOrientation() argument
2146 if (en) { in enableDmpOrientation()
2148 if (write_sysfs_int(mpu.display_orientation_on, en) < 0) { in enableDmpOrientation()