Skip to content
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

drivers: display: ssd1322 driver #75550

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

topisani
Copy link
Contributor

@topisani topisani commented Jul 7, 2024

This is based on #68608, but adds more configuration options

Most options map directly to values documented in the datasheet, except segments-per-pixel, which I had to add to support the Newhaven NHD-2.7-12864WDW3. This is a slightly odd feature, but in practice it is a lot nicer to support it in the driver, and since we're currently remapping pixels anyway, it makes sense to implement here in my opinion.

This commit also adds a configurable buffer size for the pixel conversion. By using a larger buffer, we can potentially use DMA for the SPI transfer. The default is set to 8, which is the smallest value that supports segments-per-pixel = 2

decsny
decsny previously requested changes Jul 9, 2024

row-offset:
type: int
default: 0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

@danieldegrasse danieldegrasse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally looks ok, (although the default values do need justification).

@hlukasz would you prefer to merge your PR first once the merge window opens, then have this PR contain only the enhancements? Or would it be better for you to merge both commits within this PR? By default I'd bias towards merging #68608 first, but it would be more efficient to batch the commits into one PR

};

static inline int ssd1322_write_command(const struct device *dev, uint8_t cmd,
const uint8_t *buf, size_t len)
static inline int ssd1322_write_command(const struct device *dev, uint8_t cmd, const uint8_t *buf,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do not make formatting changes like this in the same commit as functional additions. If you would like to format a file before editing, IE with clang-format, then please do so and keep the formatting changes in one commit. This makes the review process much easier

@hlukasz
Copy link

hlukasz commented Jul 22, 2024

I don't have strong opinion on that. If we can merge both patches as one MR in next merging window, let's go that way.

@decsny decsny dismissed their stale review July 23, 2024 16:08

dismiss

@danieldegrasse
Copy link
Collaborator

I don't have strong opinion on that. If we can merge both patches as one MR in next merging window, let's go that way.

Ok, we can merge both in one PR then. @topisani when you get a chance- it probably makes the most sense to squash the driver itself into one commit, since the driver introduction and extensions are happening in one PR. Please make sure that @hlukasz is a co-author on the commit, and that copyrights are retained- I want to be sure credit is present where it is due :) This also allows us to avoid the clang-format changes, since the driver changes will all be in one commit

Initial support for SSD1322 OLED display driver. Only 1 bit color mode is
supported.

Most options map directly to values documented in the datasheet,
except segments-per-pixel, which I had to add to support the Newhaven
NHD-2.7-12864WDW3. This is a slightly odd feature, but in practice
it is a lot nicer to support it in the driver, and since we're currently
remapping pixels anyway, it makes sense to implement here.

This driver also has a configurable buffer size for the pixel conversion.
By using a larger buffer, we can potentially use DMA for the SPI transfer.
The default is set to 8, which is the smallest value that supports
segments-per-pixel = 2

Initial driver implementation by Lukasz Hawrylko <[email protected]>.
Additional options and configurability by Tobias Pisani <[email protected]>

Signed-off-by: Lukasz Hawrylko <[email protected]>
Signed-off-by: Tobias Pisani <[email protected]>

Co-authored-by: Lukasz Hawrylko <[email protected]>
Co-authored-by: Tobias Pisani <[email protected]>
Copy link

This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time.

@github-actions github-actions bot added the Stale label Sep 26, 2024
@danieldegrasse
Copy link
Collaborator

@jfischer-no would you be willing to review this PR? I know you had some comments on #68608, and I'm wondering if we could them resolved here to get this driver moving forwards

@github-actions github-actions bot removed the Stale label Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Devicetree Binding PR modifies or adds a Device Tree binding area: Display
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants