sdm845-common: fingerprint: Allow loading FOD modules

As seen in the vendor image dumps, equuleus ships with goodix_fod
and ursa with goodix_fod or synaptics.

Change-Id: I2ccef59698a570dcb35c331dd7994fb7f7af68f0
This commit is contained in:
Bruno Martins 2020-05-17 22:13:56 +01:00
parent 643f91b165
commit 5673a03633
2 changed files with 12 additions and 12 deletions

View File

@ -272,20 +272,15 @@ fingerprint_device_t* getDeviceForVendor(const char* class_name) {
fingerprint_device_t* getFingerprintDevice() {
fingerprint_device_t* fp_device;
std::string vendor_modules[] = {"fpc", "goodix", "goodix_fod", "syna"};
fp_device = getDeviceForVendor("fpc");
if (fp_device == nullptr) {
ALOGE("Failed to load fpc fingerprint module");
} else {
setFpVendorProp("fpc");
return fp_device;
}
for (const auto& vendor : vendor_modules) {
if ((fp_device = getDeviceForVendor(vendor.c_str())) == nullptr) {
ALOGE("Failed to load %s fingerprint module", vendor.c_str());
continue;
}
fp_device = getDeviceForVendor("goodix");
if (fp_device == nullptr) {
ALOGE("Failed to load goodix fingerprint module");
} else {
setFpVendorProp("goodix");
setFpVendorProp(vendor.c_str());
return fp_device;
}

View File

@ -2,6 +2,9 @@ on init
# Goodix fingerprint
chown system system /dev/goodix_fp
# Synaptics fingerprint
chown system system /dev/vfsspi
on boot
chown system system /sys/bus/platform/devices/soc:fingerprint_fpc/irq
chown system system /sys/bus/platform/devices/soc:fingerprint_fpc/irq_enable
@ -32,6 +35,8 @@ on post-fs-data
mkdir /data/vendor/goodix 0770 system system
mkdir /data/vendor/goodix/gf_data/authenticate 0770 system system
mkdir /data/vendor/goodix/gf_data/enroll 0770 system system
mkdir /data/vendor/syna 0770 system system
mkdir /data/vendor/syna/ist/ 0770 system system
chown system system /data/vendor
service vendor.fps_hal /vendor/bin/hw/android.hardware.biometrics.fingerprint@2.1-service.xiaomi_sdm845