From patchwork Wed Sep 19 09:18:43 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: 10605543 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 931EA5A4 for ; Wed, 19 Sep 2018 09:19:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8311C2B515 for ; Wed, 19 Sep 2018 09:19:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 76B612B518; Wed, 19 Sep 2018 09:19:08 +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 A49B02B515 for ; Wed, 19 Sep 2018 09:19:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731024AbeISO4G (ORCPT ); Wed, 19 Sep 2018 10:56:06 -0400 Received: from mail-eopbgr30087.outbound.protection.outlook.com ([40.107.3.87]:52824 "EHLO EUR03-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730802AbeISO4F (ORCPT ); Wed, 19 Sep 2018 10:56:05 -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=rES/CKauT0vKNNuiCnxyajxJ4Jw/bOGMHidRei13ESU=; b=1URLoXje5j2+WXFDa819w2ymhHvRuUZE9Q/F75uNM3QjlDOX30yEfURw0oRvS+YWPtztGnVunFM0F9H42orCEqQ4DkrBN6xqayVzqo8B4vj/o+OHYJTGr+JjtuVlC/Tpvu2gEvdyXyNPwCbj5fEOEO1C9/UHNoRj+JZ2l0BFoU4= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Michal.Vokac@ysoft.com; Received: from iota-build.ysoft.local (89.24.100.190) by AM0PR04MB4658.eurprd04.prod.outlook.com (2603:10a6:208:75::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 09:19:01 +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 1/2] video: ssd1307fb: Use gpiod_set_value_cansleep() for reset Date: Wed, 19 Sep 2018 11:18:43 +0200 Message-Id: <1537348724-22976-1-git-send-email-michal.vokac@ysoft.com> X-Mailer: git-send-email 2.1.4 MIME-Version: 1.0 X-Originating-IP: [89.24.100.190] X-ClientProxiedBy: VI1PR03CA0067.eurprd03.prod.outlook.com (2603:10a6:803:50::38) To AM0PR04MB4658.eurprd04.prod.outlook.com (2603:10a6:208:75::12) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9746b710-7598-4934-9d79-08d61e10f044 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(4534165)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060)(7193020);SRVR:AM0PR04MB4658; X-Microsoft-Exchange-Diagnostics: 1;AM0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NU6XYkxXrT7nMAz18MQeqtFtDQG38mlgjGLj8warnSTUuLyGPSkUPDJ+xZTDHjsInYZpOiPKYXDL+Kd99Eza/8ynftDrm8W8h3uITXV7zYtZu3;4:gov+7F60ii75EuUpSKkRC0dv5ufNKVgZrq1kd5bzL+rvzHJrPsu/IJuu0v7ToEQ1OS8LpY0+atC32Xm6fdJv2SfsK8Cv0t2W8GzsAzS/4oT0OJ52v44uEkqXyzO9yNsYbVWX/D1vjPufd7G2Ol7gETySuiCYo7mlLygutnAFCQBVnZA5vo2ZfX4ZGRCHRrDHsABD8ll7fADV5w+Icgb55CtaBi89BqZdjm3nQ6/5AY7qJfvrOxO3KvCT6gw78a1VAb7TXl9gTjPSYEAmgvEQJw== 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)(3002001)(3231355)(944501410)(52105095)(10201501046)(149027)(150027)(6041310)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(201708071742011)(7699050);SRVR:AM0PR04MB4658;BCL:0;PCL:0;RULEID:;SRVR:AM0PR04MB4658; X-Forefront-PRVS: 0800C0C167 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(366004)(346002)(136003)(396003)(376002)(39850400004)(189003)(199004)(66066001)(110136005)(50226002)(476003)(486006)(68736007)(23676004)(956004)(72206003)(2616005)(26005)(6512007)(6486002)(53936002)(54906003)(2906002)(186003)(81156014)(81166006)(6666003)(2870700001)(8676002)(7736002)(107886003)(6506007)(386003)(105586002)(36756003)(47776003)(16526019)(5660300001)(305945005)(316002)(86362001)(3846002)(50466002)(478600001)(52116002)(97736004)(25786009)(106356001)(4326008)(8936002)(6116002);DIR:OUT;SFP:1101;SCL:1;SRVR:AM0PR04MB4658;H:iota-build.ysoft.local;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-Exchange-Diagnostics: =?utf-8?q?1=3BAM0PR04MB4658=3B23=3A5q1HtF6?= =?utf-8?q?SIewp06qHvulH5/O/uU62WDrxidCTPFoMTad9LX0GTNP136Grhnf1y3V8p07knJg9?= =?utf-8?q?Gy+bWLADPsShplz7btIHGDOy5br3Xp7LvEIPVp6IuEMwa5McRW0vONEJLKtHrmGjV?= =?utf-8?q?D1i8Hm3DCBPTZLEF6u0xFE+AhwVuYGaaItzJ4to9EixSk+by5h6E5rzHc1Rg/zl5L?= =?utf-8?q?u8UkFVmPp8pzwY13vMjbOwwALmEP8tWYNTQTf2GRq3GRs6ibMGjdWottTPBTCWt6T?= =?utf-8?q?VSP+0+AlndI4+vSjW5Jppo65X8U8wsQzej0z5WtJfK4OHYWznZH+roIepr5vOgJxv?= =?utf-8?q?1ZRsP5FHI51WFTdSuypKvSv1h5n7NZHmatUi7vBe95+o+eEF30TsFnCSlmu9BPRXl?= =?utf-8?q?YcvwRSz9jgqju595fY1b7gucLbQs7YWNABkRsd0rmeV7pR+QAi1QX9tRnM6Yt5rjq?= =?utf-8?q?hLHdsWQkvJg1M0tvBM/CwoizabJS5mQ7pTiPY0VeuU5wXhVQt4oXmhqEfYD/yRBYO?= =?utf-8?q?Eyriatkalt0H5EzeBE+/GOLUNDjOKyfL+kUn3BZdf/5XWFfTrqx9PYhzC8HsNxrUG?= =?utf-8?q?FEdS22+WqwonCx8gyQbR3M8uLQEkF0wNlsMj/hvJWUkVEjJKvXhwozRa/y4WKlOH8?= =?utf-8?q?IHC6/JXtA4v11PBWSNrCt8nYI/s2BzjiPbek/CnIeS6AYHy/9DKkKvyeGSj9L5lPE?= =?utf-8?q?joLL9yLMRxFrShViezEGNMKenKplbMSbzFfUIaD+niTW7IxXcA0J7oHlAV/x83mn+?= =?utf-8?q?IFqlYlphztDqBTYsD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ehETGawMFOS1+ec2v7GaKtuGz9zp2UgYeQrOt9triwivi0ZBm7cFm4eelRwOirR2sSdhtjxSSG1zx+iCjw6D+2tAs74gl5W3V6HrQrVWKk0mRzMGaaByWCHhpVgU0oXp+xDLal6C58rbWqzNKoQjhqqK4EwOA3sPhYDRx+b7gihiLUtr5Q7lOQddBA7LagSPgRUTG7JAPPpPd1yUnAc+eBc/JYPMXIUoiS/HZr5Sv5SQf44Hth3iBk1a7djQDIikdUBHj1sCIltA==;5:mjAQOcaXu0R8lLV+bcP3I01ltHsk0dU94zk1FTR7zMTH/A5/fk3XVznc7O6o0dJJZOV9LAWng57eoa4FZdU1u+yOzlTm3vtt60Hgaqg8vvRxkzpBBKPVOk9qq+DJKM1ouGvLNk+nPcgy/lk7K9QU6ijG6DhjyW3Ly9mF20rpA8M=;7:KO2bjK3QamUL1DtVqejhqclE3hdznER69lvDKyzvmZaGE2iBcXc5P/oEs/mcFQuXoe4+B7V6zESgRyzIoY7vpaQH7FR5JE1it0WYE43W6Y1ePeNeyJytgmhVgBpQCSIV4saNk5vX7ZXswhLWi0Bli3ok5ntHgNFT1JYD6kTRD37/D2fEnHbTGGOIZbHPBuety6J6eiIKy1fu8cOT/bvByoFThJ0eNzbISQjhxIQsrC+JgVD8tKHB/eOAXYpLWsEq SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: ysoft.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Sep 2018 09:19:01.5092 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9746b710-7598-4934-9d79-08d61e10f044 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: b5839965-430f-4be2-b282-d7a3149f2b37 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB4658 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 can be produced by GPIO expander that can sleep. In that case the probe function fails. Allow using GPIO expanders for the reset signal by using the non-atomic gpiod_set_value_cansleep() function. Signed-off-by: Michal Vokáč Reviewed-by: Fabio Estevam --- 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 ba66c02..e7ae135 100644 --- a/drivers/video/fbdev/ssd1307fb.c +++ b/drivers/video/fbdev/ssd1307fb.c @@ -728,9 +728,9 @@ static int ssd1307fb_probe(struct i2c_client *client, if (par->reset) { /* Reset the screen */ - gpiod_set_value(par->reset, 0); + gpiod_set_value_cansleep(par->reset, 0); udelay(4); - gpiod_set_value(par->reset, 1); + gpiod_set_value_cansleep(par->reset, 1); udelay(4); } From patchwork Wed Sep 19 09:18:44 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: 10605545 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 121E35A4 for ; Wed, 19 Sep 2018 09:19:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0370D2B515 for ; Wed, 19 Sep 2018 09:19:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EB6892B518; Wed, 19 Sep 2018 09:19:15 +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 7B3FF2B515 for ; Wed, 19 Sep 2018 09:19:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731147AbeISO4K (ORCPT ); Wed, 19 Sep 2018 10:56:10 -0400 Received: from mail-eopbgr30087.outbound.protection.outlook.com ([40.107.3.87]:52824 "EHLO EUR03-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730863AbeISO4H (ORCPT ); Wed, 19 Sep 2018 10:56:07 -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=SugdsQJCy9ufICdfFHxCAsXirR948j3vi9iZcCuwFSw=; b=U79PE6IwNLMAC5/RPsGDe8lyasbkI3YX8K7Tuitq6PGLNwoPzRmsJRmzISWNTcYeKSiM9lSIV7/WhnJ+54vr26F7JuxzEShdl9LZXuCpFTP2LV2MPR2bXxiufZOD7d2w/oYCMq/n4oADoqqW+ufyq6v5HeAmWPqiYF6TYr6TW1Y= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Michal.Vokac@ysoft.com; Received: from iota-build.ysoft.local (89.24.100.190) by AM0PR04MB4658.eurprd04.prod.outlook.com (2603:10a6:208:75::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 09:19:02 +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 2/2] video: ssd1307fb: Do not hard code active-low reset sequence Date: Wed, 19 Sep 2018 11:18:44 +0200 Message-Id: <1537348724-22976-2-git-send-email-michal.vokac@ysoft.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1537348724-22976-1-git-send-email-michal.vokac@ysoft.com> References: <1537348724-22976-1-git-send-email-michal.vokac@ysoft.com> MIME-Version: 1.0 X-Originating-IP: [89.24.100.190] X-ClientProxiedBy: VI1PR03CA0067.eurprd03.prod.outlook.com (2603:10a6:803:50::38) To AM0PR04MB4658.eurprd04.prod.outlook.com (2603:10a6:208:75::12) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 993a2ca1-0ae6-4d41-49e3-08d61e10f0b2 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(4534165)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060)(7193020);SRVR:AM0PR04MB4658; X-Microsoft-Exchange-Diagnostics: 1;AM0PR04MB4658;3:UPxWmmP4c6PZtYayMsD2WQxt+bVsamMtKE6wlw7Vrudix1YVL35QV/OYxZBL9ZAOaLJn0WJr/RnHZqzho0124RTyjAws2Klmx+Lg9IZNhwEJ9NL2UWVKt4Z3xy5BaMhyzftzj4/eHMJwxQ4ieKdR/GoxA81ESEy6p+QMP4mb6hCDPXTfYWosTmPqphU6mtgahO+2e/cXnO5eAXjmcoJt56H6pjLwQNAluHLuHb15SujF1jI25OCQBey8IYhCDiaF;25:k8rHdLN/TlkC/G0CFvLTkkmOzaQr32vwRFhyBI+xwYZYQQZOz2ILc2bDx+H1E9uiqWgTj2c2nrrNfYHc1NurAS5gDcu2bvDz5y/da4TRohLjGT0WahOxr2SkM1tFnOQ6xcjc2mEjgjURdRyLJO+hFNSd89favDICwCNrf/Di2tYxt4o5OlbsaF+l9Eqv0BhO34xYZvhU1pmXYf94gL3eis5s4O78u3Cb7rufDi+a38bU88l/toDD6fTBbKPMOsnwQq8vWn8Nu3R25yRX2X/wxJjuOz+lMtxPdsz357yZ0kHcpDyXHw0ZPdZ7Yu8AjFMbH6kYTp78W1OZ/CKCptuGjg==;31:ToKYHngSdt0ZWWuezAZUGEZIK1TRYJH9Bs1Q3G3v3hH+ndeT6U3o3+bv/JYwZsfIAEr462fwh7/XtESjMtcZK3xiLTka62mh2whxae/rv3DsM/hG63mayVYZ0hFiX3wcbniXie1lZe6pHQXfmrFCGaKBBHSmIWwnF3CWs3Txw/fDnYG8DP7XHxoI+9NrtP1oK1BUOFA+RJo8Ac616j6zjnw6ZDvUm96BANw5s6l2AhA= X-MS-TrafficTypeDiagnostic: AM0PR04MB4658: X-Microsoft-Exchange-Diagnostics: 1;AM0PR04MB4658;20:oipSOv6v36eTl/jHbkhruwWE4SrRg90MKDbvxyk/eFvbjjtZKqytd5Sig+0QvVQNTUDCaT62fi4LTvITt5Bsjhsy7mpY1Tmgy9jnty5uKHZ7gPyiBTOzw1rm/F5F53RC/dw/rG06U8RLubtaZPCA5tjR16KVoEUsv8jdcEdLvZK+zqnjHgkP3ZBaSnCSlb9U8euamJ4Pd4OrgqMf/F8jOETxIdtgNiY+z2zGC1jUuR7J8Gof+ehrND4dAyd601ig;4:D/IsaVJwq71DcVdiTENtOh9qbB6d7KNjlKmZxkKETslf/P4I2iuW/TfXu/jaxoAAU28mKXkFG0WivsUyb+uSr5+mRlBcPS9iK0vwP9BkWfysanUgW/NoeuCHRcT2qURkHZY8pJnkrAW6tBQTkBE7uxuYxmAO1J5jIQbeGnCnM0szElUK9nfqM0uMCwk6l4OBZMemZDDq0yvBpICmTkJemQVdsPJ/eAJNuY9GuOeqGPYNlblu6M6a+6nrWFT94lACIExuXsrYs9Bj1oZcwzHpRg== 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)(3002001)(3231355)(944501410)(52105095)(10201501046)(149027)(150027)(6041310)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(201708071742011)(7699050);SRVR:AM0PR04MB4658;BCL:0;PCL:0;RULEID:;SRVR:AM0PR04MB4658; X-Forefront-PRVS: 0800C0C167 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(366004)(346002)(136003)(396003)(376002)(39850400004)(189003)(199004)(66066001)(110136005)(50226002)(476003)(486006)(68736007)(23676004)(446003)(956004)(72206003)(2616005)(26005)(11346002)(6512007)(6486002)(53936002)(54906003)(2906002)(186003)(81156014)(81166006)(6666003)(2870700001)(8676002)(7736002)(107886003)(6506007)(386003)(105586002)(36756003)(47776003)(16526019)(5660300001)(305945005)(316002)(86362001)(3846002)(50466002)(478600001)(52116002)(76176011)(97736004)(25786009)(106356001)(4326008)(8936002)(6116002);DIR:OUT;SFP:1101;SCL:1;SRVR:AM0PR04MB4658;H:iota-build.ysoft.local;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-Exchange-Diagnostics: =?utf-8?q?1=3BAM0PR04MB4658=3B23=3AA/rB80N?= =?utf-8?q?shR/jYng13bYsqvwBpJM/2eamCTd6y7y5H131eXGRLbGOiEMCTyV5b6vv4keH7jF8?= =?utf-8?q?p00km1uZNPPGKlddc2v40w2zZbkT4qh0ziPiPaPchYU+5lah+xUnDyriB/orQrUf0?= =?utf-8?q?KPTaZ42iLQX8mCyU05gUG7X5RBSW/uk50rw/p3ZhZIT/9nQALe48PTF50RNZySReg?= =?utf-8?q?3xh+45EF41cTj+HVkmQzVo4IcPe+Rc/ArgD7jv7uJnydKEMoVKVp9OzG/Ny8/DV/1?= =?utf-8?q?HICJm6RWtM8k8sF/bWA5t0bdsK62xPiyFn4Auu5NhE+afhPt1VIPUws5zNlm7RUIC?= =?utf-8?q?pPu/FtiL6HW64KP/erbbugXaJdQSR4kYTNIa7iir179Q6MDY3XUc69f40aZLKc/LT?= =?utf-8?q?LwTbLJWweWmd/Zf5uv8vkkQ3fSHJ5QPetkx4moCU32t1EGb6n1F50N7OYo6pSyIaN?= =?utf-8?q?zEI8QX73sHfcECYaccQpUFfAiVxhewhI2cA6z5c3seYVKOlaXPdC9bxLai3QPiyJe?= =?utf-8?q?V2MvilrrMKDx4JGpw2w2EK90K0C39hmC1+tB68bAU/P2qpDcyeM6LAJWlbO/6xMCo?= =?utf-8?q?IBdWZ09jffTpK//5Uy2xdYzIqj1NHtT1gvcC4Ko3/98V4YMr0lip7L3GQoqk5gZoo?= =?utf-8?q?XK1qusiSoEA3rDNAsGzOLyRPd7xq2ekhUWWJhzevKGaYCDfTjeur7NxkHe7RO01Eg?= =?utf-8?q?TA6+3A+R0PZBmBMVJWFNHqsSybb9j0XOdZ+EjFXow+jIUg5u6MiMPiejLCMsa8S38?= =?utf-8?q?e1NUY9DxPaqECe4i2xO7YwfxraWjUSx2uOhKd6eTp1jqtdgql/r80+ZtxthtCs4lv?= =?utf-8?q?USE6TXVFuQuZNngVC2FYqBI5NQ9wmSUubK8lFmQ+kpW6x2KbHFvCEppAoTIXcz+u2?= =?utf-8?q?tNe8OiYVt930ggL11NNe6aVlNYI4H+ABaqL8b3zl5EnoBnQUvET7yPZMr781ozLhr?= =?utf-8?q?voaryUZLGRRRfTW5t+cBzP2umo5GuMhPQeEZmVBLPPC0DB51bLNXhiuhrXnzynmms?= =?utf-8?q?zCO2u5zioZ99QSkepGZYgNMTb1RrDirTbyOROFo7MwsV9piCy0qVUojMqR3xslcTn?= =?utf-8?q?ci+vPoN1JpWvRs34L/d/pM1i3XC1TNbeqsO113p5IEwMuArvxYEbWAsmvWxtsl2v1?= =?utf-8?q?NXnejcNqTd1RO+vFs/tfQPncPwDBzdF37WTJMMyIACIkoln1moJBzt72iqOXw=3D?= =?utf-8?q?=3D?= X-Microsoft-Antispam-Message-Info: E4THhC/Vg+RJIF13xKjNKLij82v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waOTHTkooiDwU+6fpX/gS2vEqfVkJ+csWMwZTi7KEjp2GamkSGw9s9BGccUKMLDoDtJwsxdwWIl25ptU89cQxbAtqi7+M7V9rK2Kb4tSYOCTwDRSMZjCSVY7ruAjdWvmJm7Sn+Ic/gJ0uVUycFJN2c1cCH2Ml3C6BglGKGPSmE5iU4z8C8+ksmgo6LgIswWzJMOH0uHDjdOv SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: ysoft.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Sep 2018 09:19:02.1811 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 993a2ca1-0ae6-4d41-49e3-08d61e10f0b2 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: b5839965-430f-4be2-b282-d7a3149f2b37 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB4658 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. The only single in-tree user of the display is converted and builds fine. Signed-off-by: Michal Vokáč --- I am not really sure wheater this should be in one commit or the DT changes should be done in separate commit. Just tell me and I will split/merge the changes as you want. Thanks. arch/arm/boot/dts/imx28-cfa10036.dts | 3 ++- drivers/video/fbdev/ssd1307fb.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/arm/boot/dts/imx28-cfa10036.dts b/arch/arm/boot/dts/imx28-cfa10036.dts index e54f5ab..be3406e 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>; 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) {