.. | .. |
---|
442 | 442 | |
---|
443 | 443 | struct orion_gpio_chip *ochip = gpiochip_get_data(chip); |
---|
444 | 444 | u32 out, io_conf, blink, in_pol, data_in, cause, edg_msk, lvl_msk; |
---|
| 445 | + const char *label; |
---|
445 | 446 | int i; |
---|
446 | 447 | |
---|
447 | 448 | out = readl_relaxed(GPIO_OUT(ochip)); |
---|
.. | .. |
---|
453 | 454 | edg_msk = readl_relaxed(GPIO_EDGE_MASK(ochip)); |
---|
454 | 455 | lvl_msk = readl_relaxed(GPIO_LEVEL_MASK(ochip)); |
---|
455 | 456 | |
---|
456 | | - for (i = 0; i < chip->ngpio; i++) { |
---|
457 | | - const char *label; |
---|
| 457 | + for_each_requested_gpio(chip, i, label) { |
---|
458 | 458 | u32 msk; |
---|
459 | 459 | bool is_out; |
---|
460 | | - |
---|
461 | | - label = gpiochip_is_requested(chip, i); |
---|
462 | | - if (!label) |
---|
463 | | - continue; |
---|
464 | 460 | |
---|
465 | 461 | msk = 1 << i; |
---|
466 | 462 | is_out = !(io_conf & msk); |
---|