mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 0/5] video: ssd1307fb: Add SPI support
@ 2021-12-17 18:22 Michael Tretter
  2021-12-17 18:22 ` [PATCH 1/5] video: ssd1307fb: pass par instead of i2c client to write Michael Tretter
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Michael Tretter @ 2021-12-17 18:22 UTC (permalink / raw)
  To: barebox

Hello,

The Solomon single-chip CMOS OLED/PLED driver with controller can be connected
to I2C or SPI. The driver already supports I2C. This series adds support for
SPI connected displays to the driver.

Unfortunately, the bindings for the SPI connected display are not documented.
This driver uses the (undocumented) solomon,ssd1306 compatible of the staging
driver in Linux, but uses properties defined for the solomon,ssd1306fb-i2c
compatible of the I2C driver.

While the driver allows to use SPI and I2C, which would be a use case for
regmap, the driver does not use regmap, because the controller does not
actually expose registers, but simply accepts commands or data. This does not
match the regmap API. Therefore, the driver uses its own abstraction for the
bus.

The updated driver also allows to disable either SPI or I2C and uses #if
statements in the driver code, which I don't really like. I considered it
better than making the driver dependent on SPI and I2C, but if there is a
better way to handle this either/or dependency, I will gladly update the
driver accordingly.

Patches 1-4 refactor the driver to have fewer locations that refer to I2C to
simplify disabling the I2C support.

Patch 5 actually adds the SPI support and makes I2C optional.

Michael

Michael Tretter (5):
  video: ssd1307fb: pass par instead of i2c client to write
  video: ssd1307fb: don't use i2c client for logging
  video: ssd1307fb: move i2c setup to single place
  video: ssd1307fb: use function pointer for write
  video: ssd1307fb: add spi support

 drivers/video/Kconfig     |   2 +-
 drivers/video/ssd1307fb.c | 180 ++++++++++++++++++++++++++------------
 2 files changed, 125 insertions(+), 57 deletions(-)

-- 
2.30.2


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-12-18  6:22 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-17 18:22 [PATCH 0/5] video: ssd1307fb: Add SPI support Michael Tretter
2021-12-17 18:22 ` [PATCH 1/5] video: ssd1307fb: pass par instead of i2c client to write Michael Tretter
2021-12-17 18:22 ` [PATCH 2/5] video: ssd1307fb: don't use i2c client for logging Michael Tretter
2021-12-17 18:22 ` [PATCH 3/5] video: ssd1307fb: move i2c setup to single place Michael Tretter
2021-12-17 18:22 ` [PATCH 4/5] video: ssd1307fb: use function pointer for write Michael Tretter
2021-12-17 18:23 ` [PATCH 5/5] video: ssd1307fb: add spi support Michael Tretter
2021-12-17 19:00   ` Ahmad Fatoum
2021-12-17 21:13     ` Michael Tretter
2021-12-18  6:20       ` Ahmad Fatoum

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox