From patchwork Wed Sep 19 13:17:27 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: 10605841 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 BE5EC5A4 for ; Wed, 19 Sep 2018 13:18:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ACA6E28EDD for ; Wed, 19 Sep 2018 13:18:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9F7992AE9B; Wed, 19 Sep 2018 13:18:05 +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 72FCD28EDD for ; Wed, 19 Sep 2018 13:18:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731819AbeISSz5 (ORCPT ); Wed, 19 Sep 2018 14:55:57 -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 S1727820AbeISSz5 (ORCPT ); Wed, 19 Sep 2018 14:55: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=xzzP3s4zv9uo39viQvBHereT3Xa3zHL99HdEb0Z/qJ4=; b=E01MnV6CMgQrPv6xJnM6ekVfdjMY594Crn37/1QaUSBMUw06sXcbG8dlVxUewygiG55hEYBKhvuw5sJHe3+jNBSZjVCh+hvn0AcX6fqb7mAVFDVMdpaKh8q5HalrSXUatuz9HRqvmAsCE36xCJfTnF6SNEbKjgZsDUyuohM2rK4= 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:58 +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 1/3] video: ssd1307fb: Use gpiod_set_value_cansleep() for reset Date: Wed, 19 Sep 2018 15:17:27 +0200 Message-Id: <1537363049-48399-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: 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: cd29e52f-2663-44f8-dbfb-08d61e325216 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-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ltlL/uoamensUkr09bh4Hf70OznSISDZ6kbO16P/WwUHK9LRTv645Hn1S7wrew6hTLcL2r4vgXA0cHzuHaan/M/S1LhicqpCUoRO4+/oakq;4:PepMrHtlVimgt4UjqSSbmIW0a8Zysyc3saDU7rXp9eqlciuVzxafPiSMXgbc9msKF9oYKyxP+hZxckniBA1XLtf0NcfTimfeXDBDQb+eYG63XMO+bR+obRYvYSaVKO6ZgQxj5uSOTpYThthIizR/kSj2sLgAz+IBKnwa59QUPYJ1WZfknpnBWHjO2wCn2nkkozjNxVvofvWLQtxOtinCHfswUhj0FQwMNweIz/E7zIy2TrZ07vCAS4I80/GmYk5CjcOQ1jmCmAsCFcUntgrmXg== 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)(956004)(107886003)(4326008)(110136005)(6666003)(23676004)(16526019)(25786009)(72206003)(478600001)(54906003)(2906002)(6506007)(386003)(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=3AiWFao8q?= =?utf-8?q?gKpGNkjrbSElhdqbW4OmFFp5HG2O+c1IVwxbBcO3YcZhigtvPF47IHrgwBTW6Vhor?= =?utf-8?q?IheGGJcmnsZ1Mme6t7b4wohmULKM2RNvo/IpK5z5Wu3ywdDhL1EgNqENqDE7thtvU?= =?utf-8?q?K6JqGn8tGRbcXTuOKvQzKexbbksV3Nl2TCzhjLfaU16WChza2vvgYraOwVxIRGNMa?= =?utf-8?q?NgtbIlDgMdR6l7xWGQ6Szp+VLarX4OplIjmuQkV8h41Izjwq2SQsVVCYVf7K9ljuk?= =?utf-8?q?XPyYjcjUqtbkBYyGpY6udj+J1P0/5zmHceg2+4xn+4ILKSGSl1QUi7BCUN5DV4o7X?= =?utf-8?q?RpPF0qj493aQIrHg3TG5wNjY1JyXUWtjug9CkHFMvSWOH6L5XLaq6tm9KN6dMwbev?= =?utf-8?q?a7jyMaEW1yn2HxzOXkxhJ+8XtGGemtRE4Ot6fx9Phk4qT7EpkTpj/QxIAgVtRBaC1?= =?utf-8?q?kyti5VE7DKdQ70Jl1MqPCy0Zi3KS9+nM5LesANqSvZQ9C6kGn5JFQFSsLTKW59Y5t?= =?utf-8?q?JArOIXjXLMOS6z5Zk7gjkBO9G3fo7oDq6YrVsOSuUSz7zLwsPWCyo3y9vIcY2V1QA?= =?utf-8?q?zyFi37u/oBVT2c12376Ef9t9Km2M0nSKk9kxcdVEtaU41/3ErpYcS4SMjUudHy23w?= =?utf-8?q?vJDnU22+wO9tRdtoJ+UMtkPuGrRjkE6rfyzV/0ORqkosGwqyuZ4fVslWvgaLtfhkj?= =?utf-8?q?eEol0ufm/eYMfsFX2CMIKXmv+TfLYYZco/HGRWW5l5WCG7Qpp1RAfB3t1sxGQ93dh?= =?utf-8?q?3KA+bu1HX7zV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JQaPRmLZaTPbr9O/nZPaYyB57pwYMFlqp2VRiSekRObYq632QsEu/65WUeOQDiVLpdLI2YC0CoEcOSgnikrD4UQFhEfY/IRRd3RGfV1UKijTGR+kbQzKkq01f5aScQVyAbGtNTKn3zQDAhj7xSY6xx1tyBif/UkEhVK7N8zcxV8vJod4TuhCAUj9hnsMFlW1Mu97xQLfhZiZSkOmb8mwdr4LOoLGZ7i/RgFXwgP5b3Bj32UsQLYO9VV4geVY5XWDtRgzbXYzJlLA==;5:6x1ierYwCfbKTARDgX/plT4lXzCfzfOqWn53sYHWzbtXCFOEZ79tPXvXCGjuB0O/4+KkH9/JgInBVZuBmBV4Y+hHYoxfUfhnoxh2b68/6BJ4BIcNt43SLPoxn6gtpP6RA1zwabvmoWbwCDxbZ5mqhtBn/BD+opVDWeFIHzcyW/8=;7:rggWoRBreWDOn8XIj8n+tWaGOWkP+Dg4wUCfBznEwctHc6nF75kY3DGPFLHnmdEHo3CQw9f5ytWV13ZQ6Tsol+v0uJfwPafkINThiuSBWAAyZeV/yfeK8PXyxovdtBTpk5g44nx7c4tJGZWWTbm68Ei/cqjQQz5Wfl/mdniCudbPSXeDW1oEqT0+JsC9BWWZmHQoSJDXv2PFcBy6IkQXLif4Fx3OHJE6m40E2K+7XaIX4qfeVeaRxZLVHt0dIEQK SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: ysoft.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Sep 2018 13:17:58.9713 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: cd29e52f-2663-44f8-dbfb-08d61e325216 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 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áč --- v2 changes: none 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); }