summaryrefslogtreecommitdiffstats
path: root/modules/fingerprint
diff options
context:
space:
mode:
authorSasha Levitskiy <sanek@google.com>2014-04-18 11:14:11 -0700
committerSasha Levitskiy <sanek@google.com>2014-04-22 10:50:50 -0700
commit7308284e4e8ad35ae531273afeee124a82f480a8 (patch)
treec34a4d56fb73ab75dceb80c8f6fcfc1cc4cadaf5 /modules/fingerprint
parent32853ed46b08ae4236e90cc565acb81e9a739a93 (diff)
downloadhardware_libhardware-7308284e4e8ad35ae531273afeee124a82f480a8.zip
hardware_libhardware-7308284e4e8ad35ae531273afeee124a82f480a8.tar.gz
hardware_libhardware-7308284e4e8ad35ae531273afeee124a82f480a8.tar.bz2
Hardware: Fingerprint: Move the HAL to an async model, add some vendor requested functionality.
Change-Id: Ib99e3edb99579ac4495918eb57d1022d75dccb57 Signed-off-by: Sasha Levitskiy <sanek@google.com>
Diffstat (limited to 'modules/fingerprint')
-rw-r--r--modules/fingerprint/fingerprint.c25
1 files changed, 11 insertions, 14 deletions
diff --git a/modules/fingerprint/fingerprint.c b/modules/fingerprint/fingerprint.c
index a7691ed..c2ff169 100644
--- a/modules/fingerprint/fingerprint.c
+++ b/modules/fingerprint/fingerprint.c
@@ -31,30 +31,26 @@ static int fingerprint_close(hw_device_t *dev)
}
}
-static fingerprint_msg_t fingerprint_enroll(unsigned timeout_sec,
- unsigned *data) {
- (void)timeout_sec;
- (void)data;
+static int fingerprint_enroll(struct fingerprint_device __unused *dev,
+ unsigned __unused timeout_sec) {
return FINGERPRINT_ERROR;
}
-static fingerprint_msg_t fingerprint_remove(unsigned fingerprint_id) {
- (void)fingerprint_id;
+static int fingerprint_remove(struct fingerprint_device __unused *dev,
+ uint16_t __unused fingerprint_id) {
return FINGERPRINT_ERROR;
}
-static fingerprint_msg_t fingerprint_match(unsigned fingerprint_id,
- unsigned timeout_sec) {
- (void)fingerprint_id;
- (void)timeout_sec;
+static int set_notify_callback(struct fingerprint_device *dev,
+ fingerprint_notify_t notify) {
+ /* Decorate with locks */
+ dev->notify = notify;
return FINGERPRINT_ERROR;
}
-static int fingerprint_open(const hw_module_t* module, const char* id,
+static int fingerprint_open(const hw_module_t* module, const char __unused *id,
hw_device_t** device)
{
- (void)id;
-
if (device == NULL) {
ALOGE("NULL device on open");
return -EINVAL;
@@ -70,7 +66,8 @@ static int fingerprint_open(const hw_module_t* module, const char* id,
dev->enroll = fingerprint_enroll;
dev->remove = fingerprint_remove;
- dev->match = fingerprint_match;
+ dev->set_notify = set_notify_callback;
+ dev->notify = NULL;
*device = (hw_device_t*) dev;
return 0;