@@ -27,8 +27,6 @@
#include <linux/pm_runtime.h>
#include <linux/regmap.h>
#include <linux/crypto.h>
-
-#include <linux/regulator/consumer.h>
#include <linux/dmaengine.h>
#include <linux/bitops.h>
@@ -247,8 +245,7 @@ static int get_empty_message_digest(
* hash_disable_power - Request to disable power and clock.
* @device_data: Structure for the hash device.
*
- * This function request for disabling power (regulator) and clock,
- * and could also save current hw state.
+ * This function request for disabling the clock.
*/
static int hash_disable_power(struct hash_device_data *device_data)
{
@@ -260,9 +257,6 @@ static int hash_disable_power(struct hash_device_data *device_data)
goto out;
clk_disable(device_data->clk);
- ret = regulator_disable(device_data->regulator);
- if (ret)
- dev_err(dev, "%s: regulator_disable() failed!\n", __func__);
device_data->power_state = false;
@@ -276,8 +270,7 @@ static int hash_disable_power(struct hash_device_data *device_data)
* hash_enable_power - Request to enable power and clock.
* @device_data: Structure for the hash device.
*
- * This function request for enabling power (regulator) and clock,
- * and could also restore a previously saved hw state.
+ * This function request for enabling the clock.
*/
static int hash_enable_power(struct hash_device_data *device_data)
{
@@ -286,17 +279,9 @@ static int hash_enable_power(struct hash_device_data *device_data)
spin_lock(&device_data->power_state_lock);
if (!device_data->power_state) {
- ret = regulator_enable(device_data->regulator);
- if (ret) {
- dev_err(dev, "%s: regulator_enable() failed!\n",
- __func__);
- goto out;
- }
ret = clk_enable(device_data->clk);
if (ret) {
dev_err(dev, "%s: clk_enable() failed!\n", __func__);
- ret = regulator_disable(
- device_data->regulator);
goto out;
}
device_data->power_state = true;
@@ -1575,25 +1560,17 @@ static int ux500_hash_probe(struct platform_device *pdev)
spin_lock_init(&device_data->ctx_lock);
spin_lock_init(&device_data->power_state_lock);
- device_data->regulator = regulator_get(dev, "v-ape");
- if (IS_ERR(device_data->regulator)) {
- dev_err(dev, "%s: regulator_get() failed!\n", __func__);
- ret = PTR_ERR(device_data->regulator);
- device_data->regulator = NULL;
- goto out;
- }
-
device_data->clk = devm_clk_get(dev, NULL);
if (IS_ERR(device_data->clk)) {
dev_err(dev, "%s: clk_get() failed!\n", __func__);
ret = PTR_ERR(device_data->clk);
- goto out_regulator;
+ goto out;
}
ret = clk_prepare(device_data->clk);
if (ret) {
dev_err(dev, "%s: clk_prepare() failed!\n", __func__);
- goto out_regulator;
+ goto out;
}
/* Enable device power (and clock) */
@@ -1637,9 +1614,6 @@ static int ux500_hash_probe(struct platform_device *pdev)
out_clk_unprepare:
clk_unprepare(device_data->clk);
-out_regulator:
- regulator_put(device_data->regulator);
-
out:
return ret;
}
@@ -1682,7 +1656,6 @@ static int ux500_hash_remove(struct platform_device *pdev)
__func__);
clk_unprepare(device_data->clk);
- regulator_put(device_data->regulator);
return 0;
}
This "APE" voltage is not handled by a regulator but by the power domain, drop it. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> --- drivers/crypto/ux500/hash/hash_core.c | 35 +++------------------------ 1 file changed, 4 insertions(+), 31 deletions(-)