nuttx/drivers/ioexpander
paolovolpi db50f0445a drivers/ioexapnder/mcp23x17 : Fix write gpio output values on OLAT registers
Gpio output value must be set on OLATA and OLATB registers.

Summary

Why is this change necessary?
This is a bug fix. The MCP23x17 driver was writing GPIO output values to incorrect registers, causing output
pins to not behave as expected.

What functional part of the code is being changed?
The MCP23x17 I/O expander driver (drivers/ioexpander/mcp23x17.c).

How does the change work?
The fix ensures GPIO output values are written to the OLATA and OLATB (Output Latch) registers instead of the
incorrect registers. The OLAT registers are the proper registers for controlling the actual output pin
states on the MCP23x17.

Impact

- User experience: No adaptation required. This fix corrects existing broken behavior.
- Build: No impact.
- Hardware: Affects boards using the MCP23x17 I/O expander.
- Documentation: None required.
- Security: No impact.
- Compatibility: Backward compatible - fixes incorrect behavior.

Testing

Build Host:
- OS: Ubuntu 22.04
- Compiler: arm-none-eabi-gcc

Target:
- Architecture: ARM (RP2350)
- Board: RP2350-based board
- Configuration: Custom config with MCP23x17 enabled over I2C0

Testing performed:
- Connected MCP23x17 to RP2350 via I2C0
- Attached an LED array to all 16 GPIO pins of the MCP23x17
- Configured all 16 GPIO as outputs
- Wrote a simple test application to toggle the LEDs on and off
- Before fix: LEDs did not respond correctly to output commands
- After fix: All 16 LEDs toggle on/off as expected

Signed-off-by: paolo <paolo.volpi@gmail.com>
2026-01-30 17:42:48 +01:00
..
aw9523b.c drivers/ioexpander/aw9523b: New driver for AW9523B i/o expander 2025-08-29 09:10:50 -03:00
aw9523b.h drivers/ioexpander/aw9523b: New driver for AW9523B i/o expander 2025-08-29 09:10:50 -03:00
CMakeLists.txt drivers/ioexpander/aw9523b: New driver for AW9523B i/o expander 2025-08-29 09:10:50 -03:00
gpio.c drivers/gpio: gpio driver added debounce and interrupt mask functions 2025-12-18 14:52:37 +01:00
gpio_lower_half.c drivers/gpio: gpio driver added debounce and interrupt mask functions 2025-12-18 14:52:37 +01:00
icjx.c drivers/ioexpander/icjx.c: reconfigure icjx after undervoltage 2025-07-18 12:08:39 -03:00
icjx.h drivers/ioexpander/icjx: add option to set filters during initialization 2025-04-24 10:05:56 -03:00
ioe_dummy.c ioe_dummy: fix pinval always zero issue 2026-01-05 15:10:41 -03:00
ioe_rpmsg.c sim/configs/rpserver/rpproxy_virtio: Change the sim 32bit to 64bit compilation 2024-11-15 14:01:11 +08:00
iso1h812g.c drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
iso1h812g.h drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
iso1i813t.c drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
iso1i813t.h drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
Kconfig drivers/ioexpander/aw9523b: New driver for AW9523B i/o expander 2025-08-29 09:10:50 -03:00
Make.defs drivers/ioexpander/aw9523b: New driver for AW9523B i/o expander 2025-08-29 09:10:50 -03:00
mcp23x08.c This patch fix mcp23x08 support. Issue #15592 2025-01-21 01:59:25 +08:00
mcp23x08.h drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
mcp23x17.c drivers/ioexapnder/mcp23x17 : Fix write gpio output values on OLAT registers 2026-01-30 17:42:48 +01:00
mcp23x17.h drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
pca9538.c drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
pca9538.h drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
pca9555.c drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
pca9555.h drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
pca9557.c drivers/ioexpander: Add support for PCA9557 2025-03-25 15:46:09 -03:00
pca9557.h drivers/ioexpander: Add support for PCA9557 2025-03-25 15:46:09 -03:00
pcf8574.c drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
pcf8574.h drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
pcf8575.c drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
pcf8575.h drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
skeleton.c drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
sx1509.c style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
sx1509.h drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
tca64xx.c drivers/tca64xx: Add support for PCAL6416 2025-08-26 09:46:09 +08:00
tca64xx.h drivers/tca64xx: Add support for PCAL6416 2025-08-26 09:46:09 +08:00