Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drivers: gpio: pca95xx does not compile with CONFIG_GPIO_PCA95XX_INTERRUPT #43756

Closed
Explorer001 opened this issue Mar 14, 2022 · 0 comments · Fixed by #43808
Closed

drivers: gpio: pca95xx does not compile with CONFIG_GPIO_PCA95XX_INTERRUPT #43756

Explorer001 opened this issue Mar 14, 2022 · 0 comments · Fixed by #43808
Assignees
Labels
area: GPIO bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug

Comments

@Explorer001
Copy link

When enabling the pca95xx driver with interrupt support, this will lead to compile errors.

I successfully used the pca95xx gpio expander already. After updating my main branch my project fails to compile.

To Reproduce
Steps to reproduce the behavior:

  1. Enable the pca95xx driver with interrupts
CONFIG_I2C=y
CONFIG_GPIO=y
CONFIG_GPIO_PCA95XX=y
CONFIG_GPIO_PCA95XX_INTERRUPT=y
  1. Add the expander to your device tree. Example for nrf given below.
&i2c0 {
	compatible = "nordic,nrf-twi";
	status = "okay";
	sda-pin = <4>;
	scl-pin = <5>;

	pca9555: pca9555@20 {
		compatible = "nxp,pca95xx";
		label = "GPIO_P0";
		reg = <0x20>;
		gpio-controller;
		#gpio-cells = <2>;
		ngpios = <16>;
		interrupt-gpios = <&gpio0 15 (GPIO_ACTIVE_LOW)>;
	};
};
  1. Build with west build for a board of your liking.

Expected behavior
The program should compile with no error.

Impact
The program does not compile, stopping development.

Logs and console output

Errors caused by commit 80ee515.

/data/git/zephyr-workspace/zephyr/drivers/gpio/gpio_pca95xx.c: In function 'gpio_pca95xx_pin_interrupt_configure':
/data/git/zephyr-workspace/zephyr/drivers/gpio/gpio_pca95xx.c:610:5: error: 'int_gpio' undeclared (first use in this function)
  610 |    &int_gpio, active ?
      |     ^~~~~~~~
/data/git/zephyr-workspace/zephyr/drivers/gpio/gpio_pca95xx.c:610:5: note: each undeclared identifier is reported only
once for each function it appears in
/data/git/zephyr-workspace/zephyr/drivers/gpio/gpio_pca95xx.c: In function 'gpio_pca95xx_init':
/data/git/zephyr-workspace/zephyr/drivers/gpio/gpio_pca95xx.c:708:4: error: 'err' undeclared (first use in this function)
  708 |    err = -ENODEV;
      |    ^~~
/data/git/zephyr-workspace/zephyr/drivers/gpio/gpio_pca95xx.c:724:21: error: 'cfg' undeclared (first use in this function)
  724 |   gpio_add_callback(cfg->int_gpio.port, &drv_data->gpio_callback);
      |                     ^~~
/data/git/zephyr-workspace/zephyr/drivers/gpio/gpio_pca95xx.c:709:4: error: label 'err' used but not defined
  709 |    goto err;

Environment (please complete the following information):

  • OS: Linux
  • Toolchain: zephyr sdk 0.13.1
  • No compile errors when using 5af7fe6.
  • Error starts occurring with commit 80ee515.
@Explorer001 Explorer001 added the bug The issue is a bug, or the PR is fixing a bug label Mar 14, 2022
@Explorer001 Explorer001 changed the title drivers: gprio: pca95xx does not compile with CONFIG_GPIO_PCA95XX_INTERRUPT drivers: gpio: pca95xx does not compile with CONFIG_GPIO_PCA95XX_INTERRUPT Mar 14, 2022
@gmarull gmarull self-assigned this Mar 15, 2022
@mbolivar-nordic mbolivar-nordic added the priority: low Low impact/importance bug label Mar 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: GPIO bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants