aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spmi/spmi.c
diff options
context:
space:
mode:
authorGilad Avidov <gavidov@codeaurora.org>2015-03-25 13:37:31 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-03-26 18:51:36 -0400
commit0b9641f5722a9c08cacb534d633ff469ab02a288 (patch)
tree4f34055a6219114cf4ad01244400d35125eadd1f /drivers/spmi/spmi.c
parent03515f323c3766f0a69b62743794577bbd9f87c9 (diff)
spmi: remove wakeup command before slave probe
According to spmi spec a slave powers up into startup state and then transitions into active state. Thus, the wakeup command is not required before calling the slave's probe. The wakeup command is only needed for slaves that are in sleep state after receiving the sleep command. Cc: galak@codeaurora.org Reviewed-by: Stephen Boyd <sboyd@codeaurora.org> Reviewed-by: Sagar Dharia <sdharia@codeaurora.org> Acked-by: Josh Cartwright <joshc@eso.teric.us> Signed-off-by: Gilad Avidov <gavidov@codeaurora.org> Tested-by: Ivan T. Ivanov <iivanov@mm-sol.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/spmi/spmi.c')
-rw-r--r--drivers/spmi/spmi.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/spmi/spmi.c b/drivers/spmi/spmi.c
index 1d92f5103ebf..94938436aef9 100644
--- a/drivers/spmi/spmi.c
+++ b/drivers/spmi/spmi.c
@@ -1,4 +1,5 @@
1/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. 1/*
2 * Copyright (c) 2012-2015, The Linux Foundation. All rights reserved.
2 * 3 *
3 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and 5 * it under the terms of the GNU General Public License version 2 and
@@ -316,11 +317,6 @@ static int spmi_drv_probe(struct device *dev)
316 struct spmi_device *sdev = to_spmi_device(dev); 317 struct spmi_device *sdev = to_spmi_device(dev);
317 int err; 318 int err;
318 319
319 /* Ensure the slave is in ACTIVE state */
320 err = spmi_command_wakeup(sdev);
321 if (err)
322 goto fail_wakeup;
323
324 pm_runtime_get_noresume(dev); 320 pm_runtime_get_noresume(dev);
325 pm_runtime_set_active(dev); 321 pm_runtime_set_active(dev);
326 pm_runtime_enable(dev); 322 pm_runtime_enable(dev);
@@ -335,7 +331,6 @@ fail_probe:
335 pm_runtime_disable(dev); 331 pm_runtime_disable(dev);
336 pm_runtime_set_suspended(dev); 332 pm_runtime_set_suspended(dev);
337 pm_runtime_put_noidle(dev); 333 pm_runtime_put_noidle(dev);
338fail_wakeup:
339 return err; 334 return err;
340} 335}
341 336