tests: drivers: gpio: add SX1509B interrupt-supporting configs
No in-tree boards support the NINT signal on an SX1509B IO extender, so test using custom overlays/configurations for the Particle Xenon board using an SX1509B breakout board. Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
This commit is contained in:
parent
e850ced155
commit
6c674300fc
4 changed files with 72 additions and 0 deletions
|
@ -0,0 +1,3 @@
|
|||
CONFIG_I2C=y
|
||||
CONFIG_GPIO_SX1509B=y
|
||||
CONFIG_GPIO_SX1509B_INTERRUPT=y
|
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
* Copyright (c) 2019 Nordic Semiconductor ASA
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/ {
|
||||
resources {
|
||||
compatible = "test,gpio_basic_api";
|
||||
out-gpios = <&sx1509b 0 0>; /* EXT0 */
|
||||
in-gpios = <&sx1509b 1 0>; /* EXT1 */
|
||||
};
|
||||
|
||||
gpio_keys {
|
||||
compatible = "gpio-keys";
|
||||
iox_button: button_2 {
|
||||
gpios = <&sx1509b 2 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
|
||||
label = "IOX Button";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&i2c0 {
|
||||
sx1509b: sx1509b@3e {
|
||||
compatible = "semtech,sx1509b";
|
||||
reg = <0x3e>;
|
||||
label = "IOX";
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
ngpios = <16>;
|
||||
nint-gpios =<&gpio1 1 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
|
||||
};
|
||||
};
|
|
@ -0,0 +1,3 @@
|
|||
CONFIG_I2C=y
|
||||
CONFIG_GPIO_SX1509B=y
|
||||
CONFIG_GPIO_SX1509B_INTERRUPT=y
|
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
* Copyright (c) 2019 Nordic Semiconductor ASA
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/ {
|
||||
resources {
|
||||
compatible = "test,gpio_basic_api";
|
||||
out-gpios = <&sx1509b 0 0>; /* EXT0 */
|
||||
in-gpios = <&sx1509b 1 0>; /* EXT1 */
|
||||
};
|
||||
|
||||
gpio_keys {
|
||||
compatible = "gpio-keys";
|
||||
iox_button: button_2 {
|
||||
gpios = <&sx1509b 2 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
|
||||
label = "IOX Button";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&i2c0 {
|
||||
sx1509b: sx1509b@3e {
|
||||
compatible = "semtech,sx1509b";
|
||||
reg = <0x3e>;
|
||||
label = "IOX";
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
ngpios = <16>;
|
||||
nint-gpios =<&gpio1 1 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
|
||||
};
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue