Thread (138 messages) 138 messages, 8 authors, 2015-05-27

Re: [PATCHv4 04/10] fbdev: ssd1307fb: Unify init code and obtain hw specific bits from DT

From: Maxime Ripard <hidden>
Date: 2015-03-24 16:16:21
Also in: lkml

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

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help