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

[PATCHv5 09/11] fbdev: ssd1307fb: Add module parameter to set the initial contrast

flat view

From: Thomas Niederprüm <hidden>
Date: 2015-03-24 21:21:26
Also in: lkml
Subsystem: framebuffer layer, the rest · Maintainers: Helge Deller, Linus Torvalds

This patch adds the module parameter "contrast" to determine the
contrast value that is used to initialize the display. This
setting applies to all instances of the driver.

Signed-off-by: Thomas Niederprüm <redacted>
---
 drivers/video/fbdev/ssd1307fb.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/video/fbdev/ssd1307fb.c b/drivers/video/fbdev/ssd1307fb.c
index 6149827..d5aec5c 100644
--- a/drivers/video/fbdev/ssd1307fb.c
+++ b/drivers/video/fbdev/ssd1307fb.c
@@ -43,6 +43,9 @@
 static u_int refreshrate = REFRESHRATE;
 module_param(refreshrate, uint, 0);
 
+static u_int contrast = 127;
+module_param(contrast, uint, S_IRUGO);
+
 struct ssd1307fb_par;
 
 struct ssd1307fb_deviceinfo {
@@ -525,7 +528,7 @@ static int ssd1307fb_probe(struct i2c_client *client,
 	par->com_lrremap = of_property_read_bool(node, "solomon,com-lrremap");
 	par->com_invdir = of_property_read_bool(node, "solomon,com-invdir");
 
-	par->contrast = 127;
+	par->contrast = contrast;
 	par->vcomh = par->device_info->default_vcomh;
 
 	/* Setup display timing */
-- 
2.3.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help