From patchwork Sun Jul 16 22:56:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 9843731 X-Patchwork-Delegate: bhelgaas@google.com 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 C10CD6037F for ; Sun, 16 Jul 2017 22:57:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B3986269A3 for ; Sun, 16 Jul 2017 22:57:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A84A426E5D; Sun, 16 Jul 2017 22:57:07 +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.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM 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 2E69A269A3 for ; Sun, 16 Jul 2017 22:57:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751276AbdGPW4w (ORCPT ); Sun, 16 Jul 2017 18:56:52 -0400 Received: from mail-qk0-f195.google.com ([209.85.220.195]:34512 "EHLO mail-qk0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751221AbdGPW4v (ORCPT ); Sun, 16 Jul 2017 18:56:51 -0400 Received: by mail-qk0-f195.google.com with SMTP id q66so18811154qki.1 for ; Sun, 16 Jul 2017 15:56:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=9E2od+6kyXolIW38qalo2MY58Hit1uVAXte0eHeKflc=; b=gsgu3fZ6pMMvd/62nrcNpG6v5XO7FXSgF87lP5U6vAYuUNnJmi2t6+7XwgVb1bH6UT PpWxbWfvuhIS4NI0O3wGm/S/VBSWhY6J9mlYuKN+FBkx2o5cJDpJ9vqDCOtMAHjyLqL4 HHaJ5G6+W4Hz5yb2fFq6e4dPPHcq1RfOQvigeoJrLzKz35pwA685pWfFqcvJI2HpFE80 QprOx1qxsGIuBtMDQ1Ne5z23awuuQoJP4egAXqusM+lUUAhbKrTkIn+8vw2MvG36I+Dl eC3GlsDs14W3WcehQJhjvkl+y48zONmKuEWZesKHlLwnCZz4vbbCkQe9yI62uJfn6CAo OrvA== 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=9E2od+6kyXolIW38qalo2MY58Hit1uVAXte0eHeKflc=; b=OzaUh/+YUXpzCPewXj6kwvM0blwoY/9zynNIWPcNHzczNyXtLUs1WWLnanp4ZGEfhl i6gOj7gzjdAqqwIgq3moHcUfmQBtLdf0RNZGW4/KBd/AN3ExIMPeWXTSG2tU3jjYBigJ RDSwSbBVIngZIDX/IKMNsSZp1tThyfCQkqo34pWT53TLCWLFLXcFORWztyS/SJAgkr48 c0dCx6f9A180gPTXW71DPeuEcY8t8YNpGH0oXniBKP9ENqcNK5cwzI6C6POQ5YcDfdmf JoOoNXhIdI6pYEUPd/5ojEheIxddZL5CiLhHO04aoeKJBfyzNxBktwrLWCIXdcMxVGmX OXaA== X-Gm-Message-State: AIVw111p7c0mGs4lvCXdHyjnHRcKklTYtWbAxtuutQu++0uGm7vXbIoM FEPlVEXmEhiyoA== X-Received: by 10.233.223.68 with SMTP id t65mr6605913qkf.122.1500245811044; Sun, 16 Jul 2017 15:56:51 -0700 (PDT) Received: from localhost.localdomain ([187.180.181.24]) by smtp.gmail.com with ESMTPSA id n21sm11657776qkl.51.2017.07.16.15.56.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 16 Jul 2017 15:56:50 -0700 (PDT) From: Fabio Estevam To: bhelgaas@google.com Cc: svarbanov@mm-sol.com, linux-pci@vger.kernel.org, Fabio Estevam Subject: [PATCH] PCI: qcom: Use gpiod_set_value_cansleep() Date: Sun, 16 Jul 2017 19:56:38 -0300 Message-Id: <1500245798-20886-1-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Fabio Estevam The reset GPIO can be connected to a I2C or SPI IO expander, which may sleep, so it is safer to use the gpiod_set_value_cansleep() variant instead. Signed-off-by: Fabio Estevam Acked-by: Stanimir Varbanov --- drivers/pci/dwc/pcie-qcom.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pci/dwc/pcie-qcom.c b/drivers/pci/dwc/pcie-qcom.c index 68c5f2a..8359de0 100644 --- a/drivers/pci/dwc/pcie-qcom.c +++ b/drivers/pci/dwc/pcie-qcom.c @@ -141,13 +141,13 @@ struct qcom_pcie { static void qcom_ep_reset_assert(struct qcom_pcie *pcie) { - gpiod_set_value(pcie->reset, 1); + gpiod_set_value_cansleep(pcie->reset, 1); usleep_range(PERST_DELAY_US, PERST_DELAY_US + 500); } static void qcom_ep_reset_deassert(struct qcom_pcie *pcie) { - gpiod_set_value(pcie->reset, 0); + gpiod_set_value_cansleep(pcie->reset, 0); usleep_range(PERST_DELAY_US, PERST_DELAY_US + 500); }