File tree Expand file tree Collapse file tree 5 files changed +1644
-0
lines changed Expand file tree Collapse file tree 5 files changed +1644
-0
lines changed Original file line number Diff line number Diff line change @@ -6,3 +6,4 @@ zephyr_library_sources_ifdef(CONFIG_PS2_XEC ps2_mchp_xec.c)
66zephyr_library_sources_ifdef(CONFIG_USERSPACE ps2_handlers.c)
77zephyr_library_sources_ifdef(CONFIG_PS2_NPCX ps2_npcx_channel.c)
88zephyr_library_sources_ifdef(CONFIG_PS2_NPCX ps2_npcx_controller.c)
9+ zephyr_library_sources_ifdef(CONFIG_PS2_GPIO ps2_gpio.c)
Original file line number Diff line number Diff line change 1212
1313source "drivers/ps2/Kconfig.xec"
1414source "drivers/ps2/Kconfig.npcx"
15+ source "drivers/ps2/Kconfig.gpio"
1516
1617module = PS2
1718module-str = ps2
Original file line number Diff line number Diff line change 1+ # Copyright (c) 2017 Linaro Ltd.
2+ # SPDX-License-Identifier: Apache-2.0
3+
4+ DT_COMPAT_PS2_GPIO := gpio-ps2
5+
6+ config PS2_GPIO
7+ bool "GPIO bit banging PS/2 support"
8+ default $(dt_compat_enabled,$(DT_COMPAT_PS2_GPIO))
9+ help
10+ Enable software driven (bit banging) PS/2 support using GPIO pins
11+
12+ if PS2_GPIO
13+
14+ # PS/2 events must be processed within 30-50us. Therefore we shift the
15+ # BT_CTLR_LLL_PRIO from 0 to 1 and BT_CTLR_ULL_* priorities from 1 to 2.
16+ # We then set the gpio priority to 0.
17+ #
18+ # On top of this, the following has to be added to the device tree:
19+ # &gpiote {
20+ # interrupts = < 0x6 0 >;
21+ # };
22+ #
23+ # This allows the PS/2 interrupts to be triggered in time.
24+
25+ config BT_CTLR_ADVANCED_FEATURES
26+ default y
27+
28+ config BT_CTLR_LLL_PRIO
29+ default 1
30+
31+ config BT_CTLR_ULL_HIGH_PRIO
32+ default 2
33+
34+ config BT_CTLR_ULL_LOW_PRIO
35+ default 2
36+
37+ config PS2_GPIO_INTERRUPT_LOG_ENABLED
38+ bool "Enable extensive interrupt logging."
39+ default n
40+
41+ endif # PS2_GPIO
You can’t perform that action at this time.
0 commit comments