drivers: gpio: fix gpio-reserved-ranges handling in MCUX iGPIO driver
Fix handling of gpio-reserved-ranges within MCUX iGPIO driver, to ensure that the configuration IDX will be correctly calculated for pins where multiple reserved ranges are present on the GPIO controller Fixes #52506 Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
This commit is contained in:
parent
d27ace4012
commit
21c4957cde
1 changed files with 2 additions and 2 deletions
|
@ -56,8 +56,8 @@ static int mcux_igpio_configure(const struct device *dev,
|
|||
|
||||
/* Some SOCs have non-contiguous gpio pin layouts, account for this */
|
||||
for (i = 0; i < config->gap_count; i++) {
|
||||
if (cfg_idx >= config->pin_gaps[i].start) {
|
||||
if (cfg_idx < (config->pin_gaps[i].start +
|
||||
if (pin >= config->pin_gaps[i].start) {
|
||||
if (pin < (config->pin_gaps[i].start +
|
||||
config->pin_gaps[i].len)) {
|
||||
/* Pin is not connected to a mux */
|
||||
return -ENOTSUP;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue