debian/patches: Add support for new elan, goodix and synaptics drivers

Most of the drivers only need to list new product IDs to work with new
devices, and including other changes that new devices may require.

LP: #1945296
LP: #1945298
This commit is contained in:
Marco Trevisan (Treviño)
2021-10-11 05:15:56 -04:00
parent c9bb40364e
commit 4058a81829
16 changed files with 811 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
From: Liran Piade <liranpiade@gmail.com>
Date: Mon, 5 Jul 2021 14:18:42 +0000
Subject: Added ELAN 0c6e (from ROG Flow X13)
---
data/autosuspend.hwdb | 1 +
libfprint/drivers/elan.h | 1 +
2 files changed, 2 insertions(+)
diff --git a/data/autosuspend.hwdb b/data/autosuspend.hwdb
index afc86f4..b9ec5da 100644
--- a/data/autosuspend.hwdb
+++ b/data/autosuspend.hwdb
@@ -123,6 +123,7 @@ usb:v04F3p0C42*
usb:v04F3p0C4D*
usb:v04F3p0C4F*
usb:v04F3p0C63*
+usb:v04F3p0C6E*
ID_AUTOSUSPEND=1
# Supported by libfprint driver etes603
diff --git a/libfprint/drivers/elan.h b/libfprint/drivers/elan.h
index 00afe79..e14977e 100644
--- a/libfprint/drivers/elan.h
+++ b/libfprint/drivers/elan.h
@@ -218,6 +218,7 @@ static const FpIdEntry elan_id_table[] = {
{.vid = ELAN_VEND_ID, .pid = 0x0c4d, .driver_data = ELAN_ALL_DEV},
{.vid = ELAN_VEND_ID, .pid = 0x0c4f, .driver_data = ELAN_ALL_DEV},
{.vid = ELAN_VEND_ID, .pid = 0x0c63, .driver_data = ELAN_ALL_DEV},
+ {.vid = ELAN_VEND_ID, .pid = 0x0c6e, .driver_data = ELAN_ALL_DEV},
{.vid = 0, .pid = 0, .driver_data = 0},
};
+36
View File
@@ -0,0 +1,36 @@
From: Benjamin Berg <bberg@redhat.com>
Date: Wed, 28 Apr 2021 15:23:49 +0200
Subject: elan: Add PID 0c3d
Users are reporting that the sensor works fine.
Closes: #214
---
data/autosuspend.hwdb | 1 +
libfprint/drivers/elan.h | 1 +
2 files changed, 2 insertions(+)
diff --git a/data/autosuspend.hwdb b/data/autosuspend.hwdb
index 98f391a..b763f80 100644
--- a/data/autosuspend.hwdb
+++ b/data/autosuspend.hwdb
@@ -118,6 +118,7 @@ usb:v04F3p0C30*
usb:v04F3p0C31*
usb:v04F3p0C32*
usb:v04F3p0C33*
+usb:v04F3p0C3D*
usb:v04F3p0C42*
usb:v04F3p0C4D*
ID_AUTOSUSPEND=1
diff --git a/libfprint/drivers/elan.h b/libfprint/drivers/elan.h
index 989778e..4b93cab 100644
--- a/libfprint/drivers/elan.h
+++ b/libfprint/drivers/elan.h
@@ -213,6 +213,7 @@ static const FpIdEntry elan_id_table[] = {
{.vid = ELAN_VEND_ID, .pid = 0x0c31, .driver_data = ELAN_ALL_DEV},
{.vid = ELAN_VEND_ID, .pid = 0x0c32, .driver_data = ELAN_ALL_DEV},
{.vid = ELAN_VEND_ID, .pid = 0x0c33, .driver_data = ELAN_ALL_DEV},
+ {.vid = ELAN_VEND_ID, .pid = 0x0c3d, .driver_data = ELAN_ALL_DEV},
{.vid = ELAN_VEND_ID, .pid = 0x0c42, .driver_data = ELAN_0C42},
{.vid = ELAN_VEND_ID, .pid = 0x0c4d, .driver_data = ELAN_ALL_DEV},
{.vid = 0, .pid = 0, .driver_data = 0},
+55
View File
@@ -0,0 +1,55 @@
From: Benjamin Berg <bberg@redhat.com>
Date: Wed, 28 Apr 2021 15:43:14 +0200
Subject: elan: Add PID 0c4f
Users are reporting that the sensor works fine.
---
data/autosuspend.hwdb | 2 +-
libfprint/drivers/elan.h | 1 +
libfprint/fprint-list-udev-hwdb.c | 1 -
3 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/data/autosuspend.hwdb b/data/autosuspend.hwdb
index b763f80..8aad795 100644
--- a/data/autosuspend.hwdb
+++ b/data/autosuspend.hwdb
@@ -121,6 +121,7 @@ usb:v04F3p0C33*
usb:v04F3p0C3D*
usb:v04F3p0C42*
usb:v04F3p0C4D*
+usb:v04F3p0C4F*
ID_AUTOSUSPEND=1
# Supported by libfprint driver etes603
@@ -209,7 +210,6 @@ usb:v04F3p036B*
usb:v04F3p0C00*
usb:v04F3p0C4B*
usb:v04F3p0C4C*
-usb:v04F3p0C4F*
usb:v04F3p0C57*
usb:v04F3p2706*
usb:v06CBp0081*
diff --git a/libfprint/drivers/elan.h b/libfprint/drivers/elan.h
index 4b93cab..b6a0fc1 100644
--- a/libfprint/drivers/elan.h
+++ b/libfprint/drivers/elan.h
@@ -216,6 +216,7 @@ static const FpIdEntry elan_id_table[] = {
{.vid = ELAN_VEND_ID, .pid = 0x0c3d, .driver_data = ELAN_ALL_DEV},
{.vid = ELAN_VEND_ID, .pid = 0x0c42, .driver_data = ELAN_0C42},
{.vid = ELAN_VEND_ID, .pid = 0x0c4d, .driver_data = ELAN_ALL_DEV},
+ {.vid = ELAN_VEND_ID, .pid = 0x0c4f, .driver_data = ELAN_ALL_DEV},
{.vid = 0, .pid = 0, .driver_data = 0},
};
diff --git a/libfprint/fprint-list-udev-hwdb.c b/libfprint/fprint-list-udev-hwdb.c
index 2a78e81..8f651c0 100644
--- a/libfprint/fprint-list-udev-hwdb.c
+++ b/libfprint/fprint-list-udev-hwdb.c
@@ -33,7 +33,6 @@ static const FpIdEntry whitelist_id_table[] = {
{ .vid = 0x04f3, .pid = 0x0c00 },
{ .vid = 0x04f3, .pid = 0x0c4b },
{ .vid = 0x04f3, .pid = 0x0c4c },
- { .vid = 0x04f3, .pid = 0x0c4f },
{ .vid = 0x04f3, .pid = 0x0c57 },
{ .vid = 0x04f3, .pid = 0x2706 },
{ .vid = 0x06cb, .pid = 0x0081 },
+36
View File
@@ -0,0 +1,36 @@
From: Benjamin Berg <bberg@redhat.com>
Date: Wed, 28 Apr 2021 15:47:18 +0200
Subject: elan: Add PID 0c63
Users are reporting that the sensor works fine.
Closes: #357
---
data/autosuspend.hwdb | 1 +
libfprint/drivers/elan.h | 1 +
2 files changed, 2 insertions(+)
diff --git a/data/autosuspend.hwdb b/data/autosuspend.hwdb
index 8aad795..afc86f4 100644
--- a/data/autosuspend.hwdb
+++ b/data/autosuspend.hwdb
@@ -122,6 +122,7 @@ usb:v04F3p0C3D*
usb:v04F3p0C42*
usb:v04F3p0C4D*
usb:v04F3p0C4F*
+usb:v04F3p0C63*
ID_AUTOSUSPEND=1
# Supported by libfprint driver etes603
diff --git a/libfprint/drivers/elan.h b/libfprint/drivers/elan.h
index b6a0fc1..00afe79 100644
--- a/libfprint/drivers/elan.h
+++ b/libfprint/drivers/elan.h
@@ -217,6 +217,7 @@ static const FpIdEntry elan_id_table[] = {
{.vid = ELAN_VEND_ID, .pid = 0x0c42, .driver_data = ELAN_0C42},
{.vid = ELAN_VEND_ID, .pid = 0x0c4d, .driver_data = ELAN_ALL_DEV},
{.vid = ELAN_VEND_ID, .pid = 0x0c4f, .driver_data = ELAN_ALL_DEV},
+ {.vid = ELAN_VEND_ID, .pid = 0x0c63, .driver_data = ELAN_ALL_DEV},
{.vid = 0, .pid = 0, .driver_data = 0},
};
+33
View File
@@ -0,0 +1,33 @@
From: mozgovoy <mozgovoy@playkot.com>
Date: Thu, 29 Jul 2021 20:40:07 +0300
Subject: elan: Add PID 0x0c58
---
data/autosuspend.hwdb | 1 +
libfprint/drivers/elan.h | 1 +
2 files changed, 2 insertions(+)
diff --git a/data/autosuspend.hwdb b/data/autosuspend.hwdb
index b9ec5da..e46f172 100644
--- a/data/autosuspend.hwdb
+++ b/data/autosuspend.hwdb
@@ -124,6 +124,7 @@ usb:v04F3p0C4D*
usb:v04F3p0C4F*
usb:v04F3p0C63*
usb:v04F3p0C6E*
+usb:v04F3p0C58*
ID_AUTOSUSPEND=1
# Supported by libfprint driver etes603
diff --git a/libfprint/drivers/elan.h b/libfprint/drivers/elan.h
index e14977e..33f3aef 100644
--- a/libfprint/drivers/elan.h
+++ b/libfprint/drivers/elan.h
@@ -219,6 +219,7 @@ static const FpIdEntry elan_id_table[] = {
{.vid = ELAN_VEND_ID, .pid = 0x0c4f, .driver_data = ELAN_ALL_DEV},
{.vid = ELAN_VEND_ID, .pid = 0x0c63, .driver_data = ELAN_ALL_DEV},
{.vid = ELAN_VEND_ID, .pid = 0x0c6e, .driver_data = ELAN_ALL_DEV},
+ {.vid = ELAN_VEND_ID, .pid = 0x0c58, .driver_data = ELAN_ALL_DEV},
{.vid = 0, .pid = 0, .driver_data = 0},
};
+33
View File
@@ -0,0 +1,33 @@
From: Nelson Jeppesen <code@jeppesen.io>
Date: Fri, 7 May 2021 13:02:11 -0700
Subject: goodixmoc: Add PID 6A94
---
data/autosuspend.hwdb | 1 +
libfprint/drivers/goodixmoc/goodix.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/data/autosuspend.hwdb b/data/autosuspend.hwdb
index 14f4518..7d03dba 100644
--- a/data/autosuspend.hwdb
+++ b/data/autosuspend.hwdb
@@ -133,6 +133,7 @@ usb:v27C6p60A2*
usb:v27C6p63AC*
usb:v27C6p639C*
usb:v27C6p6594*
+usb:v27C6p6A94*
ID_AUTOSUSPEND=1
# Supported by libfprint driver synaptics
diff --git a/libfprint/drivers/goodixmoc/goodix.c b/libfprint/drivers/goodixmoc/goodix.c
index 77278c6..d67d392 100644
--- a/libfprint/drivers/goodixmoc/goodix.c
+++ b/libfprint/drivers/goodixmoc/goodix.c
@@ -1554,6 +1554,7 @@ static const FpIdEntry id_table[] = {
{ .vid = 0x27c6, .pid = 0x63AC, },
{ .vid = 0x27c6, .pid = 0x639C, },
{ .vid = 0x27c6, .pid = 0x6594, },
+ { .vid = 0x27c6, .pid = 0x6A94, },
{ .vid = 0, .pid = 0, .driver_data = 0 }, /* terminating entry */
};
@@ -0,0 +1,79 @@
From: Benjamin Berg <bberg@redhat.com>
Date: Fri, 23 Apr 2021 10:58:46 +0200
Subject: goodixmoc: Remove internal cancellable
The driver has an internal cancellable that simply forwards the external
cancellation in the cancel callback. This is not really needed, we can
instead just use the external cancellable directly by fetching it using
fpi_device_get_cancellable().
---
libfprint/drivers/goodixmoc/goodix.c | 21 +--------------------
1 file changed, 1 insertion(+), 20 deletions(-)
diff --git a/libfprint/drivers/goodixmoc/goodix.c b/libfprint/drivers/goodixmoc/goodix.c
index d67d392..38b6ff4 100644
--- a/libfprint/drivers/goodixmoc/goodix.c
+++ b/libfprint/drivers/goodixmoc/goodix.c
@@ -54,7 +54,6 @@ struct _FpiDeviceGoodixMoc
gint enroll_stage;
gint max_enroll_stage;
gint max_stored_prints;
- GCancellable *cancellable;
GPtrArray *list_result;
guint8 template_id[TEMPLATE_ID_SIZE];
gboolean is_enroll_identify;
@@ -220,7 +219,7 @@ fp_cmd_run_state (FpiSsm *ssm,
fpi_usb_transfer_fill_bulk (transfer, EP_IN, EP_IN_MAX_BUF_SIZE);
fpi_usb_transfer_submit (transfer,
self->cmd_cancelable ? 0 : DATA_TIMEOUT,
- self->cmd_cancelable ? self->cancellable : NULL,
+ self->cmd_cancelable ? fpi_device_get_cancellable (dev) : NULL,
fp_cmd_receive_cb,
fpi_ssm_get_data (ssm));
break;
@@ -1348,8 +1347,6 @@ gx_fp_init (FpDevice *device)
self->max_stored_prints = FP_MAX_FINGERNUM;
self->is_power_button_shield_on = false;
- self->cancellable = g_cancellable_new ();
-
self->sensorcfg = g_new0 (gxfp_sensor_cfg_t, 1);
ret = gx_proto_init_sensor_config (self->sensorcfg);
@@ -1387,7 +1384,6 @@ gx_fp_release_interface (FpiDeviceGoodixMoc *self,
{
g_autoptr(GError) release_error = NULL;
- g_clear_object (&self->cancellable);
g_clear_pointer (&self->sensorcfg, g_free);
/* Release usb interface */
@@ -1533,20 +1529,6 @@ fpi_device_goodixmoc_init (FpiDeviceGoodixMoc *self)
}
-static void
-gx_fp_cancel (FpDevice *device)
-{
- FpiDeviceGoodixMoc *self = FPI_DEVICE_GOODIXMOC (device);
-
- /* Cancel any current interrupt transfer (resulting us to go into
- * response reading mode again); then create a new cancellable
- * for the next transfers. */
- g_cancellable_cancel (self->cancellable);
- g_clear_object (&self->cancellable);
- self->cancellable = g_cancellable_new ();
-
-}
-
static const FpIdEntry id_table[] = {
{ .vid = 0x27c6, .pid = 0x5840, },
{ .vid = 0x27c6, .pid = 0x6496, },
@@ -1577,7 +1559,6 @@ fpi_device_goodixmoc_class_init (FpiDeviceGoodixMocClass *klass)
dev_class->enroll = gx_fp_enroll;
dev_class->delete = gx_fp_template_delete;
dev_class->list = gx_fp_template_list;
- dev_class->cancel = gx_fp_cancel;
dev_class->verify = gx_fp_verify_identify;
dev_class->identify = gx_fp_verify_identify;
}
@@ -0,0 +1,153 @@
From: Benjamin Berg <bberg@redhat.com>
Date: Fri, 17 Sep 2021 18:11:48 +0200
Subject: goodixmoc: Returned device print matched by verify/identify
This is needed for the fprintd duplicate checking code. The information
is needed to delete stale prints automatically from the device.
Related: #415
---
libfprint/drivers/goodixmoc/goodix.c | 90 ++++++++++++++++++------------------
1 file changed, 46 insertions(+), 44 deletions(-)
diff --git a/libfprint/drivers/goodixmoc/goodix.c b/libfprint/drivers/goodixmoc/goodix.c
index 96e7157..5de8932 100644
--- a/libfprint/drivers/goodixmoc/goodix.c
+++ b/libfprint/drivers/goodixmoc/goodix.c
@@ -79,6 +79,44 @@ static gboolean parse_print_data (GVariant *data,
gsize *tid_len,
const guint8 **user_id,
gsize *user_id_len);
+
+static FpPrint *
+fp_print_from_template (FpiDeviceGoodixMoc *self, template_format_t *template)
+{
+ FpPrint *print;
+ GVariant *data;
+ GVariant *tid;
+ GVariant *uid;
+ g_autofree gchar *userid = NULL;
+
+ userid = g_strndup ((gchar *) template->payload.data, template->payload.size);
+
+ print = fp_print_new (FP_DEVICE (self));
+
+ tid = g_variant_new_fixed_array (G_VARIANT_TYPE_BYTE,
+ template->tid,
+ TEMPLATE_ID_SIZE,
+ 1);
+
+ uid = g_variant_new_fixed_array (G_VARIANT_TYPE_BYTE,
+ template->payload.data,
+ template->payload.size,
+ 1);
+
+ data = g_variant_new ("(y@ay@ay)",
+ template->finger_index,
+ tid,
+ uid);
+
+ fpi_print_set_type (print, FPI_PRINT_RAW);
+ fpi_print_set_device_stored (print, TRUE);
+ g_object_set (print, "fpi-data", data, NULL);
+ g_object_set (print, "description", userid, NULL);
+ fpi_print_fill_from_user_id (print, userid);
+
+ return print;
+}
+
/******************************************************************************
*
* fp_cmd_xxx Function
@@ -385,6 +423,7 @@ fp_verify_cb (FpiDeviceGoodixMoc *self,
{
g_autoptr(GPtrArray) templates = NULL;
FpDevice *device = FP_DEVICE (self);
+ FpPrint *match = NULL;
FpPrint *print = NULL;
gint cnt = 0;
gboolean find = false;
@@ -396,6 +435,8 @@ fp_verify_cb (FpiDeviceGoodixMoc *self,
}
if (resp->verify.match)
{
+ match = fp_print_from_template (self, &resp->verify.template);
+
if (fpi_device_get_current_action (device) == FPI_DEVICE_ACTION_VERIFY)
{
templates = g_ptr_array_sized_new (1);
@@ -409,22 +450,9 @@ fp_verify_cb (FpiDeviceGoodixMoc *self,
}
for (cnt = 0; cnt < templates->len; cnt++)
{
- g_autoptr(GVariant) data = NULL;
- guint8 finger;
- const guint8 *user_id;
- gsize user_id_len = 0;
- const guint8 *tid;
- gsize tid_len = 0;
print = g_ptr_array_index (templates, cnt);
- g_object_get (print, "fpi-data", &data, NULL);
- if (!parse_print_data (data, &finger, &tid, &tid_len, &user_id, &user_id_len))
- {
- fpi_ssm_mark_failed (self->task_ssm,
- fpi_device_error_new_msg (FP_DEVICE_ERROR_DATA_INVALID,
- "Parse print error"));
- return;
- }
- if (memcmp (&resp->verify.template.tid, tid, TEMPLATE_ID_SIZE) == 0)
+
+ if (fp_print_equal (print, match))
{
find = true;
break;
@@ -434,9 +462,9 @@ fp_verify_cb (FpiDeviceGoodixMoc *self,
if (find)
{
if (fpi_device_get_current_action (device) == FPI_DEVICE_ACTION_VERIFY)
- fpi_device_verify_report (device, FPI_MATCH_SUCCESS, NULL, error);
+ fpi_device_verify_report (device, FPI_MATCH_SUCCESS, match, error);
else
- fpi_device_identify_report (device, print, print, error);
+ fpi_device_identify_report (device, print, match, error);
}
}
@@ -1224,36 +1252,10 @@ fp_template_list_cb (FpiDeviceGoodixMoc *self,
for (int n = 0; n < resp->finger_list_resp.finger_num; n++)
{
- GVariant *data = NULL;
- GVariant *tid = NULL;
- GVariant *uid = NULL;
FpPrint *print;
- gchar *userid;
-
- userid = (gchar *) resp->finger_list_resp.finger_list[n].payload.data;
-
- print = fp_print_new (FP_DEVICE (self));
-
- tid = g_variant_new_fixed_array (G_VARIANT_TYPE_BYTE,
- resp->finger_list_resp.finger_list[n].tid,
- TEMPLATE_ID_SIZE,
- 1);
-
- uid = g_variant_new_fixed_array (G_VARIANT_TYPE_BYTE,
- resp->finger_list_resp.finger_list[n].payload.data,
- resp->finger_list_resp.finger_list[n].payload.size,
- 1);
- data = g_variant_new ("(y@ay@ay)",
- resp->finger_list_resp.finger_list[n].finger_index,
- tid,
- uid);
+ print = fp_print_from_template (self, &resp->finger_list_resp.finger_list[n]);
- fpi_print_set_type (print, FPI_PRINT_RAW);
- fpi_print_set_device_stored (print, TRUE);
- g_object_set (print, "fpi-data", data, NULL);
- g_object_set (print, "description", userid, NULL);
- fpi_print_fill_from_user_id (print, userid);
g_ptr_array_add (self->list_result, g_object_ref_sink (print));
}
@@ -0,0 +1,71 @@
From: boger <boger@goodix.com>
Date: Wed, 23 Jun 2021 15:14:33 +0800
Subject: goodixmoc: add PID 609C/6584/658C/6592/659C
add some new PID support,
609C: Framework fingerprint sensor
65xx: Thinkpad series fingerprint sensor
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/libfprint/+bug/1945296
---
data/autosuspend.hwdb | 9 +++++++--
libfprint/drivers/goodixmoc/goodix.c | 13 +++++++++++--
2 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/data/autosuspend.hwdb b/data/autosuspend.hwdb
index 7d03dba..38e9d17 100644
--- a/data/autosuspend.hwdb
+++ b/data/autosuspend.hwdb
@@ -128,11 +128,16 @@ usb:v1C7Ap0603*
# Supported by libfprint driver goodixmoc
usb:v27C6p5840*
-usb:v27C6p6496*
+usb:v27C6p609C*
usb:v27C6p60A2*
-usb:v27C6p63AC*
usb:v27C6p639C*
+usb:v27C6p63AC*
+usb:v27C6p6496*
+usb:v27C6p6584*
+usb:v27C6p658C*
+usb:v27C6p6592*
usb:v27C6p6594*
+usb:v27C6p659C*
usb:v27C6p6A94*
ID_AUTOSUSPEND=1
diff --git a/libfprint/drivers/goodixmoc/goodix.c b/libfprint/drivers/goodixmoc/goodix.c
index 38b6ff4..667efb0 100644
--- a/libfprint/drivers/goodixmoc/goodix.c
+++ b/libfprint/drivers/goodixmoc/goodix.c
@@ -1317,6 +1317,10 @@ gx_fp_probe (FpDevice *device)
{
case 0x6496:
case 0x60A2:
+ case 0x609C:
+ case 0x639C:
+ case 0x63AC:
+ case 0x6A94:
self->max_enroll_stage = 12;
break;
@@ -1531,11 +1535,16 @@ fpi_device_goodixmoc_init (FpiDeviceGoodixMoc *self)
static const FpIdEntry id_table[] = {
{ .vid = 0x27c6, .pid = 0x5840, },
- { .vid = 0x27c6, .pid = 0x6496, },
+ { .vid = 0x27c6, .pid = 0x609C, },
{ .vid = 0x27c6, .pid = 0x60A2, },
- { .vid = 0x27c6, .pid = 0x63AC, },
{ .vid = 0x27c6, .pid = 0x639C, },
+ { .vid = 0x27c6, .pid = 0x63AC, },
+ { .vid = 0x27c6, .pid = 0x6496, },
+ { .vid = 0x27c6, .pid = 0x6584, },
+ { .vid = 0x27c6, .pid = 0x658C, },
+ { .vid = 0x27c6, .pid = 0x6592, },
{ .vid = 0x27c6, .pid = 0x6594, },
+ { .vid = 0x27c6, .pid = 0x659C, },
{ .vid = 0x27c6, .pid = 0x6A94, },
{ .vid = 0, .pid = 0, .driver_data = 0 }, /* terminating entry */
};
+42
View File
@@ -0,0 +1,42 @@
From: boger <boger@goodix.com>
Date: Fri, 17 Sep 2021 19:28:51 +0800
Subject: goodixmoc: add PID 63BC 63BC: Dell XPS series fingerprint sensor
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/libfprint/+bug/1945298
---
data/autosuspend.hwdb | 1 +
libfprint/drivers/goodixmoc/goodix.c | 2 ++
2 files changed, 3 insertions(+)
diff --git a/data/autosuspend.hwdb b/data/autosuspend.hwdb
index 38e9d17..a09ed91 100644
--- a/data/autosuspend.hwdb
+++ b/data/autosuspend.hwdb
@@ -132,6 +132,7 @@ usb:v27C6p609C*
usb:v27C6p60A2*
usb:v27C6p639C*
usb:v27C6p63AC*
+usb:v27C6p63BC*
usb:v27C6p6496*
usb:v27C6p6584*
usb:v27C6p658C*
diff --git a/libfprint/drivers/goodixmoc/goodix.c b/libfprint/drivers/goodixmoc/goodix.c
index 667efb0..96e7157 100644
--- a/libfprint/drivers/goodixmoc/goodix.c
+++ b/libfprint/drivers/goodixmoc/goodix.c
@@ -1320,6 +1320,7 @@ gx_fp_probe (FpDevice *device)
case 0x609C:
case 0x639C:
case 0x63AC:
+ case 0x63BC:
case 0x6A94:
self->max_enroll_stage = 12;
break;
@@ -1539,6 +1540,7 @@ static const FpIdEntry id_table[] = {
{ .vid = 0x27c6, .pid = 0x60A2, },
{ .vid = 0x27c6, .pid = 0x639C, },
{ .vid = 0x27c6, .pid = 0x63AC, },
+ { .vid = 0x27c6, .pid = 0x63BC, },
{ .vid = 0x27c6, .pid = 0x6496, },
{ .vid = 0x27c6, .pid = 0x6584, },
{ .vid = 0x27c6, .pid = 0x658C, },
+15
View File
@@ -0,0 +1,15 @@
goodixmoc-Add-PID-6A94.patch
goodixmoc-Remove-internal-cancellable.patch
goodixmoc-add-PID-609C-6584-658C-6592-659C.patch
goodixmoc-add-PID-63BC.patch
goodixmoc-Returned-device-print-matched-by-verify-identif.patch
synaptics-Remove-usb-reset.patch
synaptics-add-new-PID-0x100-and-remove-PID-0xE7.patch
synaptics-Keep-supporting-0xE7.patch
synaptics-Send-a-cancel-to-sensor-if-it-returns-busy.patch
synaptics-Fix-warning-about-missing-initialization.patch
elan-Add-PID-0c3d.patch
elan-Add-PID-0c4f.patch
elan-Add-PID-0c63.patch
Added-ELAN-0c6e-from-ROG-Flow-X13.patch
elan-Add-PID-0x0c58.patch
@@ -0,0 +1,23 @@
From: Benjamin Berg <bberg@redhat.com>
Date: Wed, 30 Jun 2021 15:56:45 +0200
Subject: synaptics: Fix warning about missing initialization
The compiler seems to (incorrectly) think that cleanup might happen
before the variable has been initialized.
---
libfprint/drivers/synaptics/synaptics.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libfprint/drivers/synaptics/synaptics.c b/libfprint/drivers/synaptics/synaptics.c
index 85de41f..fe66f03 100644
--- a/libfprint/drivers/synaptics/synaptics.c
+++ b/libfprint/drivers/synaptics/synaptics.c
@@ -461,7 +461,7 @@ create_print (FpiDeviceSynaptics *self,
guint8 finger_id)
{
FpPrint *print;
- g_autofree gchar *user_id_safe;
+ g_autofree gchar *user_id_safe = NULL;
GVariant *data = NULL;
GVariant *uid = NULL;
+34
View File
@@ -0,0 +1,34 @@
From: =?utf-8?b?Ik1hcmNvIFRyZXZpc2FuIChUcmV2acOxbyki?= <mail@3v1n0.net>
Date: Mon, 11 Oct 2021 05:04:29 -0400
Subject: synaptics: Keep supporting 0xE7
It will make things easier to backport
---
data/autosuspend.hwdb | 1 +
libfprint/drivers/synaptics/synaptics.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/data/autosuspend.hwdb b/data/autosuspend.hwdb
index 10cb8cf..98f391a 100644
--- a/data/autosuspend.hwdb
+++ b/data/autosuspend.hwdb
@@ -150,6 +150,7 @@ usb:v06CBp00F9*
usb:v06CBp00FC*
usb:v06CBp00C2*
usb:v06CBp00C9*
+usb:v06CBp00E7*
usb:v06CBp0100*
ID_AUTOSUSPEND=1
diff --git a/libfprint/drivers/synaptics/synaptics.c b/libfprint/drivers/synaptics/synaptics.c
index bb113cb..54badd6 100644
--- a/libfprint/drivers/synaptics/synaptics.c
+++ b/libfprint/drivers/synaptics/synaptics.c
@@ -38,6 +38,7 @@ static const FpIdEntry id_table[] = {
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x00FC, },
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x00C2, },
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x00C9, },
+ { .vid = SYNAPTICS_VENDOR_ID, .pid = 0x00E7, },
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x0100, },
{ .vid = 0, .pid = 0, .driver_data = 0 }, /* terminating entry */
};
+44
View File
@@ -0,0 +1,44 @@
From: Aris Lin <Aris.Lin@synaptics.com>
Date: Thu, 25 Feb 2021 17:13:56 +0800
Subject: synaptics: Remove usb reset
It will trigger firmware to do some activities, remove it in device open
and device probe.
---
libfprint/drivers/synaptics/synaptics.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/libfprint/drivers/synaptics/synaptics.c b/libfprint/drivers/synaptics/synaptics.c
index b2db9bd..0de54a1 100644
--- a/libfprint/drivers/synaptics/synaptics.c
+++ b/libfprint/drivers/synaptics/synaptics.c
@@ -1158,7 +1158,8 @@ prob_msg_cb (FpiDeviceSynaptics *self,
g_usb_device_get_serial_number_index (usb_dev),
&error);
- if (resp->result == BMKT_SUCCESS)
+ /* BMKT_OPERATION_DENIED is returned if the sensor is already initialized */
+ if (resp->result == BMKT_SUCCESS || resp->result == BMKT_OPERATION_DENIED)
{
g_usb_device_close (usb_dev, NULL);
fpi_device_probe_complete (FP_DEVICE (self), serial, NULL, error);
@@ -1196,9 +1197,6 @@ dev_probe (FpDevice *device)
return;
}
- if (!g_usb_device_reset (usb_dev, &error))
- goto err_close;
-
if (!g_usb_device_claim_interface (usb_dev, 0, 0, &error))
goto err_close;
@@ -1342,9 +1340,6 @@ dev_init (FpDevice *device)
self->interrupt_cancellable = g_cancellable_new ();
- if (!g_usb_device_reset (fpi_device_get_usb_device (device), &error))
- goto error;
-
/* Claim usb interface */
if (!g_usb_device_claim_interface (fpi_device_get_usb_device (device), 0, 0, &error))
goto error;
@@ -0,0 +1,75 @@
From: Aris Lin <Aris.Lin@synaptics.com>
Date: Fri, 14 May 2021 16:55:24 +0800
Subject: synaptics: Send a cancel to sensor if it returns busy
fix #380
---
libfprint/drivers/synaptics/synaptics.c | 23 +++++++++++++++++++----
1 file changed, 19 insertions(+), 4 deletions(-)
diff --git a/libfprint/drivers/synaptics/synaptics.c b/libfprint/drivers/synaptics/synaptics.c
index 54badd6..85de41f 100644
--- a/libfprint/drivers/synaptics/synaptics.c
+++ b/libfprint/drivers/synaptics/synaptics.c
@@ -1141,14 +1141,18 @@ prob_msg_cb (FpiDeviceSynaptics *self,
{
GUsbDevice *usb_dev = NULL;
g_autofree gchar *serial = NULL;
+ GError *err = NULL;
usb_dev = fpi_device_get_usb_device (FP_DEVICE (self));
if (error)
{
+ if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
+ err = fpi_device_error_new_msg (FP_DEVICE_ERROR_GENERAL, "unsupported firmware version");
+
g_usb_device_close (usb_dev, NULL);
- fpi_device_probe_complete (FP_DEVICE (self), NULL, NULL,
- fpi_device_error_new_msg (FP_DEVICE_ERROR_GENERAL, "unsupported firmware version"));
+ fpi_device_probe_complete (FP_DEVICE (self), NULL, NULL, err);
+ g_clear_error (&error);
return;
}
@@ -1157,13 +1161,17 @@ prob_msg_cb (FpiDeviceSynaptics *self,
else
serial = g_usb_device_get_string_descriptor (usb_dev,
g_usb_device_get_serial_number_index (usb_dev),
- &error);
+ &err);
/* BMKT_OPERATION_DENIED is returned if the sensor is already initialized */
if (resp->result == BMKT_SUCCESS || resp->result == BMKT_OPERATION_DENIED)
{
g_usb_device_close (usb_dev, NULL);
- fpi_device_probe_complete (FP_DEVICE (self), serial, NULL, error);
+ fpi_device_probe_complete (FP_DEVICE (self), serial, NULL, err);
+ }
+ else if (resp->result == BMKT_FP_SYSTEM_BUSY)
+ {
+ synaptics_sensor_cmd (self, self->cmd_seq_num, BMKT_CMD_CANCEL_OP, NULL, 0, NULL);
}
else
{
@@ -1286,6 +1294,9 @@ fps_init_msg_cb (FpiDeviceSynaptics *self,
{
if (error)
{
+ if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
+ g_clear_error (&error);
+
fpi_device_open_complete (FP_DEVICE (self), error);
return;
}
@@ -1295,6 +1306,10 @@ fps_init_msg_cb (FpiDeviceSynaptics *self,
{
fpi_device_open_complete (FP_DEVICE (self), NULL);
}
+ else if (resp->result == BMKT_FP_SYSTEM_BUSY)
+ {
+ synaptics_sensor_cmd (self, self->cmd_seq_num, BMKT_CMD_CANCEL_OP, NULL, 0, NULL);
+ }
else
{
g_warning ("Initializing fingerprint sensor failed with %d!", resp->result);
@@ -0,0 +1,49 @@
From: Aris Lin <Aris.Lin@synaptics.com>
Date: Thu, 18 Mar 2021 18:29:10 +0800
Subject: synaptics: add new PID 0x100 and remove PID 0xE7
---
data/autosuspend.hwdb | 2 +-
libfprint/drivers/synaptics/synaptics.c | 16 ++++++++--------
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/data/autosuspend.hwdb b/data/autosuspend.hwdb
index a09ed91..10cb8cf 100644
--- a/data/autosuspend.hwdb
+++ b/data/autosuspend.hwdb
@@ -150,7 +150,7 @@ usb:v06CBp00F9*
usb:v06CBp00FC*
usb:v06CBp00C2*
usb:v06CBp00C9*
-usb:v06CBp00E7*
+usb:v06CBp0100*
ID_AUTOSUSPEND=1
# Supported by libfprint driver upeksonly
diff --git a/libfprint/drivers/synaptics/synaptics.c b/libfprint/drivers/synaptics/synaptics.c
index 0de54a1..bb113cb 100644
--- a/libfprint/drivers/synaptics/synaptics.c
+++ b/libfprint/drivers/synaptics/synaptics.c
@@ -31,14 +31,14 @@ static void init_identify_msg (FpDevice *device);
static void compose_and_send_identify_msg (FpDevice *device);
static const FpIdEntry id_table[] = {
- { .vid = SYNAPTICS_VENDOR_ID, .pid = 0xBD, },
- { .vid = SYNAPTICS_VENDOR_ID, .pid = 0xE9, },
- { .vid = SYNAPTICS_VENDOR_ID, .pid = 0xDF, },
- { .vid = SYNAPTICS_VENDOR_ID, .pid = 0xF9, },
- { .vid = SYNAPTICS_VENDOR_ID, .pid = 0xFC, },
- { .vid = SYNAPTICS_VENDOR_ID, .pid = 0xC2, },
- { .vid = SYNAPTICS_VENDOR_ID, .pid = 0xC9, },
- { .vid = SYNAPTICS_VENDOR_ID, .pid = 0xE7, },
+ { .vid = SYNAPTICS_VENDOR_ID, .pid = 0x00BD, },
+ { .vid = SYNAPTICS_VENDOR_ID, .pid = 0x00E9, },
+ { .vid = SYNAPTICS_VENDOR_ID, .pid = 0x00DF, },
+ { .vid = SYNAPTICS_VENDOR_ID, .pid = 0x00F9, },
+ { .vid = SYNAPTICS_VENDOR_ID, .pid = 0x00FC, },
+ { .vid = SYNAPTICS_VENDOR_ID, .pid = 0x00C2, },
+ { .vid = SYNAPTICS_VENDOR_ID, .pid = 0x00C9, },
+ { .vid = SYNAPTICS_VENDOR_ID, .pid = 0x0100, },
{ .vid = 0, .pid = 0, .driver_data = 0 }, /* terminating entry */
};