Skip to content

Commit

Permalink
Merge pull request #13 from madmachineio/add_touch_drv
Browse files Browse the repository at this point in the history
Add touch drv
  • Loading branch information
andy0808 authored Jul 5, 2020
2 parents a6a6b37 + f33e29a commit d1e3379
Show file tree
Hide file tree
Showing 6 changed files with 583 additions and 0 deletions.
10 changes: 10 additions & 0 deletions boards/arm/mm_swiftio/mm_swiftio.dts
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,16 @@

&i2c1 {
status = "okay";
/* clock-frequency = <I2C_BITRATE_STANDARD>; */
gt9x@14 {
compatible = "coodix,gt9x";
reg = <0x14>;
label = "GT9X";
width = <480>;
height = <320>;
int-gpios = <&gpio1 19 GPIO_ACTIVE_HIGH>;
reset-gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;
};
};

&i2c3 {
Expand Down
1 change: 1 addition & 0 deletions drivers/kscan/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ zephyr_library()

zephyr_library_sources_ifdef(CONFIG_KSCAN_FT5336 kscan_ft5336.c)
zephyr_library_sources_ifdef(CONFIG_KSCAN_XEC kscan_mchp_xec.c)
zephyr_library_sources_ifdef(CONFIG_KSCAN_GT9X kscan_gt9x.c)

zephyr_library_sources_ifdef(CONFIG_USERSPACE kscan_handlers.c)
1 change: 1 addition & 0 deletions drivers/kscan/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ if KSCAN

source "drivers/kscan/Kconfig.ft5336"
source "drivers/kscan/Kconfig.xec"
source "drivers/kscan/Kconfig.gt9x"

module = KSCAN
module-str = kscan
Expand Down
17 changes: 17 additions & 0 deletions drivers/kscan/Kconfig.gt9x
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright (c) 2020 MADMACHINE
# SPDX-License-Identifier: Apache-2.0

menuconfig KSCAN_GT9X
bool "GT91X capacitive touch panel driver"
depends on I2C && HAS_DTS_I2C
help
Enable driver for the GT91X capacitive touch panel controller.

config KSCAN_GT9X_PERIOD
int "Sample period (ms)"
default 10
depends on KSCAN_GT9X

config KSCAN_GT9X_INTERRUPT
bool "Enable interrupt"
depends on KSCAN_GT9X
Loading

0 comments on commit d1e3379

Please sign in to comment.