lkml.org 
[lkml]   [2015]   [Mar]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCHv4 04/10] fbdev: ssd1307fb: Unify init code and obtain hw specific bits from DT
On Fri, Mar 20, 2015 at 10:12:54PM +0100, Thomas Niederprüm wrote:
> > > static const struct of_device_id ssd1307fb_of_match[] = {
> > > {
> > > .compatible = "solomon,ssd1306fb-i2c",
> > > - .data = (void *)&ssd1307fb_ssd1306_ops,
> > > + .data = (void *)&ssd1307fb_ssd1306_deviceinfo,
> > > },
> > > {
> > > .compatible = "solomon,ssd1307fb-i2c",
> > > - .data = (void *)&ssd1307fb_ssd1307_ops,
> > > + .data = (void *)&ssd1307fb_ssd1307_deviceinfo,
> >
> > Do we need this ID? Wouldn't it make more sense to pass the pointer to
> > the struct we need to use?
>
> Are you talking about the device_id inside the struct
> ssd1307_deviceinfo?

Yes.

> I need the device_id to serve special needs of the individual
> controllers during initialization. For example the ssd1307 needs to
> set up the pwm in the init code.

Then you can add a bool in the structure to say whether it needs a PWM
or not.

Maxime

--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2015-03-24 17:41    [W:0.172 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site