blob: a7ec56c2da0aae3eeaf236d1270407facd918a1d [file] [log] [blame]
Asish Bhattacharya8e2277f2017-07-20 18:31:55 +05301/* Copyright (c) 2016-2017, The Linux Foundation. All rights reserved.
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 */
12
13#ifndef __WCD9XXX_UTILS_H__
14#define __WCD9XXX_UTILS_H__
15
16#include <linux/kernel.h>
17#include <linux/device.h>
18#include <linux/regmap.h>
Laxminath Kasam605b42f2017-08-01 22:02:15 +053019#include "pdata.h"
20#include "core.h"
Asish Bhattacharya8e2277f2017-07-20 18:31:55 +053021
22struct wcd9xxx_pdata *wcd9xxx_populate_dt_data(struct device *dev);
23int wcd9xxx_bringup(struct device *dev);
24int wcd9xxx_bringdown(struct device *dev);
25struct regmap *wcd9xxx_regmap_init(struct device *dev,
26 const struct regmap_config *config);
27int wcd9xxx_reset(struct device *dev);
28int wcd9xxx_reset_low(struct device *dev);
29int wcd9xxx_get_codec_info(struct device *dev);
30
31typedef int (*codec_bringup_fn)(struct wcd9xxx *);
32typedef int (*codec_bringdown_fn)(struct wcd9xxx *);
33typedef int (*codec_type_fn)(struct wcd9xxx *,
34 struct wcd9xxx_codec_type *);
35
36codec_bringdown_fn wcd9xxx_bringdown_fn(int type);
37codec_bringup_fn wcd9xxx_bringup_fn(int type);
38codec_type_fn wcd9xxx_get_codec_info_fn(int type);
39
40#endif