fbdev: ssd1307fb: Fix charge pump setting
authorJulian Scheel <julian@jusst.de>
Thu, 24 Mar 2016 21:14:23 +0000 (22:14 +0100)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Tue, 10 May 2016 10:29:36 +0000 (13:29 +0300)
Make sure bit 4 is set for the charge pump setting. It is required according
to SSD1306 App Note.

Signed-off-by: Julian Scheel <julian@jusst.de>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/video/fbdev/ssd1307fb.c

index fa3480815cdb61dadec19f15772523c6eaf35cbd..21dafe53ca492421fd6fe747e32ab3f7aa643dbd 100644 (file)
@@ -389,7 +389,7 @@ static int ssd1307fb_init(struct ssd1307fb_par *par)
                return ret;
 
        ret = ssd1307fb_write_cmd(par->client,
-               (par->device_info->need_chargepump & 0x1 << 2) & 0x14);
+               BIT(4) | (par->device_info->need_chargepump ? BIT(2) : 0));
        if (ret < 0)
                return ret;