From patchwork Thu Mar 24 21:14:23 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julian Scheel X-Patchwork-Id: 8664891 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C0542C0553 for ; Thu, 24 Mar 2016 21:21:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EFAD22034F for ; Thu, 24 Mar 2016 21:21:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9208320220 for ; Thu, 24 Mar 2016 21:21:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751499AbcCXVV2 (ORCPT ); Thu, 24 Mar 2016 17:21:28 -0400 Received: from jusst.de ([188.40.114.84]:43730 "EHLO web01.jusst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751181AbcCXVV2 (ORCPT ); Thu, 24 Mar 2016 17:21:28 -0400 X-Greylist: delayed 418 seconds by postgrey-1.27 at vger.kernel.org; Thu, 24 Mar 2016 17:21:28 EDT Received: from localhost (localhost [127.0.0.1]) by web01.jusst.de (Postfix) with ESMTP id A63771B032A8; Thu, 24 Mar 2016 22:14:27 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at web01.jusst.de Received: from web01.jusst.de ([127.0.0.1]) by localhost (web01.jusst.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RdRXY07fnW2u; Thu, 24 Mar 2016 22:14:27 +0100 (CET) Received: from julian-workstation.adnet.avionic-design.de (x2f08de8.dyn.telefonica.de [2.240.141.232]) (Authenticated sender: julian@jusst.de) by web01.jusst.de (Postfix) with ESMTPSA id 1A3A71B032A7; Thu, 24 Mar 2016 22:14:27 +0100 (CET) From: Julian Scheel To: tomi.valkeinen@ti.com, linux-fbdev@vger.kernel.org, plagnioj@jcrosoft.com, niederp@physik.uni-kl.de Cc: Julian Scheel Subject: [PATCHv2] fbdev: ssd1307fb: Fix charge pump setting Date: Thu, 24 Mar 2016 22:14:23 +0100 Message-Id: <1458854063-9118-1-git-send-email-julian@jusst.de> X-Mailer: git-send-email 2.7.0 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_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 Make sure bit 4 is set for the charge pump setting. It is required according to SSD1306 App Note. Signed-off-by: Julian Scheel --- 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;