-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Open
Labels
area: DisplaybugThe issue is a bug, or the PR is fixing a bugThe issue is a bug, or the PR is fixing a bug
Description
Describe the bug
- frdm_mcxn947/mcxn947/cpu0
- frdm_mcxn236
011a357 is the first bad commit
commit 011a357
Author: Jeremy Dick [email protected]
Date: Fri Oct 10 10:43:44 2025 -0500
drivers: mipi-dbi-spi: fix initialization of SPI CS
Set cs_is_gpio only if there is a GPIO CS, configure the CS as
a native hardware CS if not
This fixes incorrectly trying to use a GPIO CS when there isn't one
Signed-off-by: Jeremy Dick <[email protected]>
include/zephyr/drivers/mipi_dbi.h | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
Regression
- This is a regression.
Steps to reproduce
west build -b frdm_mcxn947/mcxn947/cpu0 --shield=lcd_par_s035_8080 tests/drivers/display/display_check
Relevant log output
In file included from /__w/zephyr/zephyr/include/zephyr/sys/util_macro.h:34,
from /__w/zephyr/zephyr/include/zephyr/irq_multilevel.h:16,
from /__w/zephyr/zephyr/include/zephyr/devicetree.h:20,
from /__w/zephyr/zephyr/include/zephyr/device.h:12,
from /__w/zephyr/zephyr/drivers/display/display_st7796s.c:9:
/__w/zephyr/zephyr/include/zephyr/drivers/mipi_dbi.h:66:60: error: '_delay' undeclared here (not in a function)
66 | (SPI_CS_CONTROL_INIT_GPIO(node_id, _delay)), \
| ^~~~~~
/__w/zephyr/zephyr/include/zephyr/sys/util_internal.h:72:26: note: in definition of macro '__DEBRACKET'
72 | #define __DEBRACKET(...) __VA_ARGS__
| ^~~~~~~~~~~
/__w/zephyr/zephyr/include/zephyr/sys/util_internal.h:64:9: note: in expansion of macro '__GET_ARG2_DEBRACKET'
64 | __GET_ARG2_DEBRACKET(one_or_two_args _if_code, _else_code)
| ^~~~~~~~~~~~~~~~~~~~
/__w/zephyr/zephyr/include/zephyr/sys/util_internal.h:59:9: note: in expansion of macro '__COND_CODE'
59 | __COND_CODE(_XXXX##_flag, _if_1_code, _else_code)
| ^~~~~~~~~~~
/__w/zephyr/zephyr/include/zephyr/sys/util_macro.h:204:9: note: in expansion of macro 'Z_COND_CODE_1'
204 | Z_COND_CODE_1(_flag, _if_1_code, _else_code)
| ^~~~~~~~~~~~~
/__w/zephyr/zephyr/include/zephyr/devicetree.h:5211:9: note: in expansion of macro 'COND_CODE_1'
5211 | COND_CODE_1(DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT), \
| ^~~~~~~~~~~
/__w/zephyr/zephyr/include/zephyr/sys/util_internal.h:69:53: note: in expansion of macro '__DEBRACKET'
69 | #define __GET_ARG2_DEBRACKET(ignore_this, val, ...) __DEBRACKET val
| ^~~~~~~~~~~
/__w/zephyr/zephyr/include/zephyr/sys/util_internal.h:64:9: note: in expansion of macro '__GET_ARG2_DEBRACKET'
64 | __GET_ARG2_DEBRACKET(one_or_two_args _if_code, _else_code)
| ^~~~~~~~~~~~~~~~~~~~
/__w/zephyr/zephyr/include/zephyr/sys/util_internal.h:59:9: note: in expansion of macro '__COND_CODE'
59 | __COND_CODE(_XXXX##_flag, _if_1_code, _else_code)
| ^~~~~~~~~~~
/__w/zephyr/zephyr/include/zephyr/sys/util_macro.h:204:9: note: in expansion of macro 'Z_COND_CODE_1'
204 | Z_COND_CODE_1(_flag, _if_1_code, _else_code)
| ^~~~~~~~~~~~~
/__w/zephyr/zephyr/include/zephyr/drivers/mipi_dbi.h:65:25: note: in expansion of macro 'COND_CODE_1'
65 | COND_CODE_1(DT_SPI_DEV_HAS_CS_GPIOS(node_id), \
| ^~~~~~~~~~~
/__w/zephyr/zephyr/include/zephyr/sys/util_internal.h:69:53: note: in expansion of macro '__DEBRACKET'
69 | #define __GET_ARG2_DEBRACKET(ignore_this, val, ...) __DEBRACKET val
| ^~~~~~~~~~~
/__w/zephyr/zephyr/include/zephyr/sys/util_internal.h:64:9: note: in expansion of macro '__GET_ARG2_DEBRACKET'
64 | __GET_ARG2_DEBRACKET(one_or_two_args _if_code, _else_code)
| ^~~~~~~~~~~~~~~~~~~~
/__w/zephyr/zephyr/include/zephyr/sys/util_internal.h:59:9: note: in expansion of macro '__COND_CODE'
59 | __COND_CODE(_XXXX##_flag, _if_1_code, _else_code)
| ^~~~~~~~~~~
/__w/zephyr/zephyr/include/zephyr/sys/util_macro.h:204:9: note: in expansion of macro 'Z_COND_CODE_1'
204 | Z_COND_CODE_1(_flag, _if_1_code, _else_code)
| ^~~~~~~~~~~~~
/__w/zephyr/zephyr/include/zephyr/drivers/spi.h:340:18: note: in expansion of macro 'COND_CODE_1'
340 | .delay = COND_CODE_1(IS_EMPTY(__VA_ARGS__), \
| ^~~~~~~~~~~
/__w/zephyr/zephyr/include/zephyr/drivers/mipi_dbi.h:66:26: note: in expansion of macro 'SPI_CS_CONTROL_INIT_GPIO'
66 | (SPI_CS_CONTROL_INIT_GPIO(node_id, _delay)), \
| ^~~~~~~~~~~~~~~~~~~~~~~~
/__w/zephyr/zephyr/drivers/display/display_st7796s.c:377:35: note: in expansion of macro 'MIPI_DBI_SPI_CONFIG_DT'
377 | .config = MIPI_DBI_SPI_CONFIG_DT( \
| ^~~~~~~~~~~~~~~~~~~~~~
/__w/zephyr/zephyr/twister-out/frdm_mcxn947_mcxn947_cpu0/zephyr/samples/drivers/video/capture/sample.video.capture/zephyr/include/generated/zephyr/devicetree_generated.h:31106:51: note: in expansion of macro 'ST7796S_INIT'
31106 | #define DT_FOREACH_OKAY_INST_sitronix_st7796s(fn) fn(0)
| ^~
/__w/zephyr/zephyr/include/zephyr/sys/util_internal.h:105:36: note: in expansion of macro 'DT_FOREACH_OKAY_INST_sitronix_st7796s'
105 | #define UTIL_PRIMITIVE_CAT(a, ...) a##__VA_ARGS__
| ^
/__w/zephyr/zephyr/drivers/display/display_st7796s.c:414:1: note: in expansion of macro 'DT_INST_FOREACH_STATUS_OKAY'
414 | DT_INST_FOREACH_STATUS_OKAY(ST7796S_INIT)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
ninja: build stopped: subcommand failed.
Impact
Annoyance – Minor irritation; no significant impact on usability or functionality.
Environment
- os: ubuntu
- toolchain: Zephyr
- version: 011a357
Additional Context
No response
Metadata
Metadata
Assignees
Labels
area: DisplaybugThe issue is a bug, or the PR is fixing a bugThe issue is a bug, or the PR is fixing a bug