From patchwork Wed Sep 19 13:17:28 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: 10605845 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 0027F1390 for ; Wed, 19 Sep 2018 13:18:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E297F2AE9B for ; Wed, 19 Sep 2018 13:18:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D6F932AEBF; Wed, 19 Sep 2018 13:18: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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 7921C2AE9B for ; Wed, 19 Sep 2018 13:18:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731856AbeISS4A (ORCPT ); Wed, 19 Sep 2018 14:56:00 -0400 Received: from mail-eopbgr30076.outbound.protection.outlook.com ([40.107.3.76]:38944 "EHLO EUR03-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728096AbeISSz7 (ORCPT ); Wed, 19 Sep 2018 14:55:59 -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=BBE2I6XPHis7MzMwKJVM3WJhq2bf27Khfe0LFubF2Rc=; b=TV2pbNKVjCexzl5LsgSPZgCLJ79k/ce6sTIEKkmY5kNyeL8AfNXxBiaSyQZd9DNdXQyda7tDhx+a6t65/XwKbPYxcSjBvSA6KDn/NAhDviGwwm5dQ5oRgx9lsJB4+WeOaUBm4TJNArZ8Ch8HVSem1k52oEq6jgwxWGjFn+HO3sg= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Michal.Vokac@ysoft.com; Received: from iota-build.ysoft.local (89.24.100.190) by DB7PR04MB4666.eurprd04.prod.outlook.com (2603:10a6:5:37::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1143.18; Wed, 19 Sep 2018 13:17:59 +0000 From: =?utf-8?b?TWljaGFsIFZva8OhxI0=?= To: Bartlomiej Zolnierkiewicz , Shawn Guo Cc: Fabio Estevam , Rob Herring , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org, =?utf-8?b?TWljaGFsIFZva8OhxI0=?= Subject: [PATCH v2 2/3] video: ssd1307fb: Do not hard code active-low reset sequence Date: Wed, 19 Sep 2018 15:17:28 +0200 Message-Id: <1537363049-48399-2-git-send-email-michal.vokac@ysoft.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1537363049-48399-1-git-send-email-michal.vokac@ysoft.com> References: <1537363049-48399-1-git-send-email-michal.vokac@ysoft.com> MIME-Version: 1.0 X-Originating-IP: [89.24.100.190] X-ClientProxiedBy: AM5PR0602CA0003.eurprd06.prod.outlook.com (2603:10a6:203:a3::13) To DB7PR04MB4666.eurprd04.prod.outlook.com (2603:10a6:5:37::12) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 18349e25-5449-4040-60fc-08d61e32527d X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(4534165)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060)(7193020);SRVR:DB7PR04MB4666; X-Microsoft-Exchange-Diagnostics: 1;DB7PR04MB4666;3:SYRcS2SaLMcK2oCGYA6vx7oIsPqU7VfjanqChqT4f3X+X+XDyhPzz+fTBKTqexlHTkGzHAEzOgu7CFuitnpovVv9YRyEqRs9N9YjWEEXPfBJ4+Lb6x7N2sMc8ohIGZ6fOUXxbfelol6OuXrcqUCqzo9CpkdKu39ybnNgkUYkINpFrlCmf2ZPp0DGhCL50LUplmLAgqXMAzybK/3YwHdvBKQy8Gb6aj5a3MkdwvTLRL6OHBuGI+Tw26tZISYihnlq;25:Oc00Ex1/O9vJLjSkJOeFAEsaa9EJhbwOcfy/1DdLIOt9IH+fQulk16LGo1ZSqmf0oAhx45AmJjUTTj1toy33DYRwfDF0JqPdmap0SfdUTV2tR/Jtl0h+hNaovpQMzPfnq9dA27M9gIQupaTWqCM4U6prFvWR6WRjExzo59smBU8lGEk/UqAzC5BTa1DzrR6HkJl9jEqUMH35e81+JlGmeapx0BM8J3w4l/xzt4VJ+d0BZ+AkwsTWyIEc6QO7XGXI7WRTnvUdPU/yGU2roEdN3mt3kY/qk4I4WqGz+PIJAdGZFAJiPsEQf2Y+k4ZDXKmEkoLxRuqFN5s10s3/kyAiog==;31:Pbp9yQFa3T4KGjfOo2l3Bx7MEWyzBGvGZQE+nvQvgIZ8tY7xpUNzyu41jOqdtwvCo2d04DYrqfyKf6SXqSvv9uMxsdpQcYEeNDVwfAq4bi713Da8Pt09eayF1hnIE4LcBpX/xQvIlv+3Dzau4HMXtwe5eoPBqu6Z9S1XkzzALLFMz5Ga2oUjI8hB//WESPxW9aH3TNtSLEMs4v3mtPivMckwY/8OIb1Q2cWn5hyD8eY= X-MS-TrafficTypeDiagnostic: DB7PR04MB4666: X-Microsoft-Exchange-Diagnostics: 1;DB7PR04MB4666;20:x45gYORinD6U5HqsK5ZFpOQIgDxf0to3lU2Vfgsu0JdnNZTSxiPd/sgXqJjgDLvjnpPf7I5aHSsaK0HHhTPrdzz1O3YprN5laHRP9fcyTkH32ufATT29kOQD0bJeImTp5sgHgOphj7DbuhDjJHUsghHEB6xxxqpDpB3EgUmlagqfXh/UkRDMda1VvMNDL/Tu7TYq30oG/eh43muhmwZiHrI34D5h9GbbdrkbyspH0hlV2iAvbJQ07aLpBkvRxoHT;4:yuls9sb7XCWotCzLrjNZiZzZedkW5duio2aCux+sriDyDuOcX73QS8kMkBmj42wS8PCZpzeTuaNV3UdCwzbyB3wb7S3P5lWiE2SnWyhRt6cfh1Ig3cd4qpqORAJvkA6Ym4t3oWbLFA6G896OruIC7Irn+9T1CYyn5n4Z9FvN0rgPewUWZAag0Dza1mUcx+lAIK0EmZ3vB/DIbDnUiv6yei4GyYfDt+kt4TLkoJKoI04QEDcF57Rh8OuFdSxBLlO7cC6tUYqYpdPnZNfHVBDSbw== 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)(93006095)(93001095)(10201501046)(3231355)(944501410)(52105095)(3002001)(149027)(150027)(6041310)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123558120)(20161123560045)(201708071742011)(7699050);SRVR:DB7PR04MB4666;BCL:0;PCL:0;RULEID:;SRVR:DB7PR04MB4666; X-Forefront-PRVS: 0800C0C167 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(346002)(376002)(396003)(136003)(366004)(39850400004)(199004)(189003)(3846002)(86362001)(81166006)(6116002)(47776003)(106356001)(7736002)(5660300001)(97736004)(316002)(486006)(26005)(186003)(105586002)(476003)(2616005)(446003)(956004)(107886003)(4326008)(110136005)(6666003)(23676004)(16526019)(25786009)(72206003)(478600001)(54906003)(11346002)(2906002)(6506007)(386003)(76176011)(52116002)(2870700001)(36756003)(53936002)(6512007)(8936002)(6486002)(81156014)(50226002)(305945005)(50466002)(66066001)(68736007)(8676002);DIR:OUT;SFP:1101;SCL:1;SRVR:DB7PR04MB4666;H:iota-build.ysoft.local;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-Exchange-Diagnostics: =?utf-8?q?1=3BDB7PR04MB4666=3B23=3A1uf8cU+?= =?utf-8?q?WUYgG8gSCFD4oRTeNptOwVfc5qMu0W2+hnum9SIKYIQAbL5FZ/4naay2uvO5u/HqY?= =?utf-8?q?1EXuLiM/cN1kpwO40roAq3HJl6llaNkdPILLjPaeJ5qIA5ObHOfRpumqoXvTGJdkW?= =?utf-8?q?c9amFc4ALH+zBjBrzN90VWzkSLe6X1qNieXujHOjosnD5/GA15IhYfzxIoFvnHOUK?= =?utf-8?q?mtNG1Jw+dW+sDR54PUn+UnJ/xCw6o6AXIQhJKaXS86H9l4EeHhitYw2XeCeaBZtWi?= =?utf-8?q?xRQF1C4cRXS2Kj8TWsBhYA+tXJBclr0BebZm9GmN2CQwIQ9l/JRDISfgLc+QwtStg?= =?utf-8?q?BbCP4d/WSaZAywnbnwPFcVioXWNKlfF0t0EhR/Eh478Q1AEYzwLhxtDYCQk9EbuKU?= =?utf-8?q?l3xwBfIVVSfncRLbYslWL+vLc1/RIpOjz4p50arr3mmN4rBJ/b1jCQiZqztxfvxJj?= =?utf-8?q?ldfzag+u/jRF6E22pkA6N+GC11WH9Nu/IORZbLrZng+fju+THfvnHhzjyhA/F7U4m?= =?utf-8?q?HWc4yl692c5l682VI09aJlgBQx6jaj/WhccaORyIqZ1cXtfbQDR/ttNjbOE7/5bNJ?= =?utf-8?q?Sxyt1ZeOIG31QF8g+W41TERh0kkaaHebF1z8c/nNKJJf5rE+UbwZ8sbTF6cvYRmnw?= =?utf-8?q?SGev37kc+YlPxTQazgOsy3WIYjDhHy/hFiSGyUthWnzRt3jNW3C4H68MglrUbLq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qirFdwFdb46DT2iwzSg89src6wr4OvXhYdBW5HJpmaUGETRVLDHzaDlj2maDs3Dm7b7Wr9jjoQYQciGfaZKTBmLY8Hwtda36ASvw5jkg+uXgJQAMaiTV4sPOgrZGww6vEu/EJsIazEb5uq0y7hzYu5UhOQADyscq4BwY7AdUWPMtfqSUHeLEq9yXuN84Ce1g5oGjjGlBIiJvD8oOQV8HV25i6pQrU88W0EFKQvDYG/XsCHd9muYCk9C1whukSoTF6/wuvK5I9XEQ8+3g3ranC5d2MvEZSxF6JqQG+UpBcZtUNIMv08R61ToiwbYjWxZ6mq6Hh6oTzOe/3tTeqFK7WKM6UyTmxiqYeMWowCMljMfQ48bsZgPuVlq76thickFoKSI3DhFsDl8NPJ32z86SLv143ep4wPs3sBU5RsBZiQLY7PLgCK/35HJebmosAw==;5:RCAntIdraw5lNG4BBy5dXMukP+4uU9MYNvxxgIbXDQ/zCMD/mv9sAsCOEPIjbu3vlPv9xMYmh/pvKDKz1809qR0CIAR6kOyDgt+COgLiiMAaLJyguvVOW7qnxhPDLHsRViQpphwv2lz0UKAah6G5gRDnVa1SEnOdGZvXmGaCAJs=;7:ifrmTXx6gaDN53ZpV6b0J6JRReTm6hXf0xBpomXRN9cH8ePV1FlUDDOSl58mAZIx8tzpzMw3zQjIuTXft7fBVSSdTP3xpwg2k+VezQSCssKV4ik+KBQ3r1NkCl3yPJR+URkwGikuDrkExaMTJS7n1rP9ylVvxwJZCEMEc9Elc1LJ47eoAmEfse8o/SEvUx43yNlXPRHb4e0YSWMkKhyk0f7gMEpvxgujn0Ln61O/OshnRlsbk81WBhyOeZIYlubq SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: ysoft.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Sep 2018 13:17:59.6588 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 18349e25-5449-4040-60fc-08d61e32527d X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: b5839965-430f-4be2-b282-d7a3149f2b37 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB4666 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áč --- v2 changes: Split the DT changes into separate patch. 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 e7ae135..7b5bc42 100644 --- a/drivers/video/fbdev/ssd1307fb.c +++ b/drivers/video/fbdev/ssd1307fb.c @@ -728,10 +728,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) {