[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1427232238-21099-10-git-send-email-niederp@physik.uni-kl.de>
Date: Tue, 24 Mar 2015 22:23:56 +0100
From: Thomas Niederprüm <niederp@...sik.uni-kl.de>
To: plagnioj@...osoft.com, tomi.valkeinen@...com,
maxime.ripard@...e-electrons.com, kernel@...gutronix.de,
shawn.guo@...aro.org, robh+dt@...nel.org
Cc: linux-fbdev@...r.kernel.org, linux-kernel@...r.kernel.org,
Thomas Niederprüm <niederp@...sik.uni-kl.de>
Subject: [PATCHv5 09/11] fbdev: ssd1307fb: Add module parameter to set the initial contrast
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@...sik.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists