tests: add an input build_all test
Add an input build_all test with a bunch of input driver, move the ft5336 one out of sensors as well. Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
This commit is contained in:
parent
c214ec3cf4
commit
80a986f438
|
@ -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
|
||||
|
|
8
tests/drivers/build_all/input/CMakeLists.txt
Normal file
8
tests/drivers/build_all/input/CMakeLists.txt
Normal file
|
@ -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})
|
62
tests/drivers/build_all/input/app.overlay
Normal file
62
tests/drivers/build_all/input/app.overlay
Normal file
|
@ -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>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
2
tests/drivers/build_all/input/prj.conf
Normal file
2
tests/drivers/build_all/input/prj.conf
Normal file
|
@ -0,0 +1,2 @@
|
|||
CONFIG_GPIO=y
|
||||
CONFIG_INPUT=y
|
10
tests/drivers/build_all/input/src/main.c
Normal file
10
tests/drivers/build_all/input/src/main.c
Normal file
|
@ -0,0 +1,10 @@
|
|||
/*
|
||||
* Copyright 2023 Google LLC
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
int main(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
7
tests/drivers/build_all/input/testcase.yaml
Normal file
7
tests/drivers/build_all/input/testcase.yaml
Normal file
|
@ -0,0 +1,7 @@
|
|||
tests:
|
||||
drivers.input.build:
|
||||
tags:
|
||||
- drivers
|
||||
- input
|
||||
build_only: true
|
||||
platform_allow: native_posix
|
|
@ -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>;
|
||||
|
|
Loading…
Reference in a new issue