tests: drivers: build_all: gpio: add ads1145s0x testcase

This fixes multiple CI issues for the ads1145s0x
driver.

Having a special testcase for the driver limits the
CONFIG_ADC=y and CONFIG_ADC_INIT_PRIORITY adjustment
requirements.

Also fixes address not matching warning for pcal6416a@2

Signed-off-by: Nick Ward <nix.ward@gmail.com>
This commit is contained in:
Nick Ward 2023-11-03 19:58:51 +11:00 committed by Carles Cufí
commit 2612aa02ce
5 changed files with 38 additions and 24 deletions

View file

@ -0,0 +1,3 @@
CONFIG_ADC=y
CONFIG_ADC_ADS114S0X_GPIO=y
CONFIG_ADC_INIT_PRIORITY=80

View file

@ -0,0 +1,21 @@
&test_spi {
test_spi_ads114s08: ads114s08@0 {
compatible = "ti,ads114s08";
status = "okay";
spi-max-frequency = <10000000>;
reg = <0x00>;
#address-cells = <1>;
#size-cells = <0>;
#io-channel-cells = <1>;
reset-gpios = <&test_gpio 0 0>;
drdy-gpios = <&test_gpio 0 0>;
start-sync-gpios = <&test_gpio 0 0>;
test_spi_ads114s08_gpio: ads114s0x_gpio {
compatible = "ti,ads114s0x-gpio";
gpio-controller;
ngpios = <4>;
#gpio-cells = <2>;
};
};
};

View file

@ -51,7 +51,7 @@
test_i2c_pcal6416a: pcal6416a@2 {
compatible = "nxp,pcal6416a";
reg = <0x1>;
reg = <0x2>;
gpio-controller;
#gpio-cells = <2>;
ngpios = <16>;
@ -244,30 +244,10 @@
reset-gpios = <&test_gpio 0 0>;
};
test_spi_ads114s08: ads114s08@3 {
compatible = "ti,ads114s08";
status = "okay";
spi-max-frequency = <10000000>;
reg = <0x03>;
#address-cells = <1>;
#size-cells = <0>;
#io-channel-cells = <1>;
reset-gpios = <&test_gpio 0 0>;
drdy-gpios = <&test_gpio 0 0>;
start-sync-gpios = <&test_gpio 0 0>;
test_spi_ads114s08_gpio: ads114s0x_gpio {
compatible = "ti,ads114s0x-gpio";
gpio-controller;
ngpios = <4>;
#gpio-cells = <2>;
};
};
test_spi_ad5592: ad5592@4 {
test_spi_ad5592: ad5592@3 {
compatible = "adi,ad5592";
status = "okay";
reg = <0x04>;
reg = <0x03>;
spi-max-frequency = <0>;
reset-gpios = <&test_gpio 0 0>;

View file

@ -4,4 +4,3 @@ CONFIG_TEST_USERSPACE=y
CONFIG_I2C=y
CONFIG_GPIO_PCA95XX_INTERRUPT=y
CONFIG_SPI=y
CONFIG_ADC_ADS114S0X_GPIO=y

View file

@ -23,3 +23,14 @@ tests:
platform_allow: niosv_m niosv_g
depends_on: gpio
extra_args: DTC_OVERLAY_FILE="altera.overlay"
drivers.gpio.build.adc_ads1145s0x_gpio:
min_ram: 32
platform_allow: m5stack_core2 nrf52840dk_nrf52840
depends_on:
- gpio
- adc
- spi
extra_args:
- DTC_OVERLAY_FILE="app.overlay;adc_ads1145s0x_gpio.overlay"
- CONF_FILE="adc_ads1145s0x_gpio.conf"