From: Kai Ruhnau <kai.ruhnau@target-sg.com>
To: linux-fbdev@vger.kernel.org
Subject: [PATCH] fbdev: ssd1307fb: Fix activating the charge pump on ssd1306
Date: Mon, 01 Feb 2016 15:03:59 +0000 [thread overview]
Message-ID: <1454339039-4976-1-git-send-email-kai.ruhnau@target-sg.com> (raw)
The charge pump is activated by sending 0x14 where the higher bit is
always 1 and the lower bit actually toggles it.
Signed-off-by: Kai Ruhnau <kai.ruhnau@target-sg.com>
---
drivers/video/fbdev/ssd1307fb.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/video/fbdev/ssd1307fb.c b/drivers/video/fbdev/ssd1307fb.c
index fa34808..20d249f 100644
--- a/drivers/video/fbdev/ssd1307fb.c
+++ b/drivers/video/fbdev/ssd1307fb.c
@@ -285,7 +285,7 @@ static void ssd1307fb_deferred_io(struct fb_info *info,
static int ssd1307fb_init(struct ssd1307fb_par *par)
{
int ret;
- u32 precharge, dclk, com_invdir, compins;
+ u32 precharge, dclk, com_invdir, compins, chargepump;
if (par->device_info->need_pwm) {
par->pwm = pwm_get(&par->client->dev, NULL);
@@ -388,8 +388,8 @@ static int ssd1307fb_init(struct ssd1307fb_par *par)
if (ret < 0)
return ret;
- ret = ssd1307fb_write_cmd(par->client,
- (par->device_info->need_chargepump & 0x1 << 2) & 0x14);
+ chargepump = 0x10 | (par->device_info->need_chargepump & 0x1) << 2;
+ ret = ssd1307fb_write_cmd(par->client, chargepump);
if (ret < 0)
return ret;
--
2.4.3
--
Kai Ruhnau
Software Manager
T:+49 202 769302 19
Target Systemelektronik GmbH & Co. KG
Heinz-Fangman-Straße 4
42287 Wuppertal
Amtsgericht Wuppertal HRA 23898
Persönlich haftende Gesellschafterin
Target Systemelektronik Beteiligungs GmbH
Heinz-Fangman-Straße 4, 42287 Wuppertal
Amtsgericht Wuppertal HRB 25346
Geschäftsführer: Jürgen Stein
--
next reply other threads:[~2016-02-01 15:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-01 15:03 Kai Ruhnau [this message]
2016-02-02 8:43 ` [PATCH] fbdev: ssd1307fb: Fix activating the charge pump on ssd1306 Kai Ruhnau
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=1454339039-4976-1-git-send-email-kai.ruhnau@target-sg.com \
--to=kai.ruhnau@target-sg.com \
--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