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); }