From: "maxime.ripard@free-electrons.com" <maxime.ripard@free-electrons.com>
To: linux-fbdev@vger.kernel.org
Subject: Re: SSD1306 OLED driver
Date: Mon, 05 Jan 2015 13:47:36 +0000 [thread overview]
Message-ID: <20150105134736.GA32429@lukather> (raw)
In-Reply-To: <BAY176-W246A4D5C3A23D1928FC5D3D38C0@phx.gbl>
[-- Attachment #1: Type: text/plain, Size: 1484 bytes --]
On Mon, Jan 05, 2015 at 04:33:22PM +0530, Ssagarr Patil wrote:
> 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!
I'm not sure what help you are expecting.
This is a simple function that takes an array and sends it over I2C.
It's probably even easier with SPI. Have you considered reading
include/spi/spi.h?
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2015-01-05 13:47 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-14 11:51 SSD1306 OLED driver Ssagarr Patil
2014-11-16 9:50 ` maxime.ripard
2014-11-18 14:59 ` Ssagarr Patil
2014-11-18 15:20 ` maxime.ripard
2015-01-05 11:15 ` Ssagarr Patil
2015-01-05 13:47 ` maxime.ripard [this message]
2015-01-06 13:12 ` Ssagarr Patil
2015-01-08 9:33 ` maxime.ripard
2015-01-08 18:26 ` Ssagarr Patil
2015-01-09 10:27 ` Ssagarr Patil
2015-01-09 11:03 ` maxime.ripard
2015-01-09 12:55 ` Ssagarr Patil
2015-01-09 13:58 ` Geert Uytterhoeven
2015-01-09 22:23 ` maxime.ripard
2015-01-09 22:31 ` maxime.ripard
2015-01-10 0:03 ` Noralf Tronnes
2015-01-10 12:46 ` Ssagarr Patil
2015-01-10 13:50 ` Noralf Tronnes
2015-01-10 21:19 ` Ssagarr Patil
2015-01-11 14:20 ` Noralf Tronnes
2015-01-12 9:56 ` Ssagarr Patil
2015-01-12 14:30 ` Noralf Tronnes
2015-01-13 13:45 ` Ssagarr Patil
2015-01-14 13:51 ` Ssagarr Patil
2015-01-14 15:27 ` Geert Uytterhoeven
2015-01-14 16:17 ` Ssagarr Patil
2015-01-14 16:38 ` Ssagarr Patil
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150105134736.GA32429@lukather \
--to=maxime.ripard@free-electrons.com \
--cc=linux-fbdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.