Skip to content

Commit

Permalink
kboot: disable touchbar on missing calibration data
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
jannau authored and marcan committed Sep 20, 2023
1 parent ea64e7b commit 7e5d12d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/kboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 7e5d12d

Please sign in to comment.