-
Notifications
You must be signed in to change notification settings - Fork 6.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ili9341: mipi-dbi-mode setable through DT #78321
Conversation
cd55cef
to
8ac3820
Compare
Indeed, those don't look so helpful. Not sure why you can't see it but this looks like the issue:
|
@@ -35,3 +35,7 @@ properties: | |||
description: | |||
Display inversion mode. Every bit is inverted from the frame memory to | |||
the display. | |||
|
|||
mipi-mode: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need to add this- the property already exists in mipi-dbi-device.yaml
:
mipi-mode: |
8ac3820
to
97f85cd
Compare
drivers/display/display_ili9xxx.c
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you want to reformat the #define
block (either for personal preference or to get clang-format
to stop complaining), that is ok, but please make one commit that performs the reformat and another performing the functional change. Mixing formatting changes with functional ones in a single commit makes the git blame
much harder to follow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to reformat the file, but it also affected the look-up-table in the beginning
const uint8_t ili9xxx_rgb_lut[] = {
0, 2, 4, 6,
8, 10, 12, 14,
16, 18, 20, 22,
24, 26, 28, 30,
which is more readable this way. git add file.c -p
joined the LUT with the next function and turned it into too much work to make "right". So I undid the clang-format
and pushed my initial change again.
97f85cd
to
681a4e1
Compare
Since my intended changes were also included in PR-78453, this PR is obsolete. |
Currently ili9xxx only supports SPI, but there is also a 8 and 16-bit interface with different modes, see MIPI-DBI driver APIs. STM calls it flexible memory controller, other vendors will have a similar interface.
My PR allows to set different modes that must be supported by the parent device. Regarding STM it's mipi_dbi_stm32_fmc.c, that checks for
MIPI_DBI_MODE_8080_BUS_16_BIT
. My fix allows to set the mode accordingly and the configuration check passes.To not break any existing DTs I made the mode setting optional.