mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-14 02:40:34 +00:00
elantp: Include 04F3:0400 (bootloader) as a valid i2c-hid touchpad (#5283)
* elantp: Include 04F3:0400 (bootloader) as a valid i2c-hid touchpad ELAN Touchpads with product ids between 0x3000 and 0x4000 can sometimes end up in bootloader mode (due to not having a valid firmware, for example) The bootloader has a product id outside of the range checked by fu_elantp_hid_device_probe, resulting in the device disappearing from get-devices when it's in that mode, which makes it seem dead. This expands the range of that check to include 0x400 so that it is possible to upload a valid firmware to it.
This commit is contained in:
parent
85495b5bb2
commit
30a726faee
@ -53,6 +53,8 @@ fu_elantp_hid_device_to_string(FuDevice *device, guint idt, GString *str)
|
||||
static gboolean
|
||||
fu_elantp_hid_device_probe(FuDevice *device, GError **error)
|
||||
{
|
||||
guint16 device_id = fu_udev_device_get_model(FU_UDEV_DEVICE(device));
|
||||
|
||||
/* check is valid */
|
||||
if (g_strcmp0(fu_udev_device_get_subsystem(FU_UDEV_DEVICE(device)), "hidraw") != 0) {
|
||||
g_set_error(error,
|
||||
@ -64,8 +66,7 @@ fu_elantp_hid_device_probe(FuDevice *device, GError **error)
|
||||
}
|
||||
|
||||
/* i2c-hid */
|
||||
if (fu_udev_device_get_model(FU_UDEV_DEVICE(device)) < 0x3000 ||
|
||||
fu_udev_device_get_model(FU_UDEV_DEVICE(device)) >= 0x4000) {
|
||||
if (device_id != 0x400 && (device_id < 0x3000 || device_id >= 0x4000)) {
|
||||
g_set_error_literal(error,
|
||||
FWUPD_ERROR,
|
||||
FWUPD_ERROR_NOT_SUPPORTED,
|
||||
|
Loading…
Reference in New Issue
Block a user