diff --git a/MAINTAINERS.yml b/MAINTAINERS.yml index 4498ca3040cde7..e54c57f99e7412 100644 --- a/MAINTAINERS.yml +++ b/MAINTAINERS.yml @@ -1549,6 +1549,7 @@ Input: - include/zephyr/input/ - samples/subsys/input/ - subsys/input/ + - tests/drivers/build_all/input/ - tests/subsys/input/ description: >- Input subsystem and drivers diff --git a/tests/drivers/build_all/input/CMakeLists.txt b/tests/drivers/build_all/input/CMakeLists.txt new file mode 100644 index 00000000000000..518596a02f7800 --- /dev/null +++ b/tests/drivers/build_all/input/CMakeLists.txt @@ -0,0 +1,8 @@ +# SPDX-License-Identifier: Apache-2.0 + +cmake_minimum_required(VERSION 3.20.0) +find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) +project(build_all) + +FILE(GLOB app_sources src/*.c) +target_sources(app PRIVATE ${app_sources}) diff --git a/tests/drivers/build_all/input/app.overlay b/tests/drivers/build_all/input/app.overlay new file mode 100644 index 00000000000000..4f0bbe9547b5bb --- /dev/null +++ b/tests/drivers/build_all/input/app.overlay @@ -0,0 +1,62 @@ +/* + * Copyright 2023 Google LLC + * + * SPDX-License-Identifier: Apache-2.0 + */ + +/ { + test { + #address-cells = <1>; + #size-cells = <1>; + + test_gpio: gpio@0 { + compatible = "vnd,gpio"; + gpio-controller; + reg = <00 0x1000>; + #gpio-cells = <0x2>; + status = "okay"; + }; + + gpio-keys { + compatible = "zephyr,gpio-keys"; + debounce-interval-ms = <30>; + button_0 { + gpios = <&test_gpio 0 0>; + zephyr,code = <0>; + }; + }; + + qdec-gpio { + compatible = "gpio-qdec"; + gpios = <&test_gpio 0 0>, <&test_gpio 1 0>; + steps-per-period = <4>; + zephyr,axis = <0>; + sample-time-us = <2000>; + idle-timeout-ms = <200>; + }; + + longpress: longpress { + input = <&longpress>; + compatible = "zephyr,input-longpress"; + input-codes = <0>; + short-codes = <0>; + long-codes = <0>; + long-delay-ms = <100>; + }; + + i2c@1 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "vnd,i2c"; + reg = <0x1 0x1000>; + status = "okay"; + clock-frequency = <100000>; + + ft5336@0 { + compatible = "focaltech,ft5336"; + reg = <0x0>; + int-gpios = <&test_gpio 0 0>; + }; + }; + }; +}; diff --git a/tests/drivers/build_all/input/prj.conf b/tests/drivers/build_all/input/prj.conf new file mode 100644 index 00000000000000..d87817b31bd7c6 --- /dev/null +++ b/tests/drivers/build_all/input/prj.conf @@ -0,0 +1,2 @@ +CONFIG_GPIO=y +CONFIG_INPUT=y diff --git a/tests/drivers/build_all/input/src/main.c b/tests/drivers/build_all/input/src/main.c new file mode 100644 index 00000000000000..ccbdca6d36b17e --- /dev/null +++ b/tests/drivers/build_all/input/src/main.c @@ -0,0 +1,10 @@ +/* + * Copyright 2023 Google LLC + * + * SPDX-License-Identifier: Apache-2.0 + */ + +int main(void) +{ + return 0; +} diff --git a/tests/drivers/build_all/input/testcase.yaml b/tests/drivers/build_all/input/testcase.yaml new file mode 100644 index 00000000000000..ea0777be1310ce --- /dev/null +++ b/tests/drivers/build_all/input/testcase.yaml @@ -0,0 +1,7 @@ +tests: + drivers.input.build: + tags: + - drivers + - input + build_only: true + platform_allow: native_posix diff --git a/tests/drivers/build_all/sensor/i2c.dtsi b/tests/drivers/build_all/sensor/i2c.dtsi index 454712b74fe725..d7bc380c92b78c 100644 --- a/tests/drivers/build_all/sensor/i2c.dtsi +++ b/tests/drivers/build_all/sensor/i2c.dtsi @@ -90,12 +90,6 @@ test_i2c_bmm150: bmm150@d { reg = <0xd>; }; -test_i2c_ft5336: ft5336@e { - compatible = "focaltech,ft5336"; - reg = <0xe>; - int-gpios = <&test_gpio 0 0>; -}; - test_i2c_ht16k33: ht16k33@f { compatible = "holtek,ht16k33"; reg = <0xf>;