From patchwork Sat Jan 7 00:18:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Schmidt X-Patchwork-Id: 9502519 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 27457606B4 for ; Sat, 7 Jan 2017 00:19:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1A68828541 for ; Sat, 7 Jan 2017 00:19:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0F4BE28546; Sat, 7 Jan 2017 00:19:13 +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=-6.9 required=2.0 tests=BAYES_00,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 BC74B28541 for ; Sat, 7 Jan 2017 00:19:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S939700AbdAGATM (ORCPT ); Fri, 6 Jan 2017 19:19:12 -0500 Received: from proxima.lasnet.de ([78.47.171.185]:57034 "EHLO proxima.lasnet.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S939557AbdAGATL (ORCPT ); Fri, 6 Jan 2017 19:19:11 -0500 Received: from localhost.localdomain (p200300480940B0489A8389FFFE20FF3F.dip0.t-ipconnect.de [IPv6:2003:48:940:b048:9a83:89ff:fe20:ff3f]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: stefan@sostec.de) by proxima.lasnet.de (Postfix) with ESMTPSA id C9DBAC0836; Sat, 7 Jan 2017 01:19:09 +0100 (CET) From: Stefan Schmidt To: marcel@holtmann.org Cc: linux-wpan@vger.kernel.org, Alexander Aring , Andrey Smirnov , Chris Healy , Stefan Schmidt Subject: [PATCH bluetooth 4/5] at86rf230: Allow slow GPIO pins for "rstn" Date: Sat, 7 Jan 2017 01:18:56 +0100 Message-Id: <1483748337-4862-5-git-send-email-stefan@osg.samsung.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1483748337-4862-1-git-send-email-stefan@osg.samsung.com> References: <1483748337-4862-1-git-send-email-stefan@osg.samsung.com> Sender: linux-wpan-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wpan@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Andrey Smirnov Driver code never touches "rstn" signal in atomic context, so there's no need to implicitly put such restriction on it by using gpio_set_value to manipulate it. Replace gpio_set_value to gpio_set_value_cansleep to fix that. As a an example of where such restriction might be inconvenient, consider a hardware design where "rstn" is connected to a pin of I2C/SPI GPIO expander chip. Cc: Chris Healy Signed-off-by: Andrey Smirnov Signed-off-by: Stefan Schmidt --- drivers/net/ieee802154/at86rf230.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ieee802154/at86rf230.c b/drivers/net/ieee802154/at86rf230.c index 46d53a6..76ba7ec 100644 --- a/drivers/net/ieee802154/at86rf230.c +++ b/drivers/net/ieee802154/at86rf230.c @@ -1715,9 +1715,9 @@ static int at86rf230_probe(struct spi_device *spi) /* Reset */ if (gpio_is_valid(rstn)) { udelay(1); - gpio_set_value(rstn, 0); + gpio_set_value_cansleep(rstn, 0); udelay(1); - gpio_set_value(rstn, 1); + gpio_set_value_cansleep(rstn, 1); usleep_range(120, 240); }