From patchwork Thu Nov 12 14:07:37 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julian Scheel X-Patchwork-Id: 7602541 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 121939F1C2 for ; Thu, 12 Nov 2015 14:09:04 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 722A12077E for ; Thu, 12 Nov 2015 14:08:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E502820772 for ; Thu, 12 Nov 2015 14:08:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754460AbbKLOIA (ORCPT ); Thu, 12 Nov 2015 09:08:00 -0500 Received: from sender163-mail.zoho.com ([74.201.84.163]:24805 "EHLO sender163-mail.zoho.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754295AbbKLOH6 (ORCPT ); Thu, 12 Nov 2015 09:07:58 -0500 Received: from juli-workstation.adnet.avionic-design.de (x2f14492.dyn.telefonica.de [2.241.68.146]) by mx.zohomail.com with SMTPS id 1447337274868234.1631280324168; Thu, 12 Nov 2015 06:07:54 -0800 (PST) From: Julian Scheel To: linux-fbdev@vger.kernel.org Cc: Julian Scheel Subject: [PATCH] fbdev: ssd1307fb: Fix chargepump setting Date: Thu, 12 Nov 2015 15:07:37 +0100 Message-Id: <1447337257-31232-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: <1447337257-31232-1-git-send-email-julian@jusst.de>+zmo_0_ X-ZohoMail-Sender: 2.241.68.146 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.3 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;