RE: SSD1306 OLED driver

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

 



Hi Maxime,

>
> On Fri, Nov 14, 2014 at 05:09:09PM +0530, Ssagarr Patil wrote:
>> Hi,
>>
>> I have the SSD1306 oled device connected via spi, will the same
>> driver work ? as the current one is based on i2c what all mods would
>> be required to have it working with SPI ?
>
> It won't work out of the box, but it should be fairly easy to support.
>
> You need to had support for SPI probing, and then provide some generic
> accessors the rest of the code can use to wrap around the i2c and spi
> calls.
>
I have done the spi probing stuff, now only stuck with changing this to SPI calls,

static int ssd1307fb_write_array(struct i2c_client *client,
                 struct ssd1307fb_array *array, u32 len)
{
    int ret;

    len += sizeof(struct ssd1307fb_array);

    ret = i2c_master_send(client, (u8 *)array, len);
    if (ret != len) {
        dev_err(&client->dev, "Couldn't send I2C command.\n");
        return ret;
    }

    return 0;
}

Any help on this would be appreciated!

Thanks,
Sagar
 		 	   		  --
To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Video for Linux]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Tourism]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux