diff options
author | Vaibhav Hiremath | 2016-01-26 02:53:29 +0100 |
---|---|---|
committer | Greg Kroah-Hartman | 2016-01-26 05:08:55 +0100 |
commit | d8b16338df9bcef1fa0a047bd3e8d2e922dc5bb8 (patch) | |
tree | 2a103a69e022c622963e2727df1e2f8390b48d76 /drivers/staging/greybus/arche-apb-ctrl.c | |
parent | greybus: camera: Stream config change unipro speed (diff) | |
download | kernel-qcow2-linux-d8b16338df9bcef1fa0a047bd3e8d2e922dc5bb8.tar.gz kernel-qcow2-linux-d8b16338df9bcef1fa0a047bd3e8d2e922dc5bb8.tar.xz kernel-qcow2-linux-d8b16338df9bcef1fa0a047bd3e8d2e922dc5bb8.zip |
greybus: arche-platform: Disable clock as part of driver remove
As part of driver remove (cleanup) function, disable the clock for both
SVC, APB1 & APB2.
Testing Done:
Tested on EVT1 platform with Connect=>disconnect=>connect
iteration, almost close to 100 iterations have passed (demo branch).
And also tested with kernel-only build.
Signed-off-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/arche-apb-ctrl.c')
-rw-r--r-- | drivers/staging/greybus/arche-apb-ctrl.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/staging/greybus/arche-apb-ctrl.c b/drivers/staging/greybus/arche-apb-ctrl.c index d073543963a5..f2bad8df0cf7 100644 --- a/drivers/staging/greybus/arche-apb-ctrl.c +++ b/drivers/staging/greybus/arche-apb-ctrl.c @@ -220,6 +220,10 @@ static int apb_ctrl_get_devtree_data(struct platform_device *pdev, static void apb_ctrl_cleanup(struct arche_apb_ctrl_drvdata *apb) { + /* disable the clock */ + if (gpio_is_valid(apb->clk_en_gpio)) + gpio_set_value(apb->clk_en_gpio, 0); + if (!IS_ERR(apb->vcore) && regulator_is_enabled(apb->vcore) > 0) regulator_disable(apb->vcore); |