diff options
Diffstat (limited to 'drivers/mfd/mc13783-core.c')
| -rw-r--r-- | drivers/mfd/mc13783-core.c | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/drivers/mfd/mc13783-core.c b/drivers/mfd/mc13783-core.c index fecf38a4f025..6df34989c1f6 100644 --- a/drivers/mfd/mc13783-core.c +++ b/drivers/mfd/mc13783-core.c | |||
| @@ -11,9 +11,31 @@ | |||
| 11 | */ | 11 | */ |
| 12 | #include <linux/slab.h> | 12 | #include <linux/slab.h> |
| 13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
| 14 | #include <linux/platform_device.h> | ||
| 15 | #include <linux/mutex.h> | ||
| 16 | #include <linux/interrupt.h> | ||
| 14 | #include <linux/spi/spi.h> | 17 | #include <linux/spi/spi.h> |
| 15 | #include <linux/mfd/core.h> | 18 | #include <linux/mfd/core.h> |
| 16 | #include <linux/mfd/mc13783-private.h> | 19 | #include <linux/mfd/mc13783.h> |
| 20 | |||
| 21 | struct mc13783 { | ||
| 22 | struct spi_device *spidev; | ||
| 23 | struct mutex lock; | ||
| 24 | int irq; | ||
| 25 | int flags; | ||
| 26 | |||
| 27 | irq_handler_t irqhandler[MC13783_NUM_IRQ]; | ||
| 28 | void *irqdata[MC13783_NUM_IRQ]; | ||
| 29 | |||
| 30 | /* XXX these should go as platformdata to the regulator subdevice */ | ||
| 31 | struct mc13783_regulator_init_data *regulators; | ||
| 32 | int num_regulators; | ||
| 33 | }; | ||
| 34 | |||
| 35 | #define MC13783_REG_REVISION 7 | ||
| 36 | #define MC13783_REG_ADC_0 43 | ||
| 37 | #define MC13783_REG_ADC_1 44 | ||
| 38 | #define MC13783_REG_ADC_2 45 | ||
| 17 | 39 | ||
| 18 | #define MC13783_IRQSTAT0 0 | 40 | #define MC13783_IRQSTAT0 0 |
| 19 | #define MC13783_IRQSTAT0_ADCDONEI (1 << 0) | 41 | #define MC13783_IRQSTAT0_ADCDONEI (1 << 0) |
| @@ -226,6 +248,12 @@ int mc13783_reg_rmw(struct mc13783 *mc13783, unsigned int offset, | |||
| 226 | } | 248 | } |
| 227 | EXPORT_SYMBOL(mc13783_reg_rmw); | 249 | EXPORT_SYMBOL(mc13783_reg_rmw); |
| 228 | 250 | ||
| 251 | int mc13783_get_flags(struct mc13783 *mc13783) | ||
| 252 | { | ||
| 253 | return mc13783->flags; | ||
| 254 | } | ||
| 255 | EXPORT_SYMBOL(mc13783_get_flags); | ||
| 256 | |||
| 229 | int mc13783_irq_mask(struct mc13783 *mc13783, int irq) | 257 | int mc13783_irq_mask(struct mc13783 *mc13783, int irq) |
| 230 | { | 258 | { |
| 231 | int ret; | 259 | int ret; |
