Skip to contentSkip to conversation

drm: Add driver for Solomon SSD130x OLED displays

PATCH Dominik Kierner 1 participant 1 message Jun 14, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hello Javier

Quoted 20 lines · Javier Martinez Canillas
Quoted 4 lines

I always understood regulator_get_optional() as a way of not having to rely on a dummy, when a regulator is not present, but please correct me, if I am wrong on this. The dummies would only be necessary for the mandatory supplies VCC and VDD.

Yes, that's what I tried to say. That's regulator_get() and not _optional() the function that will provide a dummy regulator if isn't physically present:

https://elixir.bootlin.com/linux/latest/source/drivers/regulator/core.c#L2067

Quoted 10 lines

You mean this part of the documentation of regulator_get_optional(), correct?:

Quoted 6 lines

* This is intended for use by consumers for devices which can have
* some supplies unconnected in normal use, such as some MMC devices.
* It can allow the regulator core to provide stub supplies for other
* supplies requested using normal regulator_get() calls without
* disrupting the operation of drivers that can handle absent
* supplies.

Quoted 3 lines

So for example when you just use a voltage rail in let's say a board pin header then you will need to define supply nodes with compatible = "regulator- fixed" ?

Exactly.

Quoted 9 lines

That is indeed more accurate from a hardware description point of view but I'm not convinced that this is something worth to break DT backward compatibility.

You also mentioned (IIUC) that the regulators could be made optional and their presence be used as an indication that an atomic charge pump configuration can be made instead of using the current ssd130x->display_settings.use_charge_pump.

I think that would prefer that the latter option, but will let others to chime in since maybe I'm not correct on the preferred approach.

Yes, here the reference for the former approach:
Chapter 2 "Charge Pump Regulator" on Page 62 of the SSD1306 datasheet:
https://cdn-shop.adafruit.com/datasheets/SSD1306.pdf

Just a TL;DR of the former approach for easier discussion:
The logic supply VDD would always be mandatory.
The low voltage supply VBAT would be optional and probed first. If found, it would supersede the "high" voltage driving supply VCC and the charge pump would be enabled. If VBAT is not found, then VCC is mandatory and the charge pump will not be enabled.

--
Best regards

Dominik Kierner
Research & Development
DH electronics