From patchwork Sun Nov 15 13:36:43 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julian Scheel X-Patchwork-Id: 7619091 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 469CF9F1D3 for ; Sun, 15 Nov 2015 13:37:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6C2C02068D for ; Sun, 15 Nov 2015 13:37:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D324220575 for ; Sun, 15 Nov 2015 13:36:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751962AbbKONg5 (ORCPT ); Sun, 15 Nov 2015 08:36:57 -0500 Received: from sender163-mail.zoho.com ([74.201.84.163]:24345 "EHLO sender163-mail.zoho.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751959AbbKONg4 (ORCPT ); Sun, 15 Nov 2015 08:36:56 -0500 Received: from juli-workstation.adnet.avionic-design.de (x2f060b2.dyn.telefonica.de [2.240.96.178]) by mx.zohomail.com with SMTPS id 14475946144811003.6623438943456; Sun, 15 Nov 2015 05:36:54 -0800 (PST) From: Julian Scheel To: linux-fbdev@vger.kernel.org Cc: Julian Scheel Subject: [PATCH] fbdev: ssd1307fb: Fix chargepump setting Date: Sun, 15 Nov 2015 14:36:43 +0100 Message-Id: <1447594603-3243-1-git-send-email-julian@jusst.de> X-Mailer: git-send-email 2.6.2 X-ZohoMail: Ss SS_10 UW UB CHF_INT_SMD_EXT SGR4_1_19105_0 X-ZohoMail-Owner: <1447594603-3243-1-git-send-email-julian@jusst.de>+zmo_0_ X-ZohoMail-Sender: 2.240.96.178 X-Zoho-Virus-Status: 2 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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;