* [PATCHv2] fbdev: ssd1307fb: Fix charge pump setting
@ 2016-03-24 21:14 Julian Scheel
0 siblings, 0 replies; 2+ messages in thread
From: Julian Scheel @ 2016-03-24 21:14 UTC (permalink / raw)
To: linux-fbdev
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>
---
Changes in v2:
- Simplify commit message
- Use BIT macros to increase readability
---
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..3b9ee0c 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);
+ BIT(4) | (par->device_info->need_chargepump ? BIT(2) : 0));
if (ret < 0)
return ret;
--
2.7.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCHv2] fbdev: ssd1307fb: Fix charge pump setting
@ 2016-05-10 10:30 Tomi Valkeinen
0 siblings, 0 replies; 2+ messages in thread
From: Tomi Valkeinen @ 2016-05-10 10:30 UTC (permalink / raw)
To: linux-fbdev
[-- Attachment #1.1: Type: text/plain, Size: 950 bytes --]
Hi,
On 24/03/16 23:14, Julian Scheel wrote:
> 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>
> ---
> Changes in v2:
> - Simplify commit message
> - Use BIT macros to increase readability
> ---
> 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..3b9ee0c 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);
> + BIT(4) | (par->device_info->need_chargepump ? BIT(2) : 0));
> if (ret < 0)
> return ret;
Thanks, queued for 4.7.
Tomi
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-05-10 10:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-10 10:30 [PATCHv2] fbdev: ssd1307fb: Fix charge pump setting Tomi Valkeinen
-- strict thread matches above, loose matches on Subject: below --
2016-03-24 21:14 Julian Scheel
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).