From 1ca7854100b7d6867216de2b28b96fa01f68b21e Mon Sep 17 00:00:00 2001 From: Janne Grunau Date: Mon, 18 Sep 2023 22:52:07 +0200 Subject: [PATCH] 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 --- src/kboot.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/kboot.c b/src/kboot.c index 428fedc14..b52f56fcd 100644 --- a/src/kboot.c +++ b/src/kboot.c @@ -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;