On Fri, Mar 20, 2015 at 10:12:54PM +0100, Thomas Niederprüm wrote:
quoted
quoted
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