[PATCH v2 0/8] video: ssd1307fb: Add SPI support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

The bindings for the SPI connected display are still not documented. The
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. I moved the warning about the compatible from
the commit message into the driver to have it in the same place as the use of
the compatible and to allow to eventually remove it.

The driver still allows to use SPI and I2C with its own hand-rolled
abstraction, because the controller does not actually expose registers, but
simply accepts commands or data. I followed Ahmad's suggestions how to remove
the ugly #ifdefs and the driver looks a lot nicer now.

Patches 1-3 adjust the SPI and I2C frameworks to make them nicer to use for
drivers that support devices that may be connected via SPI or I2C.

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

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

Michael

---

Changelog:

v2:

- add new Patches 1-3 for the SPI and I2C frameworks
- use new SPI and I2C helpers to get rid of use of config macros
- move warning about undocumented compatible into driver

Michael Tretter (8):
  spi: stub device_spi_driver if SPI is disabled
  spi: add to_spi_device helper
  i2c: stub device_i2c_driver if I2C is disabled
  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 | 170 +++++++++++++++++++++++++-------------
 include/i2c/i2c.h         |   5 ++
 include/spi/spi.h         |  10 +++
 4 files changed, 130 insertions(+), 57 deletions(-)

-- 
2.30.2


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



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux