From patchwork Thu Sep 27 09:24:39 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: 10617727 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 CD32814BD for ; Thu, 27 Sep 2018 09:27:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BE3D62AFF0 for ; Thu, 27 Sep 2018 09:27:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B20922B04B; Thu, 27 Sep 2018 09:27:38 +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 D34222AFF0 for ; Thu, 27 Sep 2018 09:27:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727502AbeI0Po5 (ORCPT ); Thu, 27 Sep 2018 11:44:57 -0400 Received: from mail-ve1eur01on0050.outbound.protection.outlook.com ([104.47.1.50]:48730 "EHLO EUR01-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727505AbeI0Po5 (ORCPT ); Thu, 27 Sep 2018 11:44:57 -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=2BMra5JZUXtb9QzesBMf7k9W7rBPAYVPPOX4dQm3LJ8=; b=1Z03YufONm2KvExIdcoyMUZYY0QmNWrhZzjLEmco4Ix3FZMGzZwKDK0Pn5efP4g0sl84Rh7/HiqLayC3TTFsZ+TygTf9wrVGhF4Ej1e6Cg2kkT4vTSJ+b9vS12UbcowSVJtdwCvpgjYFg6sparShgaqvM0jnNejo/XmvRyNHAfk= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Michal.Vokac@ysoft.com; Received: from iota-build.ysoft.local (89.24.100.190) by AM0PR04MB4660.eurprd04.prod.outlook.com (2603:10a6:208:75::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1143.18; Thu, 27 Sep 2018 09:27:30 +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: [RESEND PATCH v2 1/3] video: ssd1307fb: Use gpiod_set_value_cansleep() for reset Date: Thu, 27 Sep 2018 11:24:39 +0200 Message-Id: <1538040281-21319-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: HE1PR05CA0360.eurprd05.prod.outlook.com (2603:10a6:7:94::19) To AM0PR04MB4660.eurprd04.prod.outlook.com (2603:10a6:208:75::14) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9dab4e8e-82ee-4be5-929e-08d6245b7365 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(4534165)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060)(7193020);SRVR:AM0PR04MB4660; X-Micros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tHtKIrXO/B+GMN3gMP3f0LLaQz26kpO19cLZyWZregIImOMfxz5dhlhwBL9Y683wXQS5r88Ddgjb6mE7YNQ4BkgawDRjLyCBjzGs88DFuHS4wqbCOHzuBZb+YtWEpvTnuuzKzi;4:hRwViQrChsVJnZKwyp6nADhWBEweIRsGtFE50JeP1hVWWmQB2hqxql7UpTEI+ae/z9b6Yy/WJGepG+6R45d+5A3L2cJn2NEj43e97EpoXovbmbggB/0BUyXoi/Ywe8HRDNVuJGXAZU2u9OBCWcI9thld9yajJU7kYsCPLvynr8x9CDdrseFlrnnWUwhrN1g5WktqrrL9NOv7ho5l/9w1TrTwdnpk6A32+DT3YmO5zn0a21JamjSgV+1JFhQXGqoOpk4FN47MRhrC+AS+EIkkLRxVEDQur2vroAoCzHu6r7Wz6STAWLw1q8kdlo/wVbLu X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040522)(2401047)(8121501046)(5005006)(10201501046)(3002001)(93006095)(93001095)(3231355)(944501410)(52105095)(149066)(150057)(6041310)(20161123558120)(20161123562045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(201708071742011)(7699051);SRVR:AM0PR04MB4660;BCL:0;PCL:0;RULEID:;SRVR:AM0PR04MB4660; X-Forefront-PRVS: 0808323E97 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(376002)(346002)(136003)(366004)(39850400004)(396003)(199004)(189003)(6116002)(3846002)(26005)(476003)(97736004)(2870700001)(81166006)(81156014)(8676002)(486006)(86362001)(316002)(8936002)(72206003)(50226002)(2616005)(186003)(956004)(36756003)(16526019)(53936002)(2906002)(52116002)(6512007)(23676004)(47776003)(305945005)(217873002)(50466002)(478600001)(6506007)(386003)(107886003)(5660300001)(106356001)(66066001)(54906003)(110136005)(4326008)(25786009)(7736002)(34290500001)(105586002)(68736007)(6486002);DIR:OUT;SFP:1101;SCL:1;SRVR:AM0PR04MB4660;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=3BAM0PR04MB4660=3B23=3A85btynh?= =?utf-8?q?ah7yfTikQjqLeKUVAW52uxczctysA6X3OUHRbnMPqID0IYmlAMT672hTVBmPmt6ZH?= =?utf-8?q?+72N57aA5Bwj6foU8tNi5Px7ywNWF0oc0v5j1lDbg9IbZQBDPYQZwjHIu04JYn2UB?= =?utf-8?q?Re9EKvTK07xBlva3KnBtgfNHtcUvv5oE0/9yTx2/3e0VRdhNt0E/vTtWDHdiQqznL?= =?utf-8?q?grkBnw2323FLqLYAfr8T9jI8YbsDprLijTbahzHAJkPh3yoaPyHKBeSe661SpoqPI?= =?utf-8?q?ToHSH3MNJ8TLFjotJ2ySHVipuan7sextwDxwdKPjArhcDCinubAjzhuhVIGtcU+Wr?= =?utf-8?q?LjLNHmm7f0lfl6ickytNHFW0ci1xhj+Hj+c+Xgb2QpGIGzOrPk3/SenHPdO4LOkYO?= =?utf-8?q?y76ALWl8lU7NqOhJJnf22nmP3gWcFqJdz82bIodu6iPaz+rpw0O8fQfXWF4/RiA9N?= =?utf-8?q?XLSystJ7Uub57IzmJUX8f8ZDYw7dSDS9WG4xMSP9c1PNyW4APs5nZiIYKWufBYOyA?= =?utf-8?q?W9eNqoCOkTJCmcCMZeOfnHokhfFdCd1rwm5zjv0cIRdw2f8oKEA6FBpRuRoocSwHK?= =?utf-8?q?Jf3XLm4xBEyVk1zylF7pWOKhg3RkUcR0X+q5ta1qmmPv+Q/qV0HWWDD2MDJisMWXD?= =?utf-8?q?9mjPwmQDvH7e4oB71IsYHA/MThqrpkUZtK3KMgcJyPbW8lmBpTQBlAsLWBx6xhCyj?= =?utf-8?q?SM1vKUZDHC7NyJXOhJcf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bLloUkRLGXwELpA9Sanky7W/ivMtMymSDIbQvnPj1m7mw1fuRO20hrZDXVu4ys75CuFzIhwP5fz2p2c8M/+lVlm+9ZQi/St7u1RairesG41NJ9ifhQIK4Myhvf1xESsV91RsFINbj59fer2jrA76KcFMnoE1uBVYOYN0Opl3Vw8QKiPK2USdU9ic4NOy230UIu1Ody3r3uXtsrvvx1+A2cHOZWiN2oPt+yWdK9iKKV6DMn+omKe1rHAtgdfbJjh1dY1gTyQADVD2WuB90ZeNF6yxcZA6aTzFNSkhP6RWzyMwgibVlYPa0EbXsLb+XKXimEouNB03oADQ0xQuVnJM3gK23RTDh0Oq5Nlwf4u3QXd2yQ==;5:h1X+vfKwuAXJMzaN7khP0nNROrxBqYcFPKrqCd3qm7/Lf1HDiqvi4aL57ditJRHPpIiEstHvFldnfdya82wPP3EVSshydo6eI1YpP9j6MeymdfRsdTk0Wc39vZPGEzDjoD7Z1R0Z1ievEJHoi9XiWEqpPvZjMgGEvMq2O17/iE0=;7:rs5EyX8IEvlCcRaWVlAQ8ne5T34OQHtxsyO9+oPIma/4407jgw0wAvuFmcgUxJgodhBDif0Lgj2tYVkcIU+lLx3z1IROUk1vXeosaXmiVJh8ZAEW8qnCc7gs3vnkawDCd5xaoT8sBw/Sb9PLI3EvX3SjHEVnYHRuhWCL/bC0oY802hRl1OqTZRoSkeyKimyeIZyu4QkUaY0T0qZxBEQzSd097i9HDQjTBvvkqSK1ZL13dSCrzTKEI10JQdw486FE SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: ysoft.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Sep 2018 09:27:30.8195 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9dab4e8e-82ee-4be5-929e-08d6245b7365 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: b5839965-430f-4be2-b282-d7a3149f2b37 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB4660 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 --- v2 changes: add R-by from Fabio 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); }