Skip to content

Missing pointer dereference in gpio_pca_series.c causing gpio expander input to have a unknown value. #89582

@moiflo033

Description

@moiflo033

Describe the bug

There is a missing pointer dereference here:

value = sys_le32_to_cpu(input_data);

This line should read

*value = sys_le32_to_cpu(input_data); 

This causes the value that is read from the gpio expander to not be read properly from the gpio subsystem.

To Reproduce

  • Configure pin on pca series expander (in my case pca9554) to be input and then try to read the pinstate of that input.
  • Observe that it doesn't match.
  • Read expander registers via i2c shell to verify that the registers have the correct value.

Expected behavior

I would expect that input gpios get read properly from pca series expanders.

Impact

Inability to read inputs from pca series expanders.

Environment (please complete the following information):

  • OS: Linux
  • Toolchain Zephyr SDK 0.17.0
  • v4.1.0 but also appears to still be the case on main

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: GPIObugThe issue is a bug, or the PR is fixing a bug

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions