From patchwork Fri Nov 2 14:56:32 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: 10665595 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 869AE15E9 for ; Fri, 2 Nov 2018 14:56:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 791FE28609 for ; Fri, 2 Nov 2018 14:56:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6D0452C03E; Fri, 2 Nov 2018 14:56:39 +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 16FE928609 for ; Fri, 2 Nov 2018 14:56:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727387AbeKCAD6 (ORCPT ); Fri, 2 Nov 2018 20:03:58 -0400 Received: from mail-eopbgr60052.outbound.protection.outlook.com ([40.107.6.52]:28981 "EHLO EUR04-DB3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726265AbeKCAD6 (ORCPT ); Fri, 2 Nov 2018 20:03:58 -0400 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=cqUCYAXI6tNpi0pOG8fUMtHqXiqsWhnuOYbMFftS4aY=; b=nm5BJa7pRpcuWbfDMnomTfmEcagXzdUeWobxnejv4edos1HG7Pc7b7w11ONYxy99DWOh+mNQftxILpf11vFupAC+oIY/muzrfXVbef3L4LXFeP5Iyw3GXDNvexAy8lxjh7p6yPCuSG3gs1Fl/8kHxvH7VVPSlblwWBLzP4chF3o= Received: from DB7PR04MB4667.eurprd04.prod.outlook.com (52.135.139.13) by DB7PR04MB4987.eurprd04.prod.outlook.com (20.176.234.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1294.26; Fri, 2 Nov 2018 14:56:32 +0000 Received: from DB7PR04MB4667.eurprd04.prod.outlook.com ([fe80::2849:23b4:7b26:a421]) by DB7PR04MB4667.eurprd04.prod.outlook.com ([fe80::2849:23b4:7b26:a421%3]) with mapi id 15.20.1294.024; Fri, 2 Nov 2018 14:56:32 +0000 From: =?utf-8?b?Vm9rw6HEjSBNaWNoYWw=?= To: Rob Herring , Bartlomiej Zolnierkiewicz CC: "linux-fbdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "devicetree@vger.kernel.org" , Jyri Sarha , =?utf-8?b?Vm9rw6HEjSBNaWNoYWw=?= Subject: [PATCH fbdev-for-next 1/2] dt-bindings: display: ssd1307fb: Add reset-active-low property Thread-Topic: [PATCH fbdev-for-next 1/2] dt-bindings: display: ssd1307fb: Add reset-active-low property Thread-Index: AQHUcrw+i/ut91AHCkuAoUzkq/OHRQ== Date: Fri, 2 Nov 2018 14:56:32 +0000 Message-ID: <1541170556-75032-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: AM6P194CA0086.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:8f::27) 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;DB7PR04MB4987;6:t0IAdz5Q/FZGzgImE2Hq+P2NUKmaxf0bmsEsW7dX3DYuk8z7WereNnWSGUw+jwcON1QW5THiZQsHbVTCaqj7rIZW2+IPfdLFy1KZW2IP/8DPRAWBKTu5WcVrFU4ZqM5pehBT5QC6OHN5Ky0hf+hY5Ei7fzPZybbJOLPuGhfp3dahu2ALR33czIrH0uY56wjPdoqAlyBynSaDSg+hlYMXBlLmIpp4Y3NXlUPkk8yqssV0EMP8LJYdoq3OK20P6lB6mau2vltpRc418S4/UB0nBsWF+QQiIIJwBEvLXzWUvIJD0Lkpud2o4BbVT94ZKV8GSlnmvsj7pFU/4MeiQSnu2pNEJcxlVaYOPTwYoqks8TexF/l8cZVCqJaBAuytogY2E0JBpTvjHcKX51E5pUedZb2lSlpBtzOK+HB+9d11am4ABjhUUzrsSLzEvJEp4FJ444zfVv8sg3Kor9IF/53hxg==;5:K17n+yVqL8poO6mCkm31Vq6QjO8ps+yyZnDpa0mReRcKWeMQse5owajPfjcVZCb6bC7SxNPGrQEiAUBhn5XyO/XROqvcG2kQUoarxQV9GfvIcCeoc1zdtyTgLRp5B5q5BrOO2SHOKRCt80XVPDiqSFoAJeoxYBhf9DKmX8m4nwA=;7:/DUyjev/zQx9NBYq0wM0xnzSmBMVbs1qISPjHD44BwUsIKMKQLsQqdbB7es0CvomiWa/6Pefywb0inwcv+nAqSLrNlJLyROdH5ronrkh3GY7aJxckZgWC+MKF9B5TuGQU289WQXEsutp4r1XVNDHvg== x-ms-office365-filtering-correlation-id: 437bc04f-6e28-44ba-3f1f-08d640d3609d x-microsoft-antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060)(7193020);SRVR:DB7PR04MB4987; x-ms-traffictypediagnostic: DB7PR04MB4987: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040522)(2401047)(5005006)(8121501046)(10201501046)(3231382)(944501410)(52105095)(3002001)(93006095)(93001095)(148016)(149066)(150057)(6041310)(20161123560045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123558120)(201708071742011)(7699051)(76991095);SRVR:DB7PR04MB4987;BCL:0;PCL:0;RULEID:;SRVR:DB7PR04MB4987; x-forefront-prvs: 08444C7C87 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(136003)(39850400004)(366004)(376002)(346002)(396003)(189003)(199004)(6512007)(52116002)(54906003)(110136005)(386003)(53936002)(6116002)(2906002)(3846002)(6506007)(476003)(486006)(2900100001)(186003)(8676002)(575784001)(86362001)(26005)(6436002)(316002)(102836004)(66066001)(99286004)(85182001)(81166006)(81156014)(7736002)(8936002)(305945005)(25786009)(68736007)(36756003)(14454004)(5660300001)(107886003)(6486002)(97736004)(478600001)(71200400001)(4326008)(2616005)(106356001)(105586002)(72206003)(256004)(71190400001);DIR:OUT;SFP:1101;SCL:1;SRVR:DB7PR04MB4987;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: 41ySgJHwbaZskK7/6QF6LPhOCyAoPQBrqF4VE7s7eh8rp9+gzF1WTOvB9RpHUF0xQ5hXF/7gNC8kIw07/o6DRj61fZbInV/wH3nR8hA9j68zfZYUESbe3Y24/XGtcsCnJt4Y62DqHIN1bwUzrZKP/KIPCSx0UcZXa++nO5lqGxHlkXvsksu8yc4KkejAhyPmptb1vh3AvJ46T96CnS9++z4r2xl/wduXOy6KpSYupsDFQkNOH35S2D2wRPnP8myRK9gEt0fjtweKLrHVQoAqO9iJsY1Vbr9X20qi7KeSamONRb8cISPwyn1rCogkjh3fIuVfDXemBVTiejpxvGQPQ8s6ZU1mFqXvT5nuZaGyZM8= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-ID: <180BA1B53F1D93458920604DE1CA8E09@eurprd04.prod.outlook.com> MIME-Version: 1.0 X-OriginatorOrg: ysoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 437bc04f-6e28-44ba-3f1f-08d640d3609d X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Nov 2018 14:56:32.4800 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b5839965-430f-4be2-b282-d7a3149f2b37 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB4987 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 This reverts commit 519b4dba586198eed8f72ba07bc71808af2e0e32. It is true that the actual implementation has never been there. But contrary to what the reverted commit message says it does make sense to add it. Current implementation of the reset signal is hard-coded to active low with the assumption that reset-gpios is specified as GPIO_ACTIVE_HIGH. That is technically wrong as the DTS authors should know that SSD130x displays need active low reset and hence they are temped to use GPIO_ACTIVE_LOW. But with that the reset is broken. So reset-acive-low property can be used to invert the signal once again to fix this. Signed-off-by: Michal Vokáč --- Documentation/devicetree/bindings/display/ssd1307fb.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/display/ssd1307fb.txt b/Documentation/devicetree/bindings/display/ssd1307fb.txt index 209d931..a5ead10 100644 --- a/Documentation/devicetree/bindings/display/ssd1307fb.txt +++ b/Documentation/devicetree/bindings/display/ssd1307fb.txt @@ -16,6 +16,8 @@ Required properties: Optional properties: - reset-gpios: The GPIO used to reset the OLED display, if available. See Documentation/devicetree/bindings/gpio/gpio.txt for details. + - reset-active-low: Bool flag to indicate the GPIO specified in "reset-gpios" + property is active low. - vbat-supply: The supply for VBAT - solomon,segment-no-remap: Display needs normal (non-inverted) data column to segment mapping @@ -35,7 +37,7 @@ ssd1307: oled@3c { compatible = "solomon,ssd1307fb-i2c"; reg = <0x3c>; pwms = <&pwm 4 3000>; - reset-gpios = <&gpio2 7>; + reset-gpios = <&gpio2 7 GPIO_ACTIVE_LOW>; reset-active-low; }; @@ -43,7 +45,7 @@ ssd1306: oled@3c { compatible = "solomon,ssd1306fb-i2c"; reg = <0x3c>; pwms = <&pwm 4 3000>; - reset-gpios = <&gpio2 7>; + reset-gpios = <&gpio2 7 GPIO_ACTIVE_LOW>; reset-active-low; solomon,com-lrremap; solomon,com-invdir; From patchwork Fri Nov 2 14:56:35 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: 10665597 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 88B6A15E9 for ; Fri, 2 Nov 2018 14:56:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7A52D286D3 for ; Fri, 2 Nov 2018 14:56:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6D8C928609; Fri, 2 Nov 2018 14:56:42 +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 0819628609 for ; Fri, 2 Nov 2018 14:56:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726265AbeKCAEC (ORCPT ); Fri, 2 Nov 2018 20:04:02 -0400 Received: from mail-eopbgr60052.outbound.protection.outlook.com ([40.107.6.52]:28981 "EHLO EUR04-DB3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726849AbeKCAEC (ORCPT ); Fri, 2 Nov 2018 20:04:02 -0400 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=Rld2iaq1NWEpCFF+aedRSI+221uiWVKuw7W+gycP0cw=; b=XbMqX20lTJ4h/sW9uvmPF5oRTRmz5ntWjUkSfz5v4pHYQBQVRMJd6ODPOTHqYEP31ZUWGoXNh2L5uK/86cp9kPh6CkyrqfkyNzbYM0YeLysDgL6RGW0eFNnYtZ6c4UmOsISyHaXO8nyeYP1tj1bxCAww6JjKclZQzvd6/QvOrqo= Received: from DB7PR04MB4667.eurprd04.prod.outlook.com (52.135.139.13) by DB7PR04MB4987.eurprd04.prod.outlook.com (20.176.234.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1294.26; Fri, 2 Nov 2018 14:56:35 +0000 Received: from DB7PR04MB4667.eurprd04.prod.outlook.com ([fe80::2849:23b4:7b26:a421]) by DB7PR04MB4667.eurprd04.prod.outlook.com ([fe80::2849:23b4:7b26:a421%3]) with mapi id 15.20.1294.024; Fri, 2 Nov 2018 14:56:35 +0000 From: =?utf-8?b?Vm9rw6HEjSBNaWNoYWw=?= To: Rob Herring , Bartlomiej Zolnierkiewicz CC: "linux-fbdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "devicetree@vger.kernel.org" , Jyri Sarha , =?utf-8?b?Vm9rw6HEjSBNaWNoYWw=?= Subject: [PATCH fbdev-for-next 2/2] video: ssd1307fb: Add support for the reset-active-low property Thread-Topic: [PATCH fbdev-for-next 2/2] video: ssd1307fb: Add support for the reset-active-low property Thread-Index: AQHUcrw/3qwIrYVC/Uy4SnGDDmELbw== Date: Fri, 2 Nov 2018 14:56:35 +0000 Message-ID: <1541170556-75032-2-git-send-email-michal.vokac@ysoft.com> References: <1541170556-75032-1-git-send-email-michal.vokac@ysoft.com> In-Reply-To: <1541170556-75032-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: AM6P194CA0086.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:8f::27) 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;DB7PR04MB4987;6:sTQQ+vY576DDcYEIuNDceNHyFgem2YPV49r2J9anE/FoH3bC5W5kwunbtGEocK4z1fn1lhqgzhApJwtNpttSmz9Hwext/8MlLPs+4pU9FNWjgHHhGVLgDpzr7bOHhZ7+ih4e+SQUQ1TBZEFpOrzXoQNwOr9k3X4LDYWgU0uM5CLqcIeMBHVc6kRF24lKsKmFLlXJJR7RkCnB8Zh4vS3nTj/JZXeoTuyss/jLjvwJkqh8gsw/ADCf6Rs39mRYemafhJu4dYfFsS8EA2FCO5demG6I2mbK1tswYv9Cqax1qu8CUyY1+ipJZCx6GjnT3b7Rxeg5yH1Mjs81tA5E2fK6+4hDX/raJsy57kz9UE90V8qtRj7CkmLtZ9FUxkN4NsH3EaZGpW5M+PL1aWE+Zh8jOsDqZhAvWmKEsFvuIcm96PUhnKZghjFaQ+1StVVBRWVpEZ6EF0gnrFYSBK3cR4f5LA==;5:9FMaPu/DiaKqe6zucfRpGdKbw9IIqKnfIf7hYNbdxO2/qN+JnHI0wfLEv07+ffVpIxmX6dgDBSluq92bi7R+p1Ey6qkry2kXNJ9hP5Lx8j8SXK/IlIbFK87/+07Wuqn0GcYkcj3VNNCUTEndv1ZqpWDFYiL5KXAhvvtVyg6ORBg=;7:6arS4jMVUDfQh5TFSqiU3T7osdvKa8fyFUGGot+GtlULo7+bBAu9hN99Mhl0Box0DeKr1EnaQIXREfcdhzdLoEeN1yzlbz6yYuNyCrZsIZaAOhdjxLgTl8JEevDU4EdXbNS2jbNQ9g1mumZLYFsdqg== x-ms-office365-filtering-correlation-id: 983bd67c-6719-48bd-39b7-08d640d36242 x-microsoft-antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060)(7193020);SRVR:DB7PR04MB4987; x-ms-traffictypediagnostic: DB7PR04MB4987: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040522)(2401047)(5005006)(8121501046)(10201501046)(3231382)(944501410)(52105095)(3002001)(93006095)(93001095)(148016)(149066)(150057)(6041310)(20161123560045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123558120)(201708071742011)(7699051)(76991095);SRVR:DB7PR04MB4987;BCL:0;PCL:0;RULEID:;SRVR:DB7PR04MB4987; x-forefront-prvs: 08444C7C87 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(136003)(39850400004)(366004)(376002)(346002)(396003)(189003)(199004)(6512007)(52116002)(54906003)(110136005)(386003)(53936002)(6116002)(2906002)(3846002)(6506007)(476003)(486006)(76176011)(2900100001)(186003)(8676002)(86362001)(26005)(6436002)(316002)(102836004)(66066001)(99286004)(85182001)(81166006)(81156014)(7736002)(8936002)(305945005)(25786009)(68736007)(36756003)(14454004)(5660300001)(107886003)(6486002)(97736004)(478600001)(446003)(71200400001)(4326008)(11346002)(2616005)(106356001)(105586002)(14444005)(72206003)(256004)(71190400001);DIR:OUT;SFP:1101;SCL:1;SRVR:DB7PR04MB4987;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: 1UEPURNBqevTvr8sOM8TXyKyT8tEu/xVDJZW6i3DZ4cYdCJqGS2rzbBM7FFlSphTDAnnRSi8+njhg3xX9Q4gYYGHjGk+WYZHjp8THTTFqDbE6VoFFJlaa2AZ9CBp8B+d/Yz/240KPbwCd9zEvum7GLk+rH+xWDqUsvEfdSVE+qF3evdpoWEJhvQDR4V+0MdaJLbKnGO7hNOTlkEMOMOlZwV4lj25f4PVJaf7NqkJwd8dIdask6kGcxeRTxDvHz0jCpAdjc9rwr2NKAeWV2TLiow2oWkA1pKp7Zv/ue/vm+oiFLxFYSJUTRG/cJPT6HlTFA60g/83h7jK+Luask2Kg8KInxj8kg0MieVaWwkpD98= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-ID: <6FF874686236FD4DB68E4A9A103ABD13@eurprd04.prod.outlook.com> MIME-Version: 1.0 X-OriginatorOrg: ysoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 983bd67c-6719-48bd-39b7-08d640d36242 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Nov 2018 14:56:35.2029 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b5839965-430f-4be2-b282-d7a3149f2b37 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB4987 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 DTS authors are forced to define the reset-gpios property with GPIO_ACTIVE_HIGH to make the reset work. Add the reset-active-low property so the signal is inverted once again and the GPIO_ACTIVE_LOW work as expected. Signed-off-by: Michal Vokáč --- drivers/video/fbdev/ssd1307fb.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/video/fbdev/ssd1307fb.c b/drivers/video/fbdev/ssd1307fb.c index e7ae135..790f1c4 100644 --- a/drivers/video/fbdev/ssd1307fb.c +++ b/drivers/video/fbdev/ssd1307fb.c @@ -608,6 +608,7 @@ static int ssd1307fb_probe(struct i2c_client *client, struct fb_deferred_io *ssd1307fb_defio; u32 vmem_size; struct ssd1307fb_par *par; + bool reset_active_low; u8 *vmem; int ret; @@ -671,6 +672,7 @@ static int ssd1307fb_probe(struct i2c_client *client, par->com_seq = of_property_read_bool(node, "solomon,com-seq"); par->com_lrremap = of_property_read_bool(node, "solomon,com-lrremap"); par->com_invdir = of_property_read_bool(node, "solomon,com-invdir"); + reset_active_low = of_property_read_bool(node, "reset-active-low"); par->contrast = 127; par->vcomh = par->device_info->default_vcomh; @@ -728,9 +730,9 @@ static int ssd1307fb_probe(struct i2c_client *client, if (par->reset) { /* Reset the screen */ - gpiod_set_value_cansleep(par->reset, 0); + gpiod_set_value_cansleep(par->reset, reset_active_low); udelay(4); - gpiod_set_value_cansleep(par->reset, 1); + gpiod_set_value_cansleep(par->reset, !reset_active_low); udelay(4); }