aboutsummaryrefslogtreecommitdiff
path: root/drivers/spi
diff options
context:
space:
mode:
authorVirupax Sadashivpetimath <virupax.sadashivpetimath@stericsson.com>2010-12-21 21:19:16 +0530
committerSrinidhi KASAGAR <srinidhi.kasagar@stericsson.com>2010-12-24 06:24:49 +0100
commitd2bfdb5266b387b83250a6c4e54a0d53c872cb37 (patch)
tree1bebace6310e14549683ee6e2855d85426503e58 /drivers/spi
parentab282e8cadb14cc045640c61d464637bb74966ed (diff)
ux500:amba_pl022:Use atomic regulator API's
Switch to tasklet safe api's ST-Ericsson ID: ER316461 Change-Id: I9ce81fa13fa00c87bdc62bc237bca6e109a1a2ee Signed-off-by: Virupax Sadashivpetimath <virupax.sadashivpetimath@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/11459 Reviewed-by: QATOOLS Reviewed-by: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com>
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/amba-pl022.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/spi/amba-pl022.c b/drivers/spi/amba-pl022.c
index 38ea8dd8551..843bd290af2 100644
--- a/drivers/spi/amba-pl022.c
+++ b/drivers/spi/amba-pl022.c
@@ -47,7 +47,7 @@
#include <linux/dmaengine.h>
#include <linux/dma-mapping.h>
#include <linux/scatterlist.h>
-#include <linux/regulator/consumer.h>
+#include <mach/regulator.h>
/*
* This macro is used to define some register default values.
@@ -393,7 +393,7 @@ struct pl022 {
char *dummypage;
#endif
bool alloc_chip_info;
- struct regulator *regulator;
+ struct ux500_regulator *regulator;
};
/**
@@ -519,7 +519,7 @@ static void giveback(struct pl022 *pl022)
/* This message is completed, so let's turn off the clock! */
clk_disable(pl022->clk);
if (pl022->regulator)
- regulator_disable(pl022->regulator);
+ ux500_regulator_atomic_disable(pl022->regulator);
}
/**
@@ -1495,7 +1495,7 @@ static void pump_messages(struct work_struct *work)
* giveback() is called in each method (poll/interrupt/DMA)
*/
if (pl022->regulator)
- regulator_enable(pl022->regulator);
+ ux500_regulator_atomic_enable(pl022->regulator);
clk_enable(pl022->clk);
restore_state(pl022);
flush(pl022);
@@ -2092,7 +2092,7 @@ pl022_probe(struct amba_device *adev, struct amba_id *id)
printk(KERN_INFO "pl022: mapped registers from 0x%08x to %p\n",
adev->res.start, pl022->virtbase);
- pl022->regulator = regulator_get(dev, "v-spi");
+ pl022->regulator = ux500_regulator_get(dev);
if (IS_ERR(pl022->regulator)) {
dev_warn(dev, "could not get spi regulator\n");
pl022->regulator = NULL;
@@ -2159,7 +2159,7 @@ pl022_probe(struct amba_device *adev, struct amba_id *id)
clk_put(pl022->clk);
err_no_clk:
if (pl022->regulator)
- regulator_put(pl022->regulator);
+ ux500_regulator_put(pl022->regulator);
iounmap(pl022->virtbase);
err_no_ioremap:
amba_release_regions(adev);
@@ -2191,7 +2191,7 @@ pl022_remove(struct amba_device *adev)
clk_disable(pl022->clk);
clk_put(pl022->clk);
if (pl022->regulator)
- regulator_put(pl022->regulator);
+ ux500_regulator_put(pl022->regulator);
iounmap(pl022->virtbase);
amba_release_regions(adev);
tasklet_disable(&pl022->pump_transfers);