diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2022-02-22 20:37:20 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2022-02-22 20:37:20 +0000 |
commit | 1f1dd5af23303354113544d497bc4ae13dc18a57 (patch) | |
tree | 1a15e54a23d4df6ab6da3eaad5365f50023049a7 /sys | |
parent | dc4048053fd7f951cce97b313ec8af58b68caa9a (diff) |
Fix thinko in construction of SMC key for the targeted GPIO pin.
visa@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/arm64/dev/aplsmc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/arm64/dev/aplsmc.c b/sys/arch/arm64/dev/aplsmc.c index ba80601ef18..23d6d9f10d4 100644 --- a/sys/arch/arm64/dev/aplsmc.c +++ b/sys/arch/arm64/dev/aplsmc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aplsmc.c,v 1.7 2022/02/13 11:58:53 kettenis Exp $ */ +/* $OpenBSD: aplsmc.c,v 1.8 2022/02/22 20:37:19 kettenis Exp $ */ /* * Copyright (c) 2021 Mark Kettenis <kettenis@openbsd.org> * @@ -467,7 +467,7 @@ aplsmc_set_pin(void *cookie, uint32_t *cells, int val) KASSERT(pin < 256); key |= (digits[(pin >> 0) & 0xf] << 0); - key |= (digits[(pin >> 8) & 0xf] << 8); + key |= (digits[(pin >> 4) & 0xf] << 8); if (flags & GPIO_ACTIVE_LOW) val = !val; |