blob: 9002056785a2cfcfaf491893d99380c287b2d2d1 [file] [log] [blame]
Thomas Gleixnerd2912cb2019-06-04 10:11:33 +02001/* SPDX-License-Identifier: GPL-2.0-only */
Richard Fitzgerald16b27462018-05-21 10:59:56 +01002/*
3 * MFD internals for Cirrus Logic Madera codecs
4 *
5 * Copyright 2015-2018 Cirrus Logic
Richard Fitzgerald16b27462018-05-21 10:59:56 +01006 */
7
8#ifndef MADERA_MFD_H
9#define MADERA_MFD_H
10
11#include <linux/of.h>
12#include <linux/pm.h>
13
14struct madera;
15
16extern const struct dev_pm_ops madera_pm_ops;
17extern const struct of_device_id madera_of_match[];
18
19int madera_dev_init(struct madera *madera);
20int madera_dev_exit(struct madera *madera);
21
22const char *madera_name_from_type(enum madera_type type);
23
Richard Fitzgerald1ef921b2019-05-30 15:39:52 +010024extern const struct regmap_config cs47l15_16bit_spi_regmap;
25extern const struct regmap_config cs47l15_32bit_spi_regmap;
26extern const struct regmap_config cs47l15_16bit_i2c_regmap;
27extern const struct regmap_config cs47l15_32bit_i2c_regmap;
28int cs47l15_patch(struct madera *madera);
29
Richard Fitzgerald16b27462018-05-21 10:59:56 +010030extern const struct regmap_config cs47l35_16bit_spi_regmap;
31extern const struct regmap_config cs47l35_32bit_spi_regmap;
32extern const struct regmap_config cs47l35_16bit_i2c_regmap;
33extern const struct regmap_config cs47l35_32bit_i2c_regmap;
34int cs47l35_patch(struct madera *madera);
35
36extern const struct regmap_config cs47l85_16bit_spi_regmap;
37extern const struct regmap_config cs47l85_32bit_spi_regmap;
38extern const struct regmap_config cs47l85_16bit_i2c_regmap;
39extern const struct regmap_config cs47l85_32bit_i2c_regmap;
40int cs47l85_patch(struct madera *madera);
41
42extern const struct regmap_config cs47l90_16bit_spi_regmap;
43extern const struct regmap_config cs47l90_32bit_spi_regmap;
44extern const struct regmap_config cs47l90_16bit_i2c_regmap;
45extern const struct regmap_config cs47l90_32bit_i2c_regmap;
46int cs47l90_patch(struct madera *madera);
Richard Fitzgerald29793992019-05-30 15:39:53 +010047
48extern const struct regmap_config cs47l92_16bit_spi_regmap;
49extern const struct regmap_config cs47l92_32bit_spi_regmap;
50extern const struct regmap_config cs47l92_16bit_i2c_regmap;
51extern const struct regmap_config cs47l92_32bit_i2c_regmap;
52int cs47l92_patch(struct madera *madera);
53
Richard Fitzgerald16b27462018-05-21 10:59:56 +010054#endif