diff options
| author | Raphael Gallais-Pou <[email protected]> | 2025-09-04 14:53:05 +0200 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2025-11-17 10:43:26 -0600 |
| commit | 1a7ea0280eefd0c0c01dfab8e48e1909b81ba2de (patch) | |
| tree | dd3815b76b27c758071ae33634134f178bce1a97 /drivers/core | |
| parent | 75defb7fbf9e10a7ddd817cbbcbabdd2a89805b3 (diff) | |
ofnode: support panel-timings in ofnode_decode_display_timing
The "Display Timings" in panel-common.yaml can be provided by 2 properties
- panel-timing: when display panels are restricted to a single resolution
the "panel-timing" node expresses the required timings.
- display-timings: several resolutions with different timings are supported
with several timing subnode of "display-timings" node
This patch update the parsing function to handle this 2 possibility
when index = 0.
Reviewed-by: Patrice Chotard <[email protected]>
Reviewed-by: Yannick Fertre <[email protected]>
Signed-off-by: Raphael Gallais-Pou <[email protected]>
Diffstat (limited to 'drivers/core')
| -rw-r--r-- | drivers/core/ofnode.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/drivers/core/ofnode.c b/drivers/core/ofnode.c index 071d998a0a5..cf1cf8abfbe 100644 --- a/drivers/core/ofnode.c +++ b/drivers/core/ofnode.c @@ -1221,13 +1221,16 @@ int ofnode_decode_display_timing(ofnode parent, int index, int ret = 0; timings = ofnode_find_subnode(parent, "display-timings"); - if (!ofnode_valid(timings)) - return -EINVAL; - - i = 0; - ofnode_for_each_subnode(node, timings) { - if (i++ == index) - break; + if (ofnode_valid(timings)) { + i = 0; + ofnode_for_each_subnode(node, timings) { + if (i++ == index) + break; + } + } else { + if (index != 0) + return -EINVAL; + node = ofnode_find_subnode(parent, "panel-timing"); } if (!ofnode_valid(node)) |
