Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 299269
b: refs/heads/master
c: 1e45860
h: refs/heads/master
i:
  299267: f8dc02d
v: v3
  • Loading branch information
Mark Brown authored and Russell King committed Apr 13, 2012
1 parent 4eca58d commit 7ca2b9e
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 51 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 34af657916332e89564566bc8d35e3e06cc0c236
refs/heads/master: 1e45860f541497d73162305d48b638d9b87e1ae3
42 changes: 1 addition & 41 deletions trunk/drivers/amba/bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,7 @@ static int amba_pm_restore(struct device *dev)
/*
* Hooks to provide runtime PM of the pclk (bus clock). It is safe to
* enable/disable the bus clock at runtime PM suspend/resume as this
* does not result in loss of context. However, disabling vcore power
* would do, so we leave that to the driver.
* does not result in loss of context.
*/
static int amba_pm_runtime_suspend(struct device *dev)
{
Expand Down Expand Up @@ -354,39 +353,6 @@ static void amba_put_disable_pclk(struct amba_device *pcdev)
clk_put(pclk);
}

static int amba_get_enable_vcore(struct amba_device *pcdev)
{
struct regulator *vcore = regulator_get(&pcdev->dev, "vcore");
int ret;

pcdev->vcore = vcore;

if (IS_ERR(vcore)) {
/* It is OK not to supply a vcore regulator */
if (PTR_ERR(vcore) == -ENODEV)
return 0;
return PTR_ERR(vcore);
}

ret = regulator_enable(vcore);
if (ret) {
regulator_put(vcore);
pcdev->vcore = ERR_PTR(-ENODEV);
}

return ret;
}

static void amba_put_disable_vcore(struct amba_device *pcdev)
{
struct regulator *vcore = pcdev->vcore;

if (!IS_ERR(vcore)) {
regulator_disable(vcore);
regulator_put(vcore);
}
}

/*
* These are the device model conversion veneers; they convert the
* device model structures to our more specific structures.
Expand All @@ -399,10 +365,6 @@ static int amba_probe(struct device *dev)
int ret;

do {
ret = amba_get_enable_vcore(pcdev);
if (ret)
break;

ret = amba_get_enable_pclk(pcdev);
if (ret)
break;
Expand All @@ -420,7 +382,6 @@ static int amba_probe(struct device *dev)
pm_runtime_put_noidle(dev);

amba_put_disable_pclk(pcdev);
amba_put_disable_vcore(pcdev);
} while (0);

return ret;
Expand All @@ -442,7 +403,6 @@ static int amba_remove(struct device *dev)
pm_runtime_put_noidle(dev);

amba_put_disable_pclk(pcdev);
amba_put_disable_vcore(pcdev);

return ret;
}
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/mfd/db8500-prcmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -2788,6 +2788,7 @@ static struct regulator_init_data db8500_regulators[DB8500_NUM_REGULATORS] = {
.constraints = {
.name = "db8500-vape",
.valid_ops_mask = REGULATOR_CHANGE_STATUS,
.always_on = true,
},
.consumer_supplies = db8500_vape_consumers,
.num_consumer_supplies = ARRAY_SIZE(db8500_vape_consumers),
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/spi/spi-pl022.c
Original file line number Diff line number Diff line change
Expand Up @@ -2195,7 +2195,6 @@ static int pl022_runtime_suspend(struct device *dev)
struct pl022 *pl022 = dev_get_drvdata(dev);

clk_disable(pl022->clk);
amba_vcore_disable(pl022->adev);

return 0;
}
Expand All @@ -2204,7 +2203,6 @@ static int pl022_runtime_resume(struct device *dev)
{
struct pl022 *pl022 = dev_get_drvdata(dev);

amba_vcore_enable(pl022->adev);
clk_enable(pl022->clk);

return 0;
Expand Down
7 changes: 0 additions & 7 deletions trunk/include/linux/amba/bus.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ struct amba_device {
struct device dev;
struct resource res;
struct clk *pclk;
struct regulator *vcore;
u64 dma_mask;
unsigned int periphid;
unsigned int irq[AMBA_NR_IRQS];
Expand Down Expand Up @@ -75,12 +74,6 @@ void amba_release_regions(struct amba_device *);
#define amba_pclk_disable(d) \
do { if (!IS_ERR((d)->pclk)) clk_disable((d)->pclk); } while (0)

#define amba_vcore_enable(d) \
(IS_ERR((d)->vcore) ? 0 : regulator_enable((d)->vcore))

#define amba_vcore_disable(d) \
do { if (!IS_ERR((d)->vcore)) regulator_disable((d)->vcore); } while (0)

/* Some drivers don't use the struct amba_device */
#define AMBA_CONFIG_BITS(a) (((a) >> 24) & 0xff)
#define AMBA_REV_BITS(a) (((a) >> 20) & 0x0f)
Expand Down

0 comments on commit 7ca2b9e

Please sign in to comment.