Input: synaptics-rmi4 - reset after writing partition table

When recovering from a bad partition table (for example after an
interrupted update), a reset is necessary for the new partition table to
become effective. Without this reset, writing the core code partition
will fail with status 0x03 (Invalid Command).

Signed-off-by: Matthias Schiffer <[email protected]>
Reviewed-by: Lyude Paul <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Dmitry Torokhov <[email protected]>
This commit is contained in:
Matthias Schiffer
2022-09-23 13:00:13 -07:00
committed by Dmitry Torokhov
parent 0113b49bd9
commit d316e709cd
+8
View File
@@ -1146,6 +1146,14 @@ int rmi_f34v7_do_reflash(struct f34_data *f34, const struct firmware *fw)
goto fail;
dev_info(&f34->fn->dev, "%s: Partition table programmed\n", __func__);
/*
* Reset to reload partition table - as the previous firmware has been
* erased, we remain in bootloader mode.
*/
ret = rmi_scan_pdt(f34->fn->rmi_dev, NULL, rmi_initial_reset);
if (ret < 0)
dev_warn(&f34->fn->dev, "RMI reset failed!\n");
dev_info(&f34->fn->dev, "Writing firmware (%d bytes)...\n",
f34->v7.img.ui_firmware.size);