Commit 6c674300 authored by Peter Bigot's avatar Peter Bigot Committed by Carles Cufi
Browse files

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: default avatarPeter Bigot <peter.bigot@nordicsemi.no>
parent e850ced1
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
CONFIG_I2C=y
CONFIG_GPIO_SX1509B=y
CONFIG_GPIO_SX1509B_INTERRUPT=y
+33 −0
Original line number Diff line number Diff line
/*
 * 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)>;
	};
};
+3 −0
Original line number Diff line number Diff line
CONFIG_I2C=y
CONFIG_GPIO_SX1509B=y
CONFIG_GPIO_SX1509B_INTERRUPT=y
+33 −0
Original line number Diff line number Diff line
/*
 * 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)>;
	};
};