blob: fbe2843271c5924a9d89821e2143380659e329c1 [file] [log] [blame]
Mark Brown3cc72982012-06-19 16:31:53 +01001/*
2 * wm5102.h -- WM5102 MFD internals
3 *
4 * Copyright 2012 Wolfson Microelectronics plc
5 *
6 * Author: Mark Brown <broonie@opensource.wolfsonmicro.com>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 */
12
13#ifndef _WM5102_H
14#define _WM5102_H
15
Mark Brownd7810092013-03-25 00:11:27 +000016#include <linux/of.h>
Mark Brown3cc72982012-06-19 16:31:53 +010017#include <linux/regmap.h>
18#include <linux/pm.h>
19
20struct wm_arizona;
21
22extern const struct regmap_config wm5102_i2c_regmap;
23extern const struct regmap_config wm5102_spi_regmap;
Mark Browne102bef2012-07-10 12:37:58 +010024
25extern const struct regmap_config wm5110_i2c_regmap;
26extern const struct regmap_config wm5110_spi_regmap;
27
Charles Keepaxdc7d4862013-06-13 09:43:29 +010028extern const struct regmap_config wm8997_i2c_regmap;
29
Mark Brown3cc72982012-06-19 16:31:53 +010030extern const struct dev_pm_ops arizona_pm_ops;
31
Mark Brownd7810092013-03-25 00:11:27 +000032extern const struct of_device_id arizona_of_match[];
33
Mark Brown3cc72982012-06-19 16:31:53 +010034extern const struct regmap_irq_chip wm5102_aod;
35extern const struct regmap_irq_chip wm5102_irq;
36
Mark Browne102bef2012-07-10 12:37:58 +010037extern const struct regmap_irq_chip wm5110_aod;
38extern const struct regmap_irq_chip wm5110_irq;
Charles Keepax32155012014-07-15 11:21:48 +010039extern const struct regmap_irq_chip wm5110_revd_irq;
Mark Browne102bef2012-07-10 12:37:58 +010040
Charles Keepaxdc7d4862013-06-13 09:43:29 +010041extern const struct regmap_irq_chip wm8997_aod;
42extern const struct regmap_irq_chip wm8997_irq;
43
Mark Brown3cc72982012-06-19 16:31:53 +010044int arizona_dev_init(struct arizona *arizona);
45int arizona_dev_exit(struct arizona *arizona);
46int arizona_irq_init(struct arizona *arizona);
47int arizona_irq_exit(struct arizona *arizona);
48
Mark Brownd7810092013-03-25 00:11:27 +000049#ifdef CONFIG_OF
Lee Jones942786e2014-07-02 14:28:46 +010050unsigned long arizona_of_get_type(struct device *dev);
Mark Brownd7810092013-03-25 00:11:27 +000051#else
Lee Jones942786e2014-07-02 14:28:46 +010052static inline unsigned long arizona_of_get_type(struct device *dev)
Mark Brownd7810092013-03-25 00:11:27 +000053{
54 return 0;
55}
56#endif
57
Mark Brown3cc72982012-06-19 16:31:53 +010058#endif