mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-14 21:50:25 +00:00
elantp: Modify the correct input for the iap reg.
1. Modify the correct input for the iap reg (byte -> word). 2. Add new HWID for ThinkPad X1 Carbon Gen 9.
This commit is contained in:
parent
e4d52866d1
commit
3460e0a5ed
@ -2,6 +2,10 @@
|
||||
Plugin = elantp
|
||||
GType = FuElantpHidDevice
|
||||
|
||||
# ThinkPad X1 Carbon Gen 9
|
||||
[HwId=6c87726f-b545-549e-840a-189422ea21d0]
|
||||
Flags = elantp-recovery
|
||||
|
||||
# Lenovo X1 Nano Gen1
|
||||
[HwId=4c20262a-aee0-5d6e-ba72-6d29b23fe350]
|
||||
Flags = elantp-recovery
|
||||
|
@ -426,7 +426,7 @@ fu_elantp_hid_device_detach (FuDevice *device, GError **error)
|
||||
|
||||
if (!fu_elantp_hid_device_write_cmd (self,
|
||||
ETP_CMD_I2C_IAP_TYPE,
|
||||
self->fw_page_size,
|
||||
self->fw_page_size / 2,
|
||||
error))
|
||||
return FALSE;
|
||||
if (!fu_elantp_hid_device_read_cmd (self, ETP_CMD_I2C_IAP_TYPE,
|
||||
@ -435,7 +435,7 @@ fu_elantp_hid_device_detach (FuDevice *device, GError **error)
|
||||
return FALSE;
|
||||
}
|
||||
self->iap_type = fu_common_read_uint16 (buf, G_LITTLE_ENDIAN);
|
||||
if (self->iap_type != self->fw_page_size) {
|
||||
if (self->iap_type != self->fw_page_size / 2) {
|
||||
g_set_error_literal (error,
|
||||
FWUPD_ERROR,
|
||||
FWUPD_ERROR_NOT_SUPPORTED,
|
||||
|
@ -454,7 +454,7 @@ fu_elantp_i2c_device_detach (FuDevice *device, GError **error)
|
||||
/* set the IAP type, presumably some kind of ABI */
|
||||
if (!fu_elantp_i2c_device_write_cmd (self,
|
||||
ETP_CMD_I2C_IAP_TYPE,
|
||||
self->fw_page_size ,
|
||||
self->fw_page_size / 2,
|
||||
error))
|
||||
return FALSE;
|
||||
if (!fu_elantp_i2c_device_read_cmd (self, ETP_CMD_I2C_IAP_TYPE ,
|
||||
@ -463,7 +463,7 @@ fu_elantp_i2c_device_detach (FuDevice *device, GError **error)
|
||||
return FALSE;
|
||||
}
|
||||
self->iap_type = fu_common_read_uint16 (buf, G_LITTLE_ENDIAN);
|
||||
if (self->iap_type != self->fw_page_size) {
|
||||
if (self->iap_type != self->fw_page_size / 2) {
|
||||
g_set_error_literal (error,
|
||||
FWUPD_ERROR,
|
||||
FWUPD_ERROR_NOT_SUPPORTED,
|
||||
|
Loading…
Reference in New Issue
Block a user