diff options
author | Laxman Dewangan <ldewangan@nvidia.com> | 2011-10-30 23:37:41 +0530 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2011-11-30 21:49:56 -0800 |
commit | 34a51c36a3907ba39371d866b73494e22df6709b (patch) | |
tree | 4b0e845348ef8d819c2d4b19bca69c8b2fb47056 /drivers/mfd | |
parent | 6b3e12e9cb334670bada0b93e0654461658d381d (diff) |
regulator: ricoh583: Support for external PWRREQ control
Supporting the different rails control through the external
control signal PWRREQ1 and PWRREQ2.
Reviewed-on: http://git-master/r/61898
(cherry picked from commit fc07ccae30b61a92fa0b77ee6b2b7c8d43176bbe)
Change-Id: Id6322ef251e4b87673d3a647efb1f0d74b8e0815
Reviewed-on: http://git-master/r/62912
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>
Rebase-Id: R687c186e89635a5bd4e3f399709cdf3520936a3f
Diffstat (limited to 'drivers/mfd')
-rw-r--r-- | drivers/mfd/ricoh583.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/drivers/mfd/ricoh583.c b/drivers/mfd/ricoh583.c index 794f6bf48dea..fa11254806b1 100644 --- a/drivers/mfd/ricoh583.c +++ b/drivers/mfd/ricoh583.c @@ -499,10 +499,12 @@ static void __devinit ricoh583_gpio_init(struct ricoh583 *ricoh583, dev_err(ricoh583->dev, "Gpio %d init " "dir configuration failed: %d\n", i, ret); - ret = ricoh583_clr_bits(ricoh583->dev, RICOH583_GPIO_PGSEL, 1 << i); + ret = ricoh583_clr_bits(ricoh583->dev, RICOH583_GPIO_PGSEL, + 1 << i); if (ret < 0) - dev_err(ricoh583->dev, "%s(): The error in writing register " - "0x%02x\n", __func__, RICOH583_GPIO_PGSEL); + dev_err(ricoh583->dev, "%s(): The error in writing " + "register 0x%02x\n", __func__, + RICOH583_GPIO_PGSEL); } ricoh583->gpio.owner = THIS_MODULE; @@ -941,6 +943,14 @@ static int ricoh583_i2c_probe(struct i2c_client *i2c, mutex_init(&ricoh583->io_lock); + /* Clear ONOFFSEL register */ + ret = __ricoh583_write(ricoh583->client, 0x10, 0x0); + if (ret < 0) { + dev_err(ricoh583->dev, "Error in writing reg 0x10 error: " + "%d\n", ret); + goto err_irq_init; + } + if (i2c->irq) { ret = ricoh583_irq_init(ricoh583, i2c->irq, pdata->irq_base); if (ret) { |