diff options
-rw-r--r-- | drivers/mfd/twl6040-core.c | 12 | ||||
-rw-r--r-- | include/linux/mfd/twl6040.h | 3 |
2 files changed, 15 insertions, 0 deletions
diff --git a/drivers/mfd/twl6040-core.c b/drivers/mfd/twl6040-core.c index 75987c8ca049..268f80fd0439 100644 --- a/drivers/mfd/twl6040-core.c +++ b/drivers/mfd/twl6040-core.c | |||
@@ -444,6 +444,18 @@ unsigned int twl6040_get_sysclk(struct twl6040 *twl6040) | |||
444 | } | 444 | } |
445 | EXPORT_SYMBOL(twl6040_get_sysclk); | 445 | EXPORT_SYMBOL(twl6040_get_sysclk); |
446 | 446 | ||
447 | /* Get the combined status of the vibra control register */ | ||
448 | int twl6040_get_vibralr_status(struct twl6040 *twl6040) | ||
449 | { | ||
450 | u8 status; | ||
451 | |||
452 | status = twl6040->vibra_ctrl_cache[0] | twl6040->vibra_ctrl_cache[1]; | ||
453 | status &= (TWL6040_VIBENA | TWL6040_VIBSEL); | ||
454 | |||
455 | return status; | ||
456 | } | ||
457 | EXPORT_SYMBOL(twl6040_get_vibralr_status); | ||
458 | |||
447 | static struct resource twl6040_vibra_rsrc[] = { | 459 | static struct resource twl6040_vibra_rsrc[] = { |
448 | { | 460 | { |
449 | .flags = IORESOURCE_IRQ, | 461 | .flags = IORESOURCE_IRQ, |
diff --git a/include/linux/mfd/twl6040.h b/include/linux/mfd/twl6040.h index 2f8585a4c74b..87a4778ed4b0 100644 --- a/include/linux/mfd/twl6040.h +++ b/include/linux/mfd/twl6040.h | |||
@@ -209,10 +209,13 @@ int twl6040_get_pll(struct twl6040 *twl6040); | |||
209 | unsigned int twl6040_get_sysclk(struct twl6040 *twl6040); | 209 | unsigned int twl6040_get_sysclk(struct twl6040 *twl6040); |
210 | int twl6040_irq_init(struct twl6040 *twl6040); | 210 | int twl6040_irq_init(struct twl6040 *twl6040); |
211 | void twl6040_irq_exit(struct twl6040 *twl6040); | 211 | void twl6040_irq_exit(struct twl6040 *twl6040); |
212 | /* Get the combined status of the vibra control register */ | ||
213 | int twl6040_get_vibralr_status(struct twl6040 *twl6040); | ||
212 | 214 | ||
213 | static inline int twl6040_get_revid(struct twl6040 *twl6040) | 215 | static inline int twl6040_get_revid(struct twl6040 *twl6040) |
214 | { | 216 | { |
215 | return twl6040->rev; | 217 | return twl6040->rev; |
216 | } | 218 | } |
217 | 219 | ||
220 | |||
218 | #endif /* End of __TWL6040_CODEC_H__ */ | 221 | #endif /* End of __TWL6040_CODEC_H__ */ |