Lines Matching refs:device
54 * shown below. When device is not authenticating or enrolling, it is expected to be in
57 * Note that this is completely independent of device wake state. If the hardware device was in
58 * the "scan" state when the device drops into power collapse, it should resume scanning when power
78 fingerprint_device_t device; // "inheritance"
238 static uint64_t fingerprint_get_auth_id(struct fingerprint_device* device) {
242 qemu_fingerprint_device_t* qdev = (qemu_fingerprint_device_t*)device;
253 static int fingerprint_set_active_group(struct fingerprint_device *device, uint32_t gid,
256 qemu_fingerprint_device_t* qdev = (qemu_fingerprint_device_t*)device;
285 static int fingerprint_authenticate(struct fingerprint_device *device,
288 qemu_fingerprint_device_t* qdev = (qemu_fingerprint_device_t*)device;
305 * Note: As with fingerprint_authenticate(), this would run in TEE on a real device.
307 static int fingerprint_enroll(struct fingerprint_device *device,
312 qemu_fingerprint_device_t* dev = (qemu_fingerprint_device_t*)device;
352 static uint64_t fingerprint_pre_enroll(struct fingerprint_device *device) {
355 qemu_fingerprint_device_t* qdev = (qemu_fingerprint_device_t*)device;
369 static int fingerprint_post_enroll(struct fingerprint_device* device) {
371 qemu_fingerprint_device_t* qdev = (qemu_fingerprint_device_t*)device;
384 static int fingerprint_cancel(struct fingerprint_device *device) {
386 qemu_fingerprint_device_t* qdev = (qemu_fingerprint_device_t*)device;
395 qdev->device.notify(&msg);
400 static int fingerprint_enumerate(struct fingerprint_device *device) {
402 if (device == NULL) {
407 qemu_fingerprint_device_t* qdev = (qemu_fingerprint_device_t*)device;
426 qdev->device.notify(&message);
433 static int fingerprint_remove(struct fingerprint_device *device,
438 if (device == NULL) {
440 "device not initialized properly",
445 qemu_fingerprint_device_t* qdev = (qemu_fingerprint_device_t*)device;
467 device->notify(&msg);
479 device->notify(&msg);
509 device->notify(&msg);
515 static int set_notify_callback(struct fingerprint_device *device,
518 if (device == NULL || notify == NULL) {
519 ALOGE("Failed to set notify callback @ %p for fingerprint device %p",
520 device, notify);
524 qemu_fingerprint_device_t* qdev = (qemu_fingerprint_device_t*)device;
527 device->notify = notify;
570 qdev->device.notify(&acqu_msg);
571 qdev->device.notify(&auth_msg);
618 qdev->device.notify(&msg);
776 static int fingerprint_close(hw_device_t* device) {
778 if (device == NULL) {
779 ALOGE("fingerprint hw device is NULL");
783 qemu_fingerprint_device_t* qdev = (qemu_fingerprint_device_t*)device;
797 hw_device_t** device)
801 if (device == NULL) {
802 ALOGE("NULL device on open");
809 ALOGE("Insufficient memory for virtual fingerprint device");
814 qdev->device.common.tag = HARDWARE_DEVICE_TAG;
815 qdev->device.common.version = HARDWARE_MODULE_API_VERSION(2, 1);
816 qdev->device.common.module = (struct hw_module_t*)module;
817 qdev->device.common.close = fingerprint_close;
819 qdev->device.pre_enroll = fingerprint_pre_enroll;
820 qdev->device.enroll = fingerprint_enroll;
821 qdev->device.post_enroll = fingerprint_post_enroll;
822 qdev->device.get_authenticator_id = fingerprint_get_auth_id;
823 qdev->device.set_active_group = fingerprint_set_active_group;
824 qdev->device.authenticate = fingerprint_authenticate;
825 qdev->device.cancel = fingerprint_cancel;
826 qdev->device.enumerate = fingerprint_enumerate;
827 qdev->device.remove = fingerprint_remove;
828 qdev->device.set_notify = set_notify_callback;
829 qdev->device.notify = NULL;
838 *device = &qdev->device.common;