From patchwork Sun Dec 18 23:25:33 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Smirnov X-Patchwork-Id: 9479423 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 3EEC360237 for ; Sun, 18 Dec 2016 23:25:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 23D1B2846E for ; Sun, 18 Dec 2016 23:25:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 14F2D2847C; Sun, 18 Dec 2016 23:25:56 +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.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID 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 C06BE2846E for ; Sun, 18 Dec 2016 23:25:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752051AbcLRXZy (ORCPT ); Sun, 18 Dec 2016 18:25:54 -0500 Received: from mail-pg0-f68.google.com ([74.125.83.68]:34777 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751617AbcLRXZx (ORCPT ); Sun, 18 Dec 2016 18:25:53 -0500 Received: by mail-pg0-f68.google.com with SMTP id b1so6367780pgc.1; Sun, 18 Dec 2016 15:25:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=dZj6OxxZKPLW5XvqBOi13CGrYgovCZF6NZeaY/5NgfI=; b=eCHndnLfWgE9/Bj8fHzOECakkYsBLgt9T+ghSDeRjQFd1+RqUxVgvejYj6JVC1WlsM hkGR6oIUcX9rGgC7Ffl7v/lz5zyVYJ7wQkeyEN3puHedByyT2QPYByZgiI/3vV6xFto4 /Be4z+HLBMOudbgSWDG7fYtESA52rZTb0SOlFWBNhN5+Am9BIKm3XAN2+QpVf+eQgdVN f0AaDUZvRn/rMcWoRgT7HkSAqngvIlAF9Ew1ANK8KRN19znuqeUOxqfjY/bv3WLy/k96 uO7MNpTehMeVK7kGt4lrTlln5EfKbqk2CtAtIUEj4HIADmrunc4Q5CDHrUEe37OAwX7c 9d2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=dZj6OxxZKPLW5XvqBOi13CGrYgovCZF6NZeaY/5NgfI=; b=qR9A6I5P+M+kybEavXEoPb2fYQqLjTyjobFYFj1cLW9E7OY4msDhIm3DlRr/r/S9q4 APU+Bd110vile06z1cq5gv9zI1otXO4Z1qj+kR/F3CaL9K6aJ6nIAGupqL2a6Ve3KGZ0 Wmo+UzI9SBWVPDzORLNAG+af3vgTyfuYYgDTh+nQGJtV+bGze6MzKAZ2l2RzMOflrnQi 6VIExLPej7pvhzm3Y4bD18kXS/4Nh+JuxIGWKooGGnc6uhgPFkcfIBc19J8vyoWkeiAY p7n6VEx/EdCNym6ZB8G5A56jjTQGg6uBZLY7e0Z+/LTMa/IXe7R29BtUsZybmw8NYn44 jEdA== X-Gm-Message-State: AKaTC02qczM9UOcneQvc4dzuigZZxOkYKmujNLAWPlw+o4zE7wi6mJk8ob1vz4K0BxOC2g== X-Received: by 10.84.142.70 with SMTP id 64mr29088112plw.177.1482103552267; Sun, 18 Dec 2016 15:25:52 -0800 (PST) Received: from squirtle.localdomain.localdomain (c-73-19-0-61.hsd1.wa.comcast.net. [73.19.0.61]) by smtp.gmail.com with ESMTPSA id v82sm26308218pfi.6.2016.12.18.15.25.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 18 Dec 2016 15:25:51 -0800 (PST) From: Andrey Smirnov To: linux-wpan@vger.kernel.org Cc: Andrey Smirnov , Alexander Aring , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Chris Healy Subject: [PATCH] at86rf230: Allow slow GPIO pins for "rstn" Date: Sun, 18 Dec 2016 15:25:33 -0800 Message-Id: <1482103533-13187-1-git-send-email-andrew.smirnov@gmail.com> X-Mailer: git-send-email 2.5.5 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 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 Reviewed-by: Nikita Yushchenko Acked-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 9f10da6..7700690 100644 --- a/drivers/net/ieee802154/at86rf230.c +++ b/drivers/net/ieee802154/at86rf230.c @@ -1710,9 +1710,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); }