From patchwork Tue Dec 4 15:03:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TWljaGFsIFZva8OhxI0=?= X-Patchwork-Id: 10712059 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C5C0916B1 for ; Tue, 4 Dec 2018 15:04:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B94892BD0C for ; Tue, 4 Dec 2018 15:04:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ACC172BC1E; Tue, 4 Dec 2018 15:04:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FROM_EXCESS_BASE64,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 49AD02BC11 for ; Tue, 4 Dec 2018 15:04:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726710AbeLDPD4 (ORCPT ); Tue, 4 Dec 2018 10:03:56 -0500 Received: from mail-eopbgr30059.outbound.protection.outlook.com ([40.107.3.59]:2400 "EHLO EUR03-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726309AbeLDPD4 (ORCPT ); Tue, 4 Dec 2018 10:03:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ysoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Oiu8JNZFP8xtm6K2+PYF71XitJs/2avxO+1PcilNzRg=; b=D7FD3hN+MrDKMcCMh6yfhvdoufNQWlSS6i+a7x5KNp+EU/7N/fQN3OtoQpLsQDWLXW7Q7fGmEPtSEfnfTJ/a1kmo248vE+oSdHNYp/pSq3z0gECPNBMszwKPsbBjybIaRqPYsC+YBb4AGKQwxdPnVsar9c4aU3uSawu7l9oaOZo= Received: from DB7PR04MB4667.eurprd04.prod.outlook.com (52.135.139.13) by DB7PR04MB5963.eurprd04.prod.outlook.com (20.178.107.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1382.22; Tue, 4 Dec 2018 15:03:38 +0000 Received: from DB7PR04MB4667.eurprd04.prod.outlook.com ([fe80::2561:ec02:4e5e:f490]) by DB7PR04MB4667.eurprd04.prod.outlook.com ([fe80::2561:ec02:4e5e:f490%2]) with mapi id 15.20.1404.016; Tue, 4 Dec 2018 15:03:37 +0000 From: =?utf-8?b?Vm9rw6HEjSBNaWNoYWw=?= To: Rob Herring , Bartlomiej Zolnierkiewicz CC: Shawn Guo , Fabio Estevam , Alexandre Belloni , Maxime Ripard , "linux-fbdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "devicetree@vger.kernel.org" , =?utf-8?b?Vm9r?= =?utf-8?b?w6HEjSBNaWNoYWw=?= Subject: [PATCH 2/4] video: ssd1307fb: Do not hard code active-low reset sequence Thread-Topic: [PATCH 2/4] video: ssd1307fb: Do not hard code active-low reset sequence Thread-Index: AQHUi+KJ395FeYACCUmT9qboSgnbUQ== Date: Tue, 4 Dec 2018 15:03:37 +0000 Message-ID: <1543935806-94880-3-git-send-email-michal.vokac@ysoft.com> References: <1543935806-94880-1-git-send-email-michal.vokac@ysoft.com> In-Reply-To: <1543935806-94880-1-git-send-email-michal.vokac@ysoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: AM5PR0402CA0011.eurprd04.prod.outlook.com (2603:10a6:203:90::21) To DB7PR04MB4667.eurprd04.prod.outlook.com (2603:10a6:5:37::13) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Michal.Vokac@ysoft.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [89.24.100.190] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DB7PR04MB5963;6:L7wtF+SQONZGi3OBYRZ9Kgg2ZElKjBi34Is9a6Qw+JLtWhNe6DsUcAgc6VYHfc4zvqJoofGMbRn4+yZltoUznL86vAVWi9sGZuqysM1lN6hkA7VjbThpT1Hggj2nv83EWZHj5siOzfnhZeRPZ5lGAPI/wULJick+/ramoydoEi/+uIHKSdnToQkCEyjAeq4XSgkkxSGAo69Vq9P+mD0uZS0lyiYcKS+N8oE7sEyTgiCuyTG5qoID7OpNWJMuvmgBSA/at4jV2dng6kzu973cpsNMKB84/dtKbLZyPTReYtXyr+U74aRCPSdZUE64W3EorIy+ZYSbUQ6r70wwhzN4BI4vfVqOvkwLZ+cy91bOkBi+tr0w+ADc/fPjZLjfRnG2Zb6kCBbGOnHDevqbTJhYIectWsY6Dg1vyWya8iY/wX25k1PX/K8Pd9R+z9TRCsvQ21pqmhCmjq8soNRIYwPJ2A==;5:1uiXHxwU4xo9d/hAqROVkRo037mIliJ9ZW8Y/M4lOYRCNb0FMa8gyYkbN25f2PEijHOwyjlD1j/HWgZhBStxmcCmHPk3TM74fFl9YtZ86jrD8lZETHsuOjZ4BPm/ckaoL67SarUO/qRM8Gb4aFJZvHKGpX2ZtQVsRsYefWspeco=;7:VwUttV6Qow6VVEMWVCNkcMLuaKVE/m+RxJTDi4lM7J9ZIDVzaelSXzCJIS5e8OxDF2oLs5dtOR12r4YVy/ngaVt6H8svqMNbXoYITMSh7H4vnownS0IrUggBlh37BDINDK5TCDY1Ja/Kj8VDuad5Tg== x-ms-office365-filtering-correlation-id: beb0d9d2-9bcc-4409-eeff-08d659f9ab40 x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390098)(7020095)(4652040)(8989299)(5600074)(711020)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020);SRVR:DB7PR04MB5963; x-ms-traffictypediagnostic: DB7PR04MB5963: x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040522)(2401047)(8121501046)(5005006)(10201501046)(3002001)(3231455)(999002)(944501493)(52105112)(93006095)(93001095)(148016)(149066)(150057)(6041310)(20161123558120)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(201708071742011)(7699051)(76991095);SRVR:DB7PR04MB5963;BCL:0;PCL:0;RULEID:;SRVR:DB7PR04MB5963; x-forefront-prvs: 0876988AF0 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(366004)(39850400004)(136003)(396003)(346002)(376002)(199004)(189003)(72206003)(53936002)(478600001)(76176011)(6512007)(26005)(386003)(305945005)(186003)(4326008)(107886003)(7736002)(256004)(81156014)(66066001)(8936002)(71200400001)(14454004)(71190400001)(6506007)(81166006)(6486002)(5660300001)(11346002)(25786009)(99286004)(36756003)(2616005)(6436002)(446003)(316002)(68736007)(102836004)(105586002)(2906002)(110136005)(106356001)(54906003)(486006)(52116002)(6116002)(86362001)(3846002)(476003)(85182001)(8676002)(97736004);DIR:OUT;SFP:1101;SCL:1;SRVR:DB7PR04MB5963;H:DB7PR04MB4667.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: ysoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: Wrxw/WifOcEi/0TRppgrD9zOnNBEca6DakqEnZEOIursjuVUiAj2f7MuyZHIfB8TJxDQ45+yyTljAwINGbtf15nYDeSdQ+6FuCBpALIjx8OSOoUvHS4KdYkYXBANQ07B1aj0wJ3ut0Ggwz2gjAvDnhuwS6oa0RyzV3nK1bviLwqMxdL+n2/QV4O03xbOho4O7DSAkWFFRMU2CyiOtEDUT0PWnU+95qaXirGsQYE0wOqEuewwy/yQOTmbzhKq3+X1WwoOWtPq5GaRGHKBuAgdZXq/39iDXbZ1DAB5zrXpCPb1ofOghdgxkgWrabt61l3H9JNjQjSAtIzWJGJAOHh9H1WWfzngWKVprT8hECPyYmQ= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-ID: MIME-Version: 1.0 X-OriginatorOrg: ysoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: beb0d9d2-9bcc-4409-eeff-08d659f9ab40 X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Dec 2018 15:03:37.8923 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b5839965-430f-4be2-b282-d7a3149f2b37 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB5963 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The SSD130x OLED display reset signal is active low. Now the reset sequence is implemented in such a way that users are forced to define reset-gpios as GPIO_ACTIVE_HIGH in DT to make the reset work. Do not hard code the active-low sequence into the driver but instead allow the user to specify the gpio as GPIO_ACTIVE_LOW to reflect the real world. Signed-off-by: Michal Vokáč --- drivers/video/fbdev/ssd1307fb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/video/fbdev/ssd1307fb.c b/drivers/video/fbdev/ssd1307fb.c index 4061a20..3b361bc 100644 --- a/drivers/video/fbdev/ssd1307fb.c +++ b/drivers/video/fbdev/ssd1307fb.c @@ -667,10 +667,10 @@ static int ssd1307fb_probe(struct i2c_client *client, if (par->reset) { /* Reset the screen */ - gpiod_set_value_cansleep(par->reset, 0); - udelay(4); gpiod_set_value_cansleep(par->reset, 1); udelay(4); + gpiod_set_value_cansleep(par->reset, 0); + udelay(4); } if (par->vbat_reg) {