Skip to content
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
13 changes: 6 additions & 7 deletions drivers/display/ssd1306.c
Original file line number Diff line number Diff line change
Expand Up @@ -364,14 +364,12 @@ static int ssd1306_init_device(struct device *dev)
};

#ifdef DT_INST_0_SOLOMON_SSD1306FB_RESET_GPIOS_CONTROLLER
gpio_pin_write(driver->reset,
DT_INST_0_SOLOMON_SSD1306FB_RESET_GPIOS_PIN, 1);
k_sleep(SSD1306_RESET_DELAY);
gpio_pin_write(driver->reset,
DT_INST_0_SOLOMON_SSD1306FB_RESET_GPIOS_PIN, 0);
gpio_pin_set(driver->reset,
DT_INST_0_SOLOMON_SSD1306FB_RESET_GPIOS_PIN, 1);
k_sleep(SSD1306_RESET_DELAY);
gpio_pin_write(driver->reset,
DT_INST_0_SOLOMON_SSD1306FB_RESET_GPIOS_PIN, 1);
gpio_pin_set(driver->reset,
DT_INST_0_SOLOMON_SSD1306FB_RESET_GPIOS_PIN, 0);
#endif

/* Turn display off */
Expand Down Expand Up @@ -434,7 +432,8 @@ static int ssd1306_init(struct device *dev)

gpio_pin_configure(driver->reset,
DT_INST_0_SOLOMON_SSD1306FB_RESET_GPIOS_PIN,
GPIO_DIR_OUT);
GPIO_OUTPUT_INACTIVE |
DT_INST_0_SOLOMON_SSD1306FB_RESET_GPIOS_FLAGS);
Copy link
Member

Choose a reason for hiding this comment

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

I assume that polarity will be passed by DT_INST_0_SOLOMON_SSD1306FB_RESET_GPIOS_FLAGS?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I did not fixed it in shield overlays because gpio bruch is outdated and has conflicts with master.

#endif

if (ssd1306_init_device(dev)) {
Expand Down
5 changes: 5 additions & 0 deletions dts/bindings/display/solomon,ssd1306fb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,8 @@ properties:
reset-gpios:
type: phandle-array
required: false
description: RESET pin.

The RESET pin of SSD1306 is active low.
If connected directly the MCU pin should be configured
as active low.