From: Fabio Estevam Date: Sun, 16 Jul 2017 22:56:38 +0000 (-0300) Subject: PCI: qcom: Use gpiod_set_value_cansleep() to allow reset via expanders X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a8c2038f615ac522aa9eb55dff1b7979bef0f794;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git PCI: qcom: Use gpiod_set_value_cansleep() to allow reset via expanders 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 Signed-off-by: Bjorn Helgaas Acked-by: Stanimir Varbanov --- diff --git a/drivers/pci/dwc/pcie-qcom.c b/drivers/pci/dwc/pcie-qcom.c index 26e84a957c35..e0654c01ca19 100644 --- a/drivers/pci/dwc/pcie-qcom.c +++ b/drivers/pci/dwc/pcie-qcom.c @@ -142,13 +142,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); }