From patchwork Thu Dec 20 12:13:54 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: 10738801 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 2240B17E1 for ; Thu, 20 Dec 2018 12:14:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 13091287DA for ; Thu, 20 Dec 2018 12:14:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 07554287DC; Thu, 20 Dec 2018 12:14:29 +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 9990A287DB for ; Thu, 20 Dec 2018 12:14:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731650AbeLTMOF (ORCPT ); Thu, 20 Dec 2018 07:14:05 -0500 Received: from mail-eopbgr80049.outbound.protection.outlook.com ([40.107.8.49]:17074 "EHLO EUR04-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731324AbeLTMOD (ORCPT ); Thu, 20 Dec 2018 07:14:03 -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=EjIGa+qa+xTJtKyg4i4ZRL86qBux8aDN6IsCNEVpU1o=; b=waTgAtjXL/hxXaWp9T04Vo0Oo+n46SRN8d0hLTIvoVlnapd8obrwvxoB8r75pEeIsKBlZWtiCjlqf71l3Ln1RpCoVurdPE8ASsboAtPtLNU2FzyGjOlq/hucLrrO6T6clUmxbk/fVHM6q8y7q6p1S6IUURK8xPe7FS+AIjiyjTs= Received: from DB7PR04MB4667.eurprd04.prod.outlook.com (52.135.139.13) by DB7PR04MB4459.eurprd04.prod.outlook.com (52.135.137.161) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1404.19; Thu, 20 Dec 2018 12:13:56 +0000 Received: from DB7PR04MB4667.eurprd04.prod.outlook.com ([fe80::2561:ec02:4e5e:f490]) by DB7PR04MB4667.eurprd04.prod.outlook.com ([fe80::2561:ec02:4e5e:f490%3]) with mapi id 15.20.1446.020; Thu, 20 Dec 2018 12:13:56 +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 v2 1/4] dt-bindings: display: ssd1307fb: Remove reset-active-low from examples Thread-Topic: [PATCH v2 1/4] dt-bindings: display: ssd1307fb: Remove reset-active-low from examples Thread-Index: AQHUmF15CPCATSnSS0yYPT2YZUdoGw== Date: Thu, 20 Dec 2018 12:13:54 +0000 Message-ID: <1545308005-51559-2-git-send-email-michal.vokac@ysoft.com> References: <1545308005-51559-1-git-send-email-michal.vokac@ysoft.com> In-Reply-To: <1545308005-51559-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: AM5PR0701CA0015.eurprd07.prod.outlook.com (2603:10a6:203:51::25) 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;DB7PR04MB4459;6:JXYWgXDcy9DiNKVoS7V/p1jPipN6+9938Uh/bm/YOvI4G/LfKK+Mooc8uCUuFFZUR/3sWinr489GxazEV1YBH3drxREJBrw2vpZWL5OisgP/UIyImSiUvCeJGl2o3OKat1TnDyGZEZpiUcdh08arZHeaLEJokl+WaaIOE2M8fLyNoQ9aQrgV0w2TPTG2NZPW5V0uI43Jc4eyC14FLpj+92AqEDhGQbanZ5NAlJrxG1w8729ehLkJA+2Rhss8HVUicT1atphcBttl+NBIMeGmeAybV9pgb5T+D+8JODwAdLd0r8pBfb1Zxy1QrR2my5Qqy2CURdfvbfU31o8rfQUtFTMFo/cfwZCbJdHR7TvMrEK+6LtuMRVSvoroR6SyDmshhVM/VFGgNJBpbXS967MDse24G741nrwfn0I/m79PeB1EYqvsegji7l0hKuCq0BTii7PqXuJFKOHBqhKPh13WkA==;5:QJ3X4cl8frzxm41DVT6224jHCwovzcl0Lah9PfF1+cZt+R1666pIbiULMsQ0cU+qgmkkd0kvVNGxnMvNENkk4cvOAlIllG+RU/kS6mkWrZBEqBALFhH6iys6+ZtLJZc3hRrTHfzF7FpJSl6hSdlSza9eu6otj4+/w58OV9Oxht8=;7:i3zuw0T7ebcgVqtlWgZD234eQgX7MfOC/CnPxxJv879qUvILXi3DgeD64XrPy030vsjjYeDEU9PSMrXC5v2xlUyO0V0pdJAf07Tu2+InQj+xkrQYeIVGBN2/j5LBYRu3WTgn0aRCZsnDFmf3u34DLQ== x-ms-office365-filtering-correlation-id: 3191daa3-fad3-428d-d7dc-08d666749c0c x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(4534185)(4627221)(201703031133081)(201702281549075)(5600074)(711020)(2017052603328)(7153060)(7193020);SRVR:DB7PR04MB4459; x-ms-traffictypediagnostic: DB7PR04MB4459: x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(3230021)(999002)(5005026)(6040522)(2401047)(8121501046)(93006095)(93001095)(3231475)(944501520)(52105112)(10201501046)(3002001)(149066)(150057)(6041310)(20161123560045)(20161123562045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(201708071742011)(7699051)(76991095);SRVR:DB7PR04MB4459;BCL:0;PCL:0;RULEID:;SRVR:DB7PR04MB4459; x-forefront-prvs: 0892FA9A88 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(136003)(396003)(346002)(366004)(39850400004)(376002)(189003)(199004)(11346002)(86362001)(446003)(71190400001)(6436002)(5660300001)(53936002)(6512007)(186003)(102836004)(26005)(386003)(6506007)(85182001)(66066001)(478600001)(105586002)(71200400001)(36756003)(7736002)(4326008)(76176011)(97736004)(6486002)(2616005)(486006)(476003)(68736007)(52116002)(305945005)(8676002)(8936002)(99286004)(106356001)(6116002)(3846002)(110136005)(107886003)(2906002)(256004)(316002)(81166006)(81156014)(54906003)(25786009)(14454004)(72206003);DIR:OUT;SFP:1101;SCL:1;SRVR:DB7PR04MB4459;H:DB7PR04MB4667.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: ysoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: e10OO9x4Aoc9nMPPq8YEmXXEqYikkiygITj1IBMY/eSKg5eO2BsLtHrpVi/CKgt8H/1L/L7iXHvM7bm80Gf4D0HSVGPdHJ3AXzYFWMYNySXz3BWjptHRGE5MUVkxd10AEzjLmmOYqjETgO5SZIXBKEAY3viTRpTzPxbNB2hmLhh0kTydUA/pneiaqwAtLwaDhjQyqhOLnw6rg1kDpCnPL+K5hZRfaC3o8w6tV7bG+2YddvawOTqKZxpLResVIrtLztQs+m5ibfXXjZjBwMmEFRxjgCO7TdUJHWv2igO/SStclI8PGj62gvICP9DZ0BtgsUyq3416nN+EaaMSAEgoMwlvXLtCg5wdoIHWVNFiou8= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-ID: MIME-Version: 1.0 X-OriginatorOrg: ysoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3191daa3-fad3-428d-d7dc-08d666749c0c X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Dec 2018 12:13:54.5144 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b5839965-430f-4be2-b282-d7a3149f2b37 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB4459 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 reset-active-low property has been removed brom the binding a while ago. So remove it from the examples as well. Fixes: 519b4db ("fbdev: ssd1307fb: Remove reset-active-low from the DT binding document") Reviewed-by: Rob Herring Signed-off-by: Michal Vokáč Reviewed-by: Alexandre Belloni --- Changes from v1: - Add R-by from Rob Documentation/devicetree/bindings/display/ssd1307fb.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/Documentation/devicetree/bindings/display/ssd1307fb.txt b/Documentation/devicetree/bindings/display/ssd1307fb.txt index 209d931..b67f8ca 100644 --- a/Documentation/devicetree/bindings/display/ssd1307fb.txt +++ b/Documentation/devicetree/bindings/display/ssd1307fb.txt @@ -36,7 +36,6 @@ ssd1307: oled@3c { reg = <0x3c>; pwms = <&pwm 4 3000>; reset-gpios = <&gpio2 7>; - reset-active-low; }; ssd1306: oled@3c { @@ -44,7 +43,6 @@ ssd1306: oled@3c { reg = <0x3c>; pwms = <&pwm 4 3000>; reset-gpios = <&gpio2 7>; - reset-active-low; solomon,com-lrremap; solomon,com-invdir; solomon,com-offset = <32>; From patchwork Thu Dec 20 12:13:55 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: 10738797 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 D728E6C2 for ; Thu, 20 Dec 2018 12:14:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C7355287DB for ; Thu, 20 Dec 2018 12:14:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BB139287DE; Thu, 20 Dec 2018 12:14:23 +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 65C4A287DB for ; Thu, 20 Dec 2018 12:14:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730392AbeLTMOQ (ORCPT ); Thu, 20 Dec 2018 07:14:16 -0500 Received: from mail-eopbgr80049.outbound.protection.outlook.com ([40.107.8.49]:17074 "EHLO EUR04-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731646AbeLTMOG (ORCPT ); Thu, 20 Dec 2018 07:14:06 -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=4npooQ5gk7pmesT5Z5877t9kFKx+egz+i7UbUFatCqg=; b=CzgsCMxRDaQAW86AbGW3Oo+/kfk3KW7X8tBL8P6pJABatLWgn2aum6kjrJ7JgXa3NYxbsGieSrSiQ3EOLRGSyUiS8bGKKy5uraGYBK92gvi2/3/x/XLh069GMa5FYpsgv+OK0hW2cV/yIJIYKdaf+MWax61wgbeLUArV8xhp4hM= Received: from DB7PR04MB4667.eurprd04.prod.outlook.com (52.135.139.13) by DB7PR04MB4459.eurprd04.prod.outlook.com (52.135.137.161) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1404.19; Thu, 20 Dec 2018 12:13:58 +0000 Received: from DB7PR04MB4667.eurprd04.prod.outlook.com ([fe80::2561:ec02:4e5e:f490]) by DB7PR04MB4667.eurprd04.prod.outlook.com ([fe80::2561:ec02:4e5e:f490%3]) with mapi id 15.20.1446.020; Thu, 20 Dec 2018 12:13:58 +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 v2 2/4] video: ssd1307fb: Do not hard code active-low reset sequence Thread-Topic: [PATCH v2 2/4] video: ssd1307fb: Do not hard code active-low reset sequence Thread-Index: AQHUmF168kKI5FRVIkC3wDG9Rm7srQ== Date: Thu, 20 Dec 2018 12:13:55 +0000 Message-ID: <1545308005-51559-3-git-send-email-michal.vokac@ysoft.com> References: <1545308005-51559-1-git-send-email-michal.vokac@ysoft.com> In-Reply-To: <1545308005-51559-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: AM5PR0701CA0015.eurprd07.prod.outlook.com (2603:10a6:203:51::25) 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;DB7PR04MB4459;6:02zt2fPjDMUvcqE7T6z+VeVaB11FKdwrbBZ9WemM74Of6sijRprAsfOkBQEF7nt3AWAfEfCEsQ0fFp0+0hZFGpwFRZU2Q0o34wz7OuYFuvk2R3Y27jbXrvS8CNAzPaJ/Xhs1qVlofpYw+U0Ut8LVYFDrDfG48x4yzU5n6Km4Pf+YpNA/V1xmPt2wY2onBz1pcMJQoLMFaJZ6L90+MowOTxUZYK8idpf7N/rXEVwifGYqdcQtq+2lms481s7Nnnm6CtRpoTG0C+b5PhADOrfeNx2evWHnbNCpaEqCRxt7TKmFMMKrzKu008tjS/wavZtSB8ulqUlYbaE0jXF/73DbPBLdsH2ZNTOspG2OjZdW86ZIoe/slykqLYD2i3pU/lJdziV3MeP01nPB+8Uo8lu4es1bhXcK1hUHsXYTyVtfnhcliQ+wEVmdcZ7YH7XnusJ3oSLtcZkT2miveCU7Y2rBlg==;5:JDvA3HJnR3Z7lruewCYylfoMJP73HwuYW2uTlXHbYX6It/nSGtBG3zvqgqZI7bTEi3PtWRpKoRhVdTCHOH7QnbmoULuFQB60uucN4Pl6etVTrU36SYyvz18kaGrdb8I1o7m9cn9FbkxlR3pcakmsZKIm9R5R0sHYmEBHL7zsNxo=;7:np7m6/Ng/1CkoVY/ij9nUcRmwmDdU7qIMdSWObjMRKSjpWYJg8UC2T1G93HkQz0FPqB2oqj4RsnnBX92/dhEBpIdOmh90xCuway9UXt1u038lMX9Or/Zkwikg1dGQSQiEF8GoJcqNmmLzy+c5DIf9w== x-ms-office365-filtering-correlation-id: 28447fda-467a-4cdc-c2e9-08d666749cba x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(4534185)(4627221)(201703031133081)(201702281549075)(5600074)(711020)(2017052603328)(7153060)(7193020);SRVR:DB7PR04MB4459; x-ms-traffictypediagnostic: DB7PR04MB4459: x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(3230021)(999002)(5005026)(6040522)(2401047)(8121501046)(93006095)(93001095)(3231475)(944501520)(52105112)(10201501046)(3002001)(149066)(150057)(6041310)(20161123560045)(20161123562045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(201708071742011)(7699051)(76991095);SRVR:DB7PR04MB4459;BCL:0;PCL:0;RULEID:;SRVR:DB7PR04MB4459; x-forefront-prvs: 0892FA9A88 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(136003)(396003)(346002)(366004)(39850400004)(376002)(189003)(199004)(11346002)(86362001)(446003)(71190400001)(6436002)(5660300001)(53936002)(6512007)(186003)(102836004)(26005)(386003)(6506007)(85182001)(66066001)(478600001)(105586002)(71200400001)(36756003)(7736002)(4326008)(76176011)(97736004)(6486002)(2616005)(486006)(476003)(68736007)(52116002)(305945005)(8676002)(8936002)(99286004)(106356001)(6116002)(3846002)(110136005)(107886003)(2906002)(256004)(316002)(81166006)(81156014)(54906003)(25786009)(6666004)(14454004)(72206003);DIR:OUT;SFP:1101;SCL:1;SRVR:DB7PR04MB4459;H:DB7PR04MB4667.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: ysoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: VBiR6mp0AjVvoEIYhornsk0ico+7Yi2+i48ETNjG+LM1L6xTZqgoyjbYW+8YaZw227ovXwhaKSmyQ7iOIaMJ5SlEUWrZZO18OsOWO4vWC9kV2slP/SyZu0YywCPl9yRJ2Q8nSgDkQw1jIJLWU2AG7GPIy9jJSns4x1/Srt3B7A1isSXMVrI3N+oARbpNYdBtCAfHTb6vF1hJcue8rtu53TsaLuBf1DjYvW2KK55LxQj2sVBnYn66QHtXET5YE5MhPOd0UeVrqptdnvTDu20WEstbQ+5uHzNiZYgCC0ZkJ8MnJv755Kf+yVoLyjoGXHMsA5gThmKL39qc5wyAcVZZFDI9GUh7r8Y6Lr/t6w8kRzI= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-ID: <08F1D6373BC021469D0A985A8791D70E@eurprd04.prod.outlook.com> MIME-Version: 1.0 X-OriginatorOrg: ysoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 28447fda-467a-4cdc-c2e9-08d666749cba X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Dec 2018 12:13:55.3540 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b5839965-430f-4be2-b282-d7a3149f2b37 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB4459 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. Reviewed-by: Rob Herring Signed-off-by: Michal Vokáč Reviewed-by: Alexandre Belloni --- Changes from v1: - Add R-by from Rob 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) { From patchwork Thu Dec 20 12:13:56 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: 10738799 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 DC00C14E2 for ; Thu, 20 Dec 2018 12:14:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CA4EE287DA for ; Thu, 20 Dec 2018 12:14:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BE9A5287DE; Thu, 20 Dec 2018 12:14:28 +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 5CCD9287DA for ; Thu, 20 Dec 2018 12:14:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731695AbeLTMOF (ORCPT ); Thu, 20 Dec 2018 07:14:05 -0500 Received: from mail-eopbgr80040.outbound.protection.outlook.com ([40.107.8.40]:27280 "EHLO EUR04-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730229AbeLTMOC (ORCPT ); Thu, 20 Dec 2018 07:14:02 -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=ds/i01Shbd2+mLJZpBWmXmb+7qnXp0HJ0ZKhnvjYqis=; b=zV+pbYvfGAg1L8N4gbK0H60+wMpS4Del5Q8sDZQWBr/ZH0cY1+n8vX3Y9lxZRrIP/NJGTIN7vTZpXyBz8fFS05TN+I0tXoFefD2S7Q3jiebQcZW49+NOQ73w/mxkhqaPexDrZsTcr/1t53vHvOBaPnRm/U1zObt1oITbUYfdAb8= Received: from DB7PR04MB4667.eurprd04.prod.outlook.com (52.135.139.13) by DB7PR04MB4555.eurprd04.prod.outlook.com (52.135.138.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1425.19; Thu, 20 Dec 2018 12:13:59 +0000 Received: from DB7PR04MB4667.eurprd04.prod.outlook.com ([fe80::2561:ec02:4e5e:f490]) by DB7PR04MB4667.eurprd04.prod.outlook.com ([fe80::2561:ec02:4e5e:f490%3]) with mapi id 15.20.1446.020; Thu, 20 Dec 2018 12:13:59 +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 v2 3/4] ARM: dts: imx28-cfa10036: Fix the reset gpio signal polarity Thread-Topic: [PATCH v2 3/4] ARM: dts: imx28-cfa10036: Fix the reset gpio signal polarity Thread-Index: AQHUmF16OKwH2/RaskKVLrwUwh2wfQ== Date: Thu, 20 Dec 2018 12:13:56 +0000 Message-ID: <1545308005-51559-4-git-send-email-michal.vokac@ysoft.com> References: <1545308005-51559-1-git-send-email-michal.vokac@ysoft.com> In-Reply-To: <1545308005-51559-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: AM5PR0701CA0015.eurprd07.prod.outlook.com (2603:10a6:203:51::25) 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;DB7PR04MB4555;6:PVXmt/HvCdUf/5eb97wyjC76Wa1ouYmM0NvqCh2MDn4qWjFg+GXVplRuSLDljQgpR0g6pcCPk+Mj2PIAIydnvC8K/9Qp/L+P7AFoD/rNGK4si9b/KleuO4wtZRZzjnP/T8zOnzfL5LquwTSX3gwwulFVBNm9QcYEh/aWU18YUOHgnt1JstEuTXnyKFefhM6LVc2SAXYUZEJG7ttrx22Oqvd708a0M+Lvt/bZ5t2dTkEHJpB9qk7gYwuHiRWk7KQ8YmYaJlHgGnm5MT/J8urI9okRtUT1JmRn3ZIkEtivD5hKermUPiWrOWYfBVReRATJgezBpUHEQsQEp+w5f/Lnq3BPSho/DRs1rnqSaLZR/VSq/G3nLIlgXdeudTx/6LpjSMLUJYdxFB2NBNQO5YkE7y4q6PPYo7nwiUml95VLrX7V9WhPeTWSeUna8TnxPQcJxHAySCKcF7jvPCkGYqWH/w==;5:XaQnsJxBfCpZIhsbgyGicqUpH0Dn9QtyrPLFjB+SDl/gIJd4GfhlRq2DQng9bATLwXaRR+guknP0fPDmytgs8V2CYo/Tqw9AuQdhMv6TsA6y8F8npHdNAm7d1MhUlr7S6GibhoHvT/WVQJqY7pXoLb6oYk+SkaZmg1yyISjusk4=;7:y0Rd6wBq9Ynfw3Wwz8z7XMQtB+MWMCqxRPoPLTFvlfHvmEtJPFt8aicUHbVK+l1HhhQPvE2iSqj/hYzf2ns1WPAiVtr1pPgp1rfu4ZR6h2vT2AqADIpI0PpRjmt2cvw4Q0HYi9g7x03mJtOMP5RBDg== x-ms-office365-filtering-correlation-id: 1b91ee92-1740-46ae-0625-08d666749d3b x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(4534185)(4627221)(201703031133081)(201702281549075)(5600074)(711020)(2017052603328)(7153060)(7193020);SRVR:DB7PR04MB4555; x-ms-traffictypediagnostic: DB7PR04MB4555: x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(3230021)(999002)(5005026)(6040522)(2401047)(8121501046)(3231475)(944501520)(52105112)(93006095)(93001095)(3002001)(10201501046)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123564045)(20161123558120)(201708071742011)(7699051)(76991095);SRVR:DB7PR04MB4555;BCL:0;PCL:0;RULEID:;SRVR:DB7PR04MB4555; x-forefront-prvs: 0892FA9A88 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(136003)(346002)(39850400004)(376002)(366004)(396003)(199004)(189003)(99286004)(305945005)(7736002)(102836004)(14454004)(66066001)(110136005)(72206003)(478600001)(8676002)(81166006)(6486002)(8936002)(71200400001)(71190400001)(81156014)(76176011)(446003)(6436002)(476003)(386003)(6506007)(2616005)(486006)(11346002)(86362001)(68736007)(54906003)(5660300001)(85182001)(53936002)(36756003)(107886003)(6116002)(3846002)(256004)(14444005)(106356001)(52116002)(105586002)(25786009)(6666004)(26005)(2906002)(316002)(6512007)(4326008)(186003)(97736004);DIR:OUT;SFP:1101;SCL:1;SRVR:DB7PR04MB4555;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: +X5Q4x1n0p7p4pJYWlOmkFCCn0/v7DtkbU9VxaVtSIzGeJm6lxrYJBhS6vX7svqBnzt71osDCS3CwySNQObk2FaPHaV+2pdEDA8JB+a++6AGmTjT++L2QK2Gu1tLZirsGyPTVtd3zjTVVB5Q5RseylI2bSABzPs5PvdvOCfUBKFn7OXDqQvMiW/3wQXiYIKss/GNYwue9ypQ0yPmEQwJxZx5K13EHJB/3lCqCoG/YXikVSQqw5Ez5wxM/HL+LlI5plYISYrZ3JvcpVfzdvzG0SAXC4G6RNhYf60XPEmuMf7N8Ak2FtDNuk5+6RvVMW6/ spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-ID: MIME-Version: 1.0 X-OriginatorOrg: ysoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1b91ee92-1740-46ae-0625-08d666749d3b X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Dec 2018 12:13:56.2376 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b5839965-430f-4be2-b282-d7a3149f2b37 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB4555 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 reset signal of the SSD1306 OLED display is actually active-low. Adapt the DT to reflect the real world. Reviewed-by: Rob Herring Signed-off-by: Michal Vokáč Acked-by: Alexandre Belloni --- Changes from v1: - Add R-by from Rob arch/arm/boot/dts/imx28-cfa10036.dts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/imx28-cfa10036.dts b/arch/arm/boot/dts/imx28-cfa10036.dts index 8337ca2..d6eca31 100644 --- a/arch/arm/boot/dts/imx28-cfa10036.dts +++ b/arch/arm/boot/dts/imx28-cfa10036.dts @@ -11,6 +11,7 @@ /dts-v1/; #include "imx28.dtsi" +#include / { model = "Crystalfontz CFA-10036 Board"; @@ -95,7 +96,7 @@ pinctrl-names = "default"; pinctrl-0 = <&ssd1306_cfa10036>; reg = <0x3c>; - reset-gpios = <&gpio2 7 0>; + reset-gpios = <&gpio2 7 GPIO_ACTIVE_LOW>; solomon,height = <32>; solomon,width = <128>; solomon,page-offset = <0>; From patchwork Thu Dec 20 12:13:57 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: 10738795 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 2C2666C2 for ; Thu, 20 Dec 2018 12:14:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1BD60287D4 for ; Thu, 20 Dec 2018 12:14:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0EF90287DB; Thu, 20 Dec 2018 12:14:17 +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 9607C287D4 for ; Thu, 20 Dec 2018 12:14:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730229AbeLTMOK (ORCPT ); Thu, 20 Dec 2018 07:14:10 -0500 Received: from mail-eopbgr80072.outbound.protection.outlook.com ([40.107.8.72]:28546 "EHLO EUR04-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731706AbeLTMOI (ORCPT ); Thu, 20 Dec 2018 07:14:08 -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=yZ213LF2TEZgcy9lw1delmrhUGR8P3/CHyIBa1ZYhP0=; b=MX0BxjfGAUJu3mPMKe8ov8ZU2Pck+5GGUFbVIJyugk6gSAnc7rLzLRJ82w0ye/Kbkj6VcK34GbOUIpR1/1ocwY1LzPvxIYbTl1wCt154HtjxXtSOCd5ZdXn65Bk/AlEPxC0+YQ4vYjNUMCTrFpfdYKOfzr9mwkjvWej+OAuEODk= Received: from DB7PR04MB4667.eurprd04.prod.outlook.com (52.135.139.13) by DB7PR04MB4555.eurprd04.prod.outlook.com (52.135.138.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1425.19; Thu, 20 Dec 2018 12:13:59 +0000 Received: from DB7PR04MB4667.eurprd04.prod.outlook.com ([fe80::2561:ec02:4e5e:f490]) by DB7PR04MB4667.eurprd04.prod.outlook.com ([fe80::2561:ec02:4e5e:f490%3]) with mapi id 15.20.1446.020; Thu, 20 Dec 2018 12:13:59 +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 v2 4/4] ARM: mxs: cfa10036: Fixup OLED display reset polarity Thread-Topic: [PATCH v2 4/4] ARM: mxs: cfa10036: Fixup OLED display reset polarity Thread-Index: AQHUmF17VaGP6W4V9EimfGBpapxsgQ== Date: Thu, 20 Dec 2018 12:13:57 +0000 Message-ID: <1545308005-51559-5-git-send-email-michal.vokac@ysoft.com> References: <1545308005-51559-1-git-send-email-michal.vokac@ysoft.com> In-Reply-To: <1545308005-51559-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: AM5PR0701CA0015.eurprd07.prod.outlook.com (2603:10a6:203:51::25) 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;DB7PR04MB4555;6:D2VuRcyYvcFpgjLG8tH1SuACPWQrAVifPmWzncERM/lpgyBe6z7ux9PC7J58bqLjMqk9Ob7JGolxq3U2xXm0vGXnvarQH7Xcoyzv0QyK+ccUD1C9Q0QE1nYiMCgFvRw7TJjRamuIExn3wCfwlS6sZJN6PNkOrJunroRj/9HL59NZayLmlyqnEzlbRHWfX6WmlvmHXWN5YbLOpVG6Ex2h6sds7EAOw8A+U9qYPjPH5fFEeg5h+qEfO/h83JIe/CIf6b9leWr1e00fdU4uVkxEOJETxw12fITDn6brmZzYLwa39GHinH4xam4Ulhqfg1IrH9IM54zTnYLEZRgnWBC5LS1VkkXIS5tOe1IxRLDRmjcq7CxbUmfipcU1byolSKvL6foKzAgMT/PvKSL1CjRLJ0TJ6Cb5w0HQCnbG/zckdRrHxqfx2PqTS5dF3BI0T5dibbRv62HSrdeg4kqdgIo5sQ==;5:Qv1lE7G5pGxHvIG9u7RXdx2RKttTz2D1KWM3EtatEf5/7qwgU/18yFiL1UbiyKx3k+1GTQkp157PCI2IPetm+TXHO+qf+u+sBobtnWvUXdrABrFqabKggvxo8675NTY8Rg7d4HpoTjPAeS4+BZajRlc1btI1e77K8Q8Bj9/3lYQ=;7:pMTabk3mNlXQuRNzJIpeoig/RM3PCxARpJKr2WVZnIJTtMrkXsAqbZuxi04Uw5K9mXEWWm/pSHI84cnPn3NSNBDbopAGiFQpDfFhsXbKoHWO1Y5NlAJPdlHeVJ61MXojH3zzO1hNg0vzmbcBgPDiAw== x-ms-office365-filtering-correlation-id: 4addf853-3716-44fd-3644-08d666749dc5 x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(4534185)(4627221)(201703031133081)(201702281549075)(5600074)(711020)(2017052603328)(7153060)(7193020);SRVR:DB7PR04MB4555; x-ms-traffictypediagnostic: DB7PR04MB4555: x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(3230021)(999002)(5005026)(6040522)(2401047)(8121501046)(3231475)(944501520)(52105112)(93006095)(93001095)(3002001)(10201501046)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123564045)(20161123558120)(201708071742011)(7699051)(76991095);SRVR:DB7PR04MB4555;BCL:0;PCL:0;RULEID:;SRVR:DB7PR04MB4555; x-forefront-prvs: 0892FA9A88 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(136003)(346002)(39850400004)(376002)(366004)(396003)(199004)(189003)(99286004)(305945005)(7736002)(102836004)(14454004)(66066001)(110136005)(72206003)(478600001)(8676002)(81166006)(6486002)(8936002)(71200400001)(71190400001)(81156014)(76176011)(446003)(6436002)(476003)(386003)(6506007)(2616005)(486006)(11346002)(86362001)(68736007)(54906003)(5660300001)(85182001)(53936002)(36756003)(107886003)(6116002)(3846002)(256004)(14444005)(106356001)(52116002)(105586002)(25786009)(26005)(2906002)(316002)(6512007)(4326008)(186003)(97736004);DIR:OUT;SFP:1101;SCL:1;SRVR:DB7PR04MB4555;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: wiAIWtcz8Fj9G4n1NnE7N1acB32MU2WaE0z74rsVApbbTe3iQny3CpzjQ18bbeYHZrtVrmQbw7/EyAlpsR3z5u+meX1m5n9VBb7hIxHVa+bPRutJlqMyH2IoojAThBSCuJB2iARCSUvpWZarYQgAEVOpFm7/qBhjV/1hh44oaZGUos6kw4Jq17CowwDYw3hH63i3dV0PYDBDkwJUyEZeh4pUQkh77txUfszQ/IFPnY6GTs9ffl7PUb7C0F72KFpYzRCQf4eH2gh7L5imbwntuxBkX169R/iKqg58xcO98InY6zm5SrY5ZTZiHwuQMq0i spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-ID: MIME-Version: 1.0 X-OriginatorOrg: ysoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4addf853-3716-44fd-3644-08d666749dc5 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Dec 2018 12:13:57.2733 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b5839965-430f-4be2-b282-d7a3149f2b37 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB4555 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 There was a bug in reset signal generation in ssd1307fb OLED driver. The display needs an active-low reset signal but the driver produced the correct sequence only if the GPIO used for reset was specified as GPIO_ACTIVE_HIGH. Now as the OLED driver is fixed it is also necessarry to implement a fixup for all current users of the old DT ABI. There is only one in-tree user and that is the Crystalfontz CFA-10036 board. In case this board is booting and GPIO_ACTIVE_HIGH is used for reset we override it to GPIO_ACTIVE_LOW. Reviewed-by: Rob Herring Signed-off-by: Michal Vokáč --- Changes from v1: - Add R-by from Rob - Use of_property_read_variable_u32_array to read the GPIO specifier array instead of reading it manualy in for cycle. (Rob) arch/arm/mach-mxs/mach-mxs.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/arch/arm/mach-mxs/mach-mxs.c b/arch/arm/mach-mxs/mach-mxs.c index 1c6062d..50038d6 100644 --- a/arch/arm/mach-mxs/mach-mxs.c +++ b/arch/arm/mach-mxs/mach-mxs.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -268,9 +269,52 @@ static void __init apx4devkit_init(void) apx4devkit_phy_fixup); } +#define OLED_RESET_GPIO_LEN 3 +#define OLED_RESET_GPIO_SIZE (OLED_RESET_GPIO_LEN * sizeof(u32)) + +static void __init crystalfontz_oled_reset_fixup(void) +{ + struct property *newgpio; + struct device_node *np; + u32 *gpiospec; + int ret; + + np = of_find_compatible_node(NULL, NULL, "solomon,ssd1306fb-i2c"); + if (!np) + return; + + newgpio = kzalloc(sizeof(*newgpio) + OLED_RESET_GPIO_SIZE, GFP_KERNEL); + if (!newgpio) + return; + + newgpio->value = newgpio + 1; + newgpio->length = OLED_RESET_GPIO_SIZE; + newgpio->name = kstrdup("reset-gpios", GFP_KERNEL); + if (!newgpio->name) { + kfree(newgpio); + return; + } + + gpiospec = newgpio->value; + ret = of_property_read_variable_u32_array(np, "reset-gpios", gpiospec, + OLED_RESET_GPIO_LEN, 0); + + if (ret < 0) { + kfree(newgpio); + return; + } + + if (!(gpiospec[2] & OF_GPIO_ACTIVE_LOW)) { + gpiospec[2] |= OF_GPIO_ACTIVE_LOW; + cpu_to_be32_array(gpiospec, gpiospec, OLED_RESET_GPIO_LEN); + of_update_property(np, newgpio); + } +} + static void __init crystalfontz_init(void) { update_fec_mac_prop(OUI_CRYSTALFONTZ); + crystalfontz_oled_reset_fixup(); } static void __init duckbill_init(void)