}
static const struct of_device_id ssd130x_of_match[] = {
+ /* ssd130x family */
{
.compatible = "sinowealth,sh1106",
.data = &ssd130x_variants[SH1106_ID],
}
static const struct of_device_id ssd130x_of_match[] = {
+ /* ssd130x family */
{
.compatible = "sinowealth,sh1106",
.data = &ssd130x_variants[SH1106_ID],
* not be needed for this driver to match the registered SPI devices.
*/
static const struct spi_device_id ssd130x_spi_table[] = {
+ /* ssd130x family */
{ "sh1106", SH1106_ID },
{ "ssd1305", SSD1305_ID },
{ "ssd1306", SSD1306_ID },
.default_width = 132,
.default_height = 64,
.page_mode_only = 1,
+ .family_id = SSD130X_FAMILY,
},
[SSD1305_ID] = {
.default_vcomh = 0x34,
.default_dclk_frq = 7,
.default_width = 132,
.default_height = 64,
+ .family_id = SSD130X_FAMILY,
},
[SSD1306_ID] = {
.default_vcomh = 0x20,
.need_chargepump = 1,
.default_width = 128,
.default_height = 64,
+ .family_id = SSD130X_FAMILY,
},
[SSD1307_ID] = {
.default_vcomh = 0x20,
.need_pwm = 1,
.default_width = 128,
.default_height = 39,
+ .family_id = SSD130X_FAMILY,
},
[SSD1309_ID] = {
.default_vcomh = 0x34,
.default_dclk_frq = 10,
.default_width = 128,
.default_height = 64,
+ .family_id = SSD130X_FAMILY,
}
};
EXPORT_SYMBOL_NS_GPL(ssd130x_variants, DRM_SSD130X);
#define SSD130X_DATA 0x40
#define SSD130X_COMMAND 0x80
+enum ssd130x_family_ids {
+ SSD130X_FAMILY
+};
+
enum ssd130x_variants {
+ /* ssd130x family */
SH1106_ID,
SSD1305_ID,
SSD1306_ID,
bool need_pwm;
bool need_chargepump;
bool page_mode_only;
+
+ enum ssd130x_family_ids family_id;
};
struct ssd130x_device {