Skip to content

ssd1306: Support connecting SPI and I2C simultaneously #56887

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

Merged
merged 5 commits into from
Sep 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions boards/shields/ssd1306/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ if SHIELD_SSD1306_128X64 || SHIELD_SSD1306_128X64_SPI || SHIELD_SSD1306_128X32 |

if DISPLAY

choice SSD1306_CONTROLLER_TYPE
default SSD1306_SH1106_COMPATIBLE if SHIELD_SH1106_128X64
endchoice

if LVGL

config LV_Z_VDB_SIZE
Expand Down
2 changes: 1 addition & 1 deletion boards/shields/ssd1306/sh1106_128x64.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
status = "okay";

sh1106_sh1106_128x64: ssd1306@3c {
compatible = "solomon,ssd1306fb";
compatible = "sinowealth,sh1106";
reg = <0x3c>;
width = <128>;
height = <64>;
Expand Down
23 changes: 3 additions & 20 deletions drivers/display/Kconfig.ssd1306
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@
menuconfig SSD1306
bool "SSD1306 display driver"
default y
depends on DT_HAS_SOLOMON_SSD1306FB_ENABLED
depends on DT_HAS_SOLOMON_SSD1306FB_ENABLED || DT_HAS_SINOWEALTH_SH1106_ENABLED
select I2C if $(dt_compat_on_bus,$(DT_COMPAT_SOLOMON_SSD1306FB),i2c)
select SPI if $(dt_compat_on_bus,$(DT_COMPAT_SOLOMON_SSD1306FB),spi)
select I2C if $(dt_compat_on_bus,$(DT_COMPAT_SINOWEALTH_SH1106),i2c)
select SPI if $(dt_compat_on_bus,$(DT_COMPAT_SINOWEALTH_SH1106),spi)
help
Enable driver for SSD1306 display driver.

Expand All @@ -21,23 +23,4 @@ config SSD1306_DEFAULT_CONTRAST
help
SSD1306 default contrast.

choice SSD1306_CONTROLLER_TYPE
prompt "Display controller type"
default SSD1306_DEFAULT
help
Specify the type of the controller.

config SSD1306_DEFAULT
bool "Default SSD1306 controller"

config SSD1306_SH1106_COMPATIBLE
bool "SH1106 compatible mode"

endchoice

config SSD1306_REVERSE_MODE
bool "SSD1306 reverse mode"
help
SSD1306 reverse video mode.

Comment on lines -38 to -42
Copy link
Collaborator

Choose a reason for hiding this comment

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

This commit should be second change before multi instance support commit.

Copy link
Member Author

Choose a reason for hiding this comment

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

I reordered commits.

endif # SSD1306
Loading