mirror of
https://github.com/AsahiLinux/m1n1
synced 2025-02-16 13:48:29 +00:00
kboot: disable touchbar on missing calibration data
There is at least on Macbook Pro (M1, 13-inch) with missing "multi-touch-calibration" in the ADT. Disabling the device as error handling instead of refusing to boot the kernel. Signed-off-by: Janne Grunau <j@jannau.net>
This commit is contained in:
parent
ea64e7bda4
commit
7e5d12d33e
1 changed files with 6 additions and 2 deletions
|
@ -671,8 +671,12 @@ static int dt_set_multitouch(void)
|
|||
|
||||
u32 len;
|
||||
const u8 *cal_blob = adt_getprop(adt, anode, "multi-touch-calibration", &len);
|
||||
if (!cal_blob || !len)
|
||||
bail("ADT: Failed to get multi-touch-calibration\n");
|
||||
if (!cal_blob || !len) {
|
||||
printf("ADT: Failed to get multi-touch-calibration from %s, disable %s\n", adt_touchbar,
|
||||
fdt_get_name(dt, node, NULL));
|
||||
fdt_setprop_string(dt, node, "status", "disabled");
|
||||
return 0;
|
||||
}
|
||||
|
||||
fdt_setprop(dt, node, "apple,z2-cal-blob", cal_blob, len);
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue