Asish Bhattacharya | 8e2277f | 2017-07-20 18:31:55 +0530 | [diff] [blame] | 1 | /* 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 Kasam | 605b42f | 2017-08-01 22:02:15 +0530 | [diff] [blame] | 19 | #include "pdata.h" |
| 20 | #include "core.h" |
Asish Bhattacharya | 8e2277f | 2017-07-20 18:31:55 +0530 | [diff] [blame] | 21 | |
| 22 | struct wcd9xxx_pdata *wcd9xxx_populate_dt_data(struct device *dev); |
| 23 | int wcd9xxx_bringup(struct device *dev); |
| 24 | int wcd9xxx_bringdown(struct device *dev); |
| 25 | struct regmap *wcd9xxx_regmap_init(struct device *dev, |
| 26 | const struct regmap_config *config); |
| 27 | int wcd9xxx_reset(struct device *dev); |
| 28 | int wcd9xxx_reset_low(struct device *dev); |
| 29 | int wcd9xxx_get_codec_info(struct device *dev); |
| 30 | |
| 31 | typedef int (*codec_bringup_fn)(struct wcd9xxx *); |
| 32 | typedef int (*codec_bringdown_fn)(struct wcd9xxx *); |
| 33 | typedef int (*codec_type_fn)(struct wcd9xxx *, |
| 34 | struct wcd9xxx_codec_type *); |
| 35 | |
| 36 | codec_bringdown_fn wcd9xxx_bringdown_fn(int type); |
| 37 | codec_bringup_fn wcd9xxx_bringup_fn(int type); |
| 38 | codec_type_fn wcd9xxx_get_codec_info_fn(int type); |
| 39 | |
| 40 | #endif |