xref: /openbmc/linux/drivers/mfd/madera.h (revision 9be08a27)
1 /*
2  * MFD internals for Cirrus Logic Madera codecs
3  *
4  * Copyright 2015-2018 Cirrus Logic
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation.
9  */
10 
11 #ifndef MADERA_MFD_H
12 #define MADERA_MFD_H
13 
14 #include <linux/of.h>
15 #include <linux/pm.h>
16 
17 struct madera;
18 
19 extern const struct dev_pm_ops madera_pm_ops;
20 extern const struct of_device_id madera_of_match[];
21 
22 int madera_dev_init(struct madera *madera);
23 int madera_dev_exit(struct madera *madera);
24 
25 const char *madera_name_from_type(enum madera_type type);
26 
27 extern const struct regmap_config cs47l35_16bit_spi_regmap;
28 extern const struct regmap_config cs47l35_32bit_spi_regmap;
29 extern const struct regmap_config cs47l35_16bit_i2c_regmap;
30 extern const struct regmap_config cs47l35_32bit_i2c_regmap;
31 int cs47l35_patch(struct madera *madera);
32 
33 extern const struct regmap_config cs47l85_16bit_spi_regmap;
34 extern const struct regmap_config cs47l85_32bit_spi_regmap;
35 extern const struct regmap_config cs47l85_16bit_i2c_regmap;
36 extern const struct regmap_config cs47l85_32bit_i2c_regmap;
37 int cs47l85_patch(struct madera *madera);
38 
39 extern const struct regmap_config cs47l90_16bit_spi_regmap;
40 extern const struct regmap_config cs47l90_32bit_spi_regmap;
41 extern const struct regmap_config cs47l90_16bit_i2c_regmap;
42 extern const struct regmap_config cs47l90_32bit_i2c_regmap;
43 int cs47l90_patch(struct madera *madera);
44 #endif
45