This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

how to write I2c driver for display

I am writing display drivers for micro oled. board is dart4460 (omap4460) which provides dss(display subsystem). so I am writing drivers using dss.

but I dont know whether what I wrote is right

oled display use dpi interface and i2c for commands

I referred to pico dlp projector driver source which uses dpi and i2c.

here are datasheets


micro oled display:

I wrote I2C Slave driver source in panel source.

this is my source:

but I dont know If I should implement I2C master source in Board-xxx.c

plus, I want to know What Others should I implement in Board-xxx.c ???

I just added this structs in Board-xxx.c

static struct omap_dss_device svga050_device = {
.name           = "svga050",
.driver_name        = "svga050",
.type           = OMAP_DISPLAY_TYPE_DPI,
.phy.dpi.data_lines = 24,
.channel        = OMAP_DSS_CHANNEL_LCD2,
.platform_enable    = svga050_panel_enable_picodlp,
.platform_disable   = svga050_panel_disable_picodlp,
.data           = &svga050_pdata,

static struct omap_dss_device *svga050_dss_devices[] = {

static struct picodlp_panel_data sdp4430_picodlp_pdata = {
    .svga050_adapter_id = 2,

1) I want to know whether all of my code is right. Is there any source code that I should supplement ???

2) probe code in pico dlp projector driver, there is a part that get adapter id and get I2C adapter object.

when the ID is set? how can I select ID value??

3) If you know how to write display driver, I want to know how to write display init code by seeing oled display datasheet.

Thanks in advance