linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Julian Scheel <julian@jusst.de>
To: linux-fbdev@vger.kernel.org
Subject: [PATCH] fbdev: ssd1307fb: Fix chargepump setting
Date: Thu, 12 Nov 2015 14:07:37 +0000	[thread overview]
Message-ID: <1447337257-31232-1-git-send-email-julian@jusst.de> (raw)

The charge pump setting must have bit D4 set all time according to the SSD1306
App Note. Instead of doing an logical and off shifted setting bit with 0x14 it
must be an logical or with 0x10 to ensure D4 is set.

Signed-off-by: Julian Scheel <julian@jusst.de>
---
 drivers/video/fbdev/ssd1307fb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/video/fbdev/ssd1307fb.c b/drivers/video/fbdev/ssd1307fb.c
index 1611215..5965a9b 100644
--- a/drivers/video/fbdev/ssd1307fb.c
+++ b/drivers/video/fbdev/ssd1307fb.c
@@ -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);
+		0x10 | ((par->device_info->need_chargepump & 0x01) << 2));
 	if (ret < 0)
 		return ret;
 
-- 
2.6.2



             reply	other threads:[~2015-11-12 14:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-12 14:07 Julian Scheel [this message]
2015-11-15 13:36 ` [PATCH] fbdev: ssd1307fb: Fix chargepump setting Julian Scheel
2016-01-18 20:20 ` Julian Scheel
2016-01-29 11:55 ` Tomi Valkeinen
2016-01-29 12:00 ` Julian Scheel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1447337257-31232-1-git-send-email-julian@jusst.de \
    --to=julian@jusst.de \
    --cc=linux-fbdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).