| From | Thomas Niederprüm <> | Subject | [PATCHv5 09/11] fbdev: ssd1307fb: Add module parameter to set the initial contrast | Date | Tue, 24 Mar 2015 22:23:56 +0100 |
| |
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 <niederp@physik.uni-kl.de> --- 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
|