From patchwork Tue Dec 4 15:03:36 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: 10712053 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 952571057 for ; Tue, 4 Dec 2018 15:03:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8617F2BA31 for ; Tue, 4 Dec 2018 15:03:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 839BC2BBCC; Tue, 4 Dec 2018 15:03:43 +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 EA1792BA31 for ; Tue, 4 Dec 2018 15:03:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726475AbeLDPDl (ORCPT ); Tue, 4 Dec 2018 10:03:41 -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 S1726532AbeLDPDk (ORCPT ); Tue, 4 Dec 2018 10:03:40 -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=hfNaW4p+MpQMxfGylPFfkSmbjvrEepE7s65wCkT1dKM=; b=HbvVnQeUGL+F9lgTudPZYNjC0rxPuV4EuhVc3wgMCHVnrStl27PdAIKLTX+Wvk1tHh8F485ySvVtJWzlXhRSovrLkcTXNz7S9WD+v49UHKiRQ/gTltgfJKv8Q0dSYfcg2SDcP8AwHySCMdzBoDy2MiepCCI22yKI2g3EeQUGGws= 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:36 +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:36 +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 1/4] dt-bindings: display: ssd1307fb: Remove reset-active-low from examples Thread-Topic: [PATCH 1/4] dt-bindings: display: ssd1307fb: Remove reset-active-low from examples Thread-Index: AQHUi+KI2gmlvx0j6EalDjgRIUSaNQ== Date: Tue, 4 Dec 2018 15:03:36 +0000 Message-ID: <1543935806-94880-2-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:QEkyc5QRpJBmf6vxe6vKADg/UI93pfWETMKE/oKg19dSnX3mnTkJsu8+FI9ca9zMm2VlmYjgowpxu4TYugk1anYGfW6bgExzlIK3ZRHq4rq83H5pyGLfPKYX0ypzcQ56FBpS+M4tu5bTlQzhEKtYWpOrraJJvXcz+mn6Lg1r9MItr92JO3voBjOc12bZW9Z4iFSwBL1EaSTx4xSBHtwRNUawRB3WYWHoq4gTdJEG6Er9O+SipIhrMH32Q3ER4i1wldEtgvKNHNqj77+ucumWhEBx/sMrivZGiDtdzL0Masylxmo6xIRBQeknsqxIexqdtvlH799+/BkwL5Zuik3YsH+fdI1uQM9dJlXf3uI2Yaxc1K621W3WmIhMd7S1iEzjQvLpYYU611R61Mdcqq7lf2hhPh4SBlBBmm8Rq7Cn/dIh1sjo/4FPreg4wrEgAzxM8u/ZjWbYjHYjAy7vxLCRfQ==;5:Dp3ChVyCcl70cPxISjMBwjiCZUDUiHlbjfxTeZIGL7kYS9QW530bpyNRdGMMkpi+4b2jKFFw2EuRdUTKxd/Z69It8N2GG1kdKNcKeEWDWJ3dNXhaUkSycIv4A5M6Z/PtoNI3HCJ+wWVbwq1JNWFWMr+vbYl80yUfhltpVOuZs0k=;7:yr7AYbEIkDQ74FHlZRuSNl96KsVBLZsW0w/eqAptKzbUli+4YvigIS4TwF6tZB8aIias6EK5g0V8fz6wJqsTZoT77+Y5nHH1oUr1wUUfnyuHaLrzaOBq7iY8CqUaVp6YFfOdVxVYjXnfxbCJepLAag== x-ms-office365-filtering-correlation-id: 3a88adab-9496-4adc-9408-08d659f9aaa3 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: WerOtR9PP+oyqlCDklUx2LdQF3/t+tEY7amOU8FF4vQBECLWHme2Y83Pc91eMeZC4+zh7sae/j0eIR7KMltQ4nv8FM0l5i/m/tONqRXwymream0allp9naXZHKelYNjktG1w561r1ktK6yfEriuSBkvQUjJYFpSxWC6CtgWTwihLeX5rfVtW8iJYYJltGSWcCTeoRNPF4nrtFYh+zTJTIzU1FfWshObMREK9UXdzh8twNAu2cXMpt6AQ0tLerK3fUDXOMCQWWlj1+hSITYxjkK8fLhIo8H61BqplxgMed9z3IPf5P1jJJm8XZy/TCrlxf5P6xYxoFajvAjLpa5NTa0Zm7XB9fT72J/LO1W7WIwU= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-ID: <3BD8A44105FC0B40A67DEE2208FBAE27@eurprd04.prod.outlook.com> MIME-Version: 1.0 X-OriginatorOrg: ysoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3a88adab-9496-4adc-9408-08d659f9aaa3 X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Dec 2018 15:03:36.7829 (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 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") Signed-off-by: Michal Vokáč --- 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 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) { From patchwork Tue Dec 4 15:03:38 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: 10712055 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 87C2C14E2 for ; Tue, 4 Dec 2018 15:03:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7B5992BBDB for ; Tue, 4 Dec 2018 15:03:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6EB0B2BBCF; Tue, 4 Dec 2018 15:03:51 +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 E66FB29CA9 for ; Tue, 4 Dec 2018 15:03:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726532AbeLDPDu (ORCPT ); Tue, 4 Dec 2018 10:03:50 -0500 Received: from mail-eopbgr20086.outbound.protection.outlook.com ([40.107.2.86]:14888 "EHLO EUR02-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726459AbeLDPDt (ORCPT ); Tue, 4 Dec 2018 10:03:49 -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=MbSHLYsZgwOsV/ONdvuh9wDnhnHwEhuGWmh3MO5FwBo=; b=VCG+q3DfcVwVZrMSginjGeTTtA+inaIAZujC4WrA9rRCzusrn0ldyr32Fkm9254q9tdCuAg75tXkYX0jjlnhZMF+fGEfKnLQu2hltoSNGUkOVvC+hrQOjKwgBNVZTHlN7iCYaUNfciuVNehmRGbMQIkhgsvlhiuCqTSufXYMTVQ= Received: from DB7PR04MB4667.eurprd04.prod.outlook.com (52.135.139.13) by DB7PR04MB3961.eurprd04.prod.outlook.com (52.134.107.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1382.19; 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:38 +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 3/4] ARM: dts: imx28-cfa10036: Fix the reset gpio signal polarity Thread-Topic: [PATCH 3/4] ARM: dts: imx28-cfa10036: Fix the reset gpio signal polarity Thread-Index: AQHUi+KJzGJC4e1HO0aaWQb3uyYgIA== Date: Tue, 4 Dec 2018 15:03:38 +0000 Message-ID: <1543935806-94880-4-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;DB7PR04MB3961;6:X8FtMiUMslOangGSNI/mqJEUUIIR3/N4rpcda6tYp3hZ+ytGk4ETde0nVYC32i91SdPEyjaNcnIOyV+2YGdtV45hNn9E/YyFopwaLFiNAx64w6XBgCUi4JbtOemudii8TQ37yzTXs+x3b1kI7qv8RF0AzMhq2Vlx21GprpTKr3wSsJr30Xakobus8YNDHIZFu+zzLORx+5mOWN07Z43vEM7yEjrrUsePbe0G9CIn2D5K4LCPMZAFAfEy4i2ufrJDV1JUVoz00SdbGC/uRyz23Zcdm3leT4iRzbPrWv6d/hcNpiENGZ+JaPH4nISfB2HGqIDVbln/bvaJ2+y3gmImxxDbA7WoDE0QZBMh8IdQk9ukkiM7sOSGOWd8OxIZ3hcHYU+9vOJAY2MFe0LJ2yk68ctxDQVN+s9OmulBEjYOnMx8sBv86QYMkKfnv6TKMDjPxdVKrfV9qgzV1T/J+SQcZA==;5:aYxpZAc8Poi76wT38OkR645GeYv7Ib/qnUk3AKCDnAGdsqju/IscrOhhNFRMWyLp5D9SGeY0OhncgvOZXmogfjpwiTBrs8Du4afy4T3c7JrLcc2mWQwshcLskRQEtEWP1vvbQWkoYRgg1jkKuR1i05jtcByaYxOaVUJP7oPGQd8=;7:XSmLA64M2xE5zyv1PK3cbSrbpeizcXUSo7vd+l5nU1EIK3WWsV1uOgvmyJJw+jAa6iYT6rIVZbvpZJZshQ0qIW8/pFHpt4HqP98xKHfaMt24J7P+lihFslm5hVHZWnOoBO0LMHID2eS+rT/mG7Swig== x-ms-office365-filtering-correlation-id: 3334c08a-849b-4898-980d-08d659f9abec x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390098)(7020095)(4652040)(8989299)(5600074)(711020)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020);SRVR:DB7PR04MB3961; x-ms-traffictypediagnostic: DB7PR04MB3961: x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3231455)(999002)(944501493)(52105112)(3002001)(10201501046)(148016)(149066)(150057)(6041310)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123558120)(201708071742011)(7699051)(76991095);SRVR:DB7PR04MB3961;BCL:0;PCL:0;RULEID:;SRVR:DB7PR04MB3961; x-forefront-prvs: 0876988AF0 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(346002)(396003)(136003)(39850400004)(376002)(366004)(199004)(189003)(6506007)(305945005)(386003)(2906002)(105586002)(186003)(2616005)(14454004)(446003)(81156014)(8676002)(86362001)(11346002)(106356001)(4326008)(6512007)(486006)(102836004)(6436002)(256004)(14444005)(99286004)(476003)(81166006)(7736002)(6486002)(66066001)(478600001)(71190400001)(71200400001)(26005)(97736004)(25786009)(316002)(52116002)(5660300001)(54906003)(110136005)(8936002)(6116002)(85182001)(76176011)(72206003)(36756003)(107886003)(3846002)(53936002)(68736007);DIR:OUT;SFP:1101;SCL:1;SRVR:DB7PR04MB3961;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: XuxYZD+0EXxjxBg3qnvr6QnV1ZjpOODyx/dnsz2ccTE8DELPTp0FVR7TIIwKpHig3v117J2oQBa6DhZbuq1zdDCr1ua3GxDtHGeZEHD2uxuonkvjp1YXlRInDt8lLOa8lNkzHVnW/+fRlVgKbpi9WJnGwJtHIbaQyMYUC/ZtG6yI6AFp4arvekQ4l8nFrh4k24MV+x9HtrAPgd67JXy01YOD3uQGfy0BxgBHzkzmY5yY2vfXrZ1BF95j+av4R+Aby5hmMApTzhvUA2k7CU6gtbwwm5Pbzc9FYcHzdq99Qvm6ue636tbreAcNZNTT1/hduAsU7VaR9CA6FKDQPsUMW9duHOGFELrJcdR585OEzfU= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-ID: <5AEC70A3473AB748836A0F1C4C24A202@eurprd04.prod.outlook.com> MIME-Version: 1.0 X-OriginatorOrg: ysoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3334c08a-849b-4898-980d-08d659f9abec X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Dec 2018 15:03:38.8766 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b5839965-430f-4be2-b282-d7a3149f2b37 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB3961 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. Signed-off-by: Michal Vokáč --- 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 Tue Dec 4 15:03:40 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: 10712057 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 342C41057 for ; Tue, 4 Dec 2018 15:04:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 24BDC2BA5C for ; Tue, 4 Dec 2018 15:04:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 221942BBBA; Tue, 4 Dec 2018 15:04:05 +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 916262BBD4 for ; Tue, 4 Dec 2018 15:04:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726309AbeLDPD7 (ORCPT ); Tue, 4 Dec 2018 10:03:59 -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 S1726151AbeLDPD6 (ORCPT ); Tue, 4 Dec 2018 10:03:58 -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=gW0TL8oViga6LgLmrj/1ZxAhqVTiZdgv5iUCUDPMEXo=; b=KtPt1LVhRDjpss53fpldlZeHl1FmwSFrM9ltNzE3RiAP+OWD+OjJCX5LluSiLmR3d/aYzvAI9y8S9u+U+5aYte//Fc89aKP7ILhMf1nA1mo4UO3D14jBCr2DZhQfYWV6YzDjdEgRrhJT3D5Dc7YIfdhLhXehgMpGxf4izK5OBZw= 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:40 +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:40 +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: =?utf-8?q?=5BPATCH_4/4=5D_ARM=3A_mxs=3A_cfa10036=3A_Fixup_OLED?= =?utf-8?q?=C2=A0display_reset_polarity?= Thread-Topic: =?utf-8?q?=5BPATCH_4/4=5D_ARM=3A_mxs=3A_cfa10036=3A_Fixup_OLED?= =?utf-8?q?=C2=A0display_reset_polarity?= Thread-Index: AQHUi+KKthGpJEQVZU6UA2M3No4/WA== Date: Tue, 4 Dec 2018 15:03:40 +0000 Message-ID: <1543935806-94880-5-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:8Jf4LwWMkTeYdKmvFEEhEN4ikRMT2Rrjjz6f/N0dBkb0Wymmh/8IcsUcgAT/n90aM7RviEtamXrn36LfbgdZZ3SMShdI4eJUCk0AdfxxarT8BhANO8scLcmGj6d8RKRtIWXx4V1GkoN/+Tm2mtuxKcwbLQjarqzQT0zGehXsRKphBZ3zcIsPSHTXt3lLagmeNdgk/QbyYQdEnvdaKOjYUkWViqljhmqTLEO/22c6Fup+bGSoB0tRlUvZ5qrtpM/0vof27kGSzahX0siJUoj8dZVHFj3Bk2bgnfHtmuwq5budcAHAJEmway6it+82vwTHXJ+YW5ThH1DAfH0F5TVzl7Wp/PXXoJd+snT1v0ttRbxWdndAHXt1lq83gcorQBhPvtduTT8kBB+fw9UHvnvOGl6wnnUJ8nmifF5pQD5ucE0JXZ7rqbY2n4UOnZ3/eUh9yjV9/xJIIgLEdhBCV1b+8w==;5:uIzqHWrMz8JvPwyCOEVlnaUuQF1ieSzudFx8UFb5J1HHa9PtbkMBAFCZIh/0nNn/W7Vb3nnfkV9aWQyJ0zfl8L5ZfHAUnb+HY7XMow3aGJOoOtY699onBi2E9so+7eaI/7vrNkpGP/wZoeukTZ0Goed90UoeirwvT+yKYuELWkg=;7:sIs6dERQhNa0ZwEcFtb+R0VrTr8MjAC4uqFvyHPhYc98+8GJO6vmItXd9m/0yegpExNJzodH6b0iNjC57m9iE0yjOSQQu/sPPXGBgkKfAZxnWlw/k+3sygAuX5tMWM4Tw070wQrWezf+v3NHEWFHUw== x-ms-office365-filtering-correlation-id: ea8ba808-b6f6-4722-50e8-08d659f9ace9 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)(14444005)(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)(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: oXc0pktuujK0Dy7zuTSZdNU0IdmxWiZWsHZysuJ6N+DREI1sDOlWGDIanc8+fK89vnbkbDQVViMIpgAFw7NcBGsHUH7gDKxj0gWVSJ7SgtugXADjAE4by2vZ+bn5QOJcqpcbibGj4BSdKNTDzO0JkDb5EELDNAacLEVPqeHZ4hGRBvAVGXHBWPFKRNK+H3hNU03tKRXKBMRnBA7MBxc6QUXWahKYxmEH10Rwij1nRS60VnfFwms6c1UBeMCqhkrB8XmIOz3udyIiaQ+9pOUlff3jUsfThehiYy65oqJrj6xEvjX0XrP0AhTueA8Cm6ENc14lT1MbiqUjEWbf6WbwPmjqc8EOIuGWNpdn2ka2yuo= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-ID: <738447F86299104B827666F04D0CB600@eurprd04.prod.outlook.com> MIME-Version: 1.0 X-OriginatorOrg: ysoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: ea8ba808-b6f6-4722-50e8-08d659f9ace9 X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Dec 2018 15:03:40.5329 (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 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. Signed-off-by: Michal Vokáč Reviewed-by: Rob Herring --- arch/arm/mach-mxs/mach-mxs.c | 45 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/arch/arm/mach-mxs/mach-mxs.c b/arch/arm/mach-mxs/mach-mxs.c index 1c6062d..23c260c 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,53 @@ 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 i, 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; + for (i = 0; i < OLED_RESET_GPIO_LEN; i++) { + ret = of_property_read_u32_index(np, "reset-gpios", i, + &gpiospec[i]); + if (ret) { + 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)