mirror of
https://github.com/AsahiLinux/m1n1
synced 2024-11-23 15:13:02 +00:00
kboot: Forward kblang code to asahi,kblang-code
Signed-off-by: Hector Martin <marcan@marcan.st>
This commit is contained in:
parent
b64a6b9321
commit
bad5aebc7d
1 changed files with 14 additions and 0 deletions
14
src/kboot.c
14
src/kboot.c
|
@ -208,6 +208,20 @@ static int dt_set_chosen(void)
|
|||
printf("ADT: no random-seed available!\n");
|
||||
}
|
||||
|
||||
int ipd = adt_path_offset(adt, "/arm-io/spi3/ipd");
|
||||
if (ipd < 0) {
|
||||
printf("ADT: /arm-io/spi3/ipd not found, no keyboard\n");
|
||||
} else {
|
||||
u32 len;
|
||||
const u8 *kblang = adt_getprop(adt, ipd, "kblang-calibration", &len);
|
||||
if (kblang && len >= 2) {
|
||||
if (fdt_setprop_u32(dt, node, "asahi,kblang-code", kblang[1]))
|
||||
bail("FDT: couldn't set asahi,kblang-code");
|
||||
} else {
|
||||
printf("ADT: kblang-calibration not found, no keyboard layout\n");
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue