misc: issp: set dat/clk as input and don't free them
Richard Zhao [Mon, 15 Apr 2013 06:25:40 +0000 (14:25 +0800)]
On tegra, when gpio_free, it switches pin to sf mode. It may have
output noise. So we don't free them and set to input to avoid side
effect.

Bug 1269993

Change-Id: I3164a2cca500959a797c614a324b1519970b4527
Signed-off-by: Richard Zhao <rizhao@nvidia.com>
Reviewed-on: http://git-master/r/219293
(cherry picked from commit 24a626c426556b0f088b288d60d6a3fb9ba3a573)
Reviewed-on: http://git-master/r/244255
Reviewed-by: Tao Xie <txie@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

drivers/misc/issp/issp.c

index 0001c77..da357dc 100644 (file)
@@ -196,8 +196,8 @@ err_id:
        issp_uc_run(host);
 
 err:
-       devm_gpio_free(dev, pdata->data_gpio);
-       devm_gpio_free(dev, pdata->clk_gpio);
+       gpio_direction_input(pdata->data_gpio);
+       gpio_direction_input(pdata->clk_gpio);
        release_firmware(host->fw);
        devm_kfree(dev, host);