Commit 549931f9 authored by Sundar R Iyer's avatar Sundar R Iyer Committed by Liam Girdwood
parent 1880a2fc
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/mfd/core.h> #include <linux/mfd/core.h>
#include <linux/mfd/ab8500.h> #include <linux/mfd/ab8500.h>
#include <linux/regulator/ab8500.h>
/* /*
* Interrupt register offsets * Interrupt register offsets
...@@ -352,6 +353,7 @@ static struct mfd_cell ab8500_devs[] = { ...@@ -352,6 +353,7 @@ static struct mfd_cell ab8500_devs[] = {
{ .name = "ab8500-audio", }, { .name = "ab8500-audio", },
{ .name = "ab8500-usb", }, { .name = "ab8500-usb", },
{ .name = "ab8500-pwm", }, { .name = "ab8500-pwm", },
{ .name = "ab8500-regulator", },
}; };
int __devinit ab8500_init(struct ab8500 *ab8500) int __devinit ab8500_init(struct ab8500 *ab8500)
...@@ -411,7 +413,7 @@ int __devinit ab8500_init(struct ab8500 *ab8500) ...@@ -411,7 +413,7 @@ int __devinit ab8500_init(struct ab8500 *ab8500)
goto out_removeirq; goto out_removeirq;
} }
ret = mfd_add_devices(ab8500->dev, -1, ab8500_devs, ret = mfd_add_devices(ab8500->dev, 0, ab8500_devs,
ARRAY_SIZE(ab8500_devs), NULL, ARRAY_SIZE(ab8500_devs), NULL,
ab8500->irq_base); ab8500->irq_base);
if (ret) if (ret)
......
...@@ -76,6 +76,8 @@ ...@@ -76,6 +76,8 @@
#define AB8500_NR_IRQS 104 #define AB8500_NR_IRQS 104
#define AB8500_NUM_IRQ_REGS 13 #define AB8500_NUM_IRQ_REGS 13
#define AB8500_NUM_REGULATORS 15
/** /**
* struct ab8500 - ab8500 internal structure * struct ab8500 - ab8500 internal structure
* @dev: parent device * @dev: parent device
...@@ -108,14 +110,18 @@ struct ab8500 { ...@@ -108,14 +110,18 @@ struct ab8500 {
u8 oldmask[AB8500_NUM_IRQ_REGS]; u8 oldmask[AB8500_NUM_IRQ_REGS];
}; };
struct regulator_init_data;
/** /**
* struct ab8500_platform_data - AB8500 platform data * struct ab8500_platform_data - AB8500 platform data
* @irq_base: start of AB8500 IRQs, AB8500_NR_IRQS will be used * @irq_base: start of AB8500 IRQs, AB8500_NR_IRQS will be used
* @init: board-specific initialization after detection of ab8500 * @init: board-specific initialization after detection of ab8500
* @regulator: machine-specific constraints for regulators
*/ */
struct ab8500_platform_data { struct ab8500_platform_data {
int irq_base; int irq_base;
void (*init) (struct ab8500 *); void (*init) (struct ab8500 *);
struct regulator_init_data *regulator[AB8500_NUM_REGULATORS];
}; };
extern int ab8500_write(struct ab8500 *a8500, u16 addr, u8 data); extern int ab8500_write(struct ab8500 *a8500, u16 addr, u8 data);
......
/*
* Copyright (C) ST-Ericsson SA 2010
*
* License Terms: GNU General Public License v2
*
* Author: Sundar Iyer <sundar.iyer@stericsson.com> for ST-Ericsson
*
*/
#ifndef __LINUX_MFD_AB8500_REGULATOR_H
#define __LINUX_MFD_AB8500_REGULATOR_H
/* AB8500 regulators */
#define AB8500_LDO_AUX1 0
#define AB8500_LDO_AUX2 1
#define AB8500_LDO_AUX3 2
#define AB8500_LDO_INTCORE 3
#define AB8500_LDO_TVOUT 4
#define AB8500_LDO_AUDIO 5
#define AB8500_LDO_ANAMIC1 6
#define AB8500_LDO_ANAMIC2 7
#define AB8500_LDO_DMIC 8
#define AB8500_LDO_ANA 9
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment