aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/mfd/twl6040-core.c12
-rw-r--r--include/linux/mfd/twl6040.h3
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}
445EXPORT_SYMBOL(twl6040_get_sysclk); 445EXPORT_SYMBOL(twl6040_get_sysclk);
446 446
447/* Get the combined status of the vibra control register */
448int 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}
457EXPORT_SYMBOL(twl6040_get_vibralr_status);
458
447static struct resource twl6040_vibra_rsrc[] = { 459static 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);
209unsigned int twl6040_get_sysclk(struct twl6040 *twl6040); 209unsigned int twl6040_get_sysclk(struct twl6040 *twl6040);
210int twl6040_irq_init(struct twl6040 *twl6040); 210int twl6040_irq_init(struct twl6040 *twl6040);
211void twl6040_irq_exit(struct twl6040 *twl6040); 211void twl6040_irq_exit(struct twl6040 *twl6040);
212/* Get the combined status of the vibra control register */
213int twl6040_get_vibralr_status(struct twl6040 *twl6040);
212 214
213static inline int twl6040_get_revid(struct twl6040 *twl6040) 215static 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__ */