From patchwork Tue Oct 27 23:41:58 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 7505361 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E25DE9F399 for ; Tue, 27 Oct 2015 23:42:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 206692092D for ; Tue, 27 Oct 2015 23:42:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1622C20927 for ; Tue, 27 Oct 2015 23:42:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753617AbbJ0XmN (ORCPT ); Tue, 27 Oct 2015 19:42:13 -0400 Received: from mail-vk0-f49.google.com ([209.85.213.49]:35506 "EHLO mail-vk0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753402AbbJ0XmM (ORCPT ); Tue, 27 Oct 2015 19:42:12 -0400 Received: by vkfw189 with SMTP id w189so131516333vkf.2 for ; Tue, 27 Oct 2015 16:42:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=JV5u7MYI1oV0WpX3S5DYo0wBuijLhqnsI1QXkXhHJFw=; b=doUjaFaaOhsgj6TuI2U0syk981w5cyO00t8qrv8hlY4aWZ5eWpiNpjT7RRNjixn85T af66rzA7TiIJNA7WQQU6ilufbLyaa9OUkrmOY8Q2mzgY/vAGIYxH1IELgF9KL6cMl7gI 5mMs9mX0/VwrhnON39wtmx+qjrQqn/zmg53MvB+g4LT1138YmjHMccLaNZFMed8JlDnS ZfXgJrhnV3i4ZKDEFxLsk7UHjs64ALId821TTNbvK+BFMfEIyQUwilMC4hlN6tdShG15 +V6pwwQHDev2uksiIKi/fUaieL/2OLqm5gMwWEjfAJhXlHV18tDNOJRRRDer1cXkep58 VD3Q== X-Received: by 10.31.137.11 with SMTP id l11mr11308482vkd.38.1445989331892; Tue, 27 Oct 2015 16:42:11 -0700 (PDT) Received: from localhost.localdomain ([179.159.5.130]) by smtp.gmail.com with ESMTPSA id 133sm9492527vkf.9.2015.10.27.16.42.10 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 27 Oct 2015 16:42:11 -0700 (PDT) From: Fabio Estevam To: bhelgaas@google.com Cc: l.stach@pengutronix.de, linux-pci@vger.kernel.org, Fabio Estevam Subject: [PATCH] PCI: imx6: Use gpio_set_value_cansleep() Date: Tue, 27 Oct 2015 21:41:58 -0200 Message-Id: <1445989318-26461-1-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Fabio Estevam We are in a context where we can sleep, and the PCIe reset gpio may be on an I2C expander. Use the cansleep() variant when setting the GPIO value. Based on a patch from Russell King for pci-mvebu.c. Signed-off-by: Fabio Estevam Reviewed-by: Lucas Stach --- drivers/pci/host/pci-imx6.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pci/host/pci-imx6.c b/drivers/pci/host/pci-imx6.c index 6f43086..e73b7f2 100644 --- a/drivers/pci/host/pci-imx6.c +++ b/drivers/pci/host/pci-imx6.c @@ -289,9 +289,9 @@ static int imx6_pcie_deassert_core_reset(struct pcie_port *pp) /* Some boards don't have PCIe reset GPIO. */ if (gpio_is_valid(imx6_pcie->reset_gpio)) { - gpio_set_value(imx6_pcie->reset_gpio, 0); + gpio_set_value_cansleep(imx6_pcie->reset_gpio, 0); msleep(100); - gpio_set_value(imx6_pcie->reset_gpio, 1); + gpio_set_value_cansleep(imx6_pcie->reset_gpio, 1); } return 0;