wcd9xxx-utils.h 1.0 KB

1234567891011121314151617181920212223242526272829303132
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /* Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
  3. */
  4. #ifndef __WCD9XXX_UTILS_H__
  5. #define __WCD9XXX_UTILS_H__
  6. #include <linux/kernel.h>
  7. #include <linux/device.h>
  8. #include <linux/regmap.h>
  9. #include "pdata.h"
  10. #include "core.h"
  11. struct wcd9xxx_pdata *wcd9xxx_populate_dt_data(struct device *dev);
  12. int wcd9xxx_bringup(struct device *dev);
  13. int wcd9xxx_bringdown(struct device *dev);
  14. struct regmap *wcd9xxx_regmap_init(struct device *dev,
  15. const struct regmap_config *config);
  16. int wcd9xxx_reset(struct device *dev);
  17. int wcd9xxx_reset_low(struct device *dev);
  18. int wcd9xxx_get_codec_info(struct device *dev);
  19. typedef int (*codec_bringup_fn)(struct wcd9xxx *dev);
  20. typedef int (*codec_bringdown_fn)(struct wcd9xxx *dev);
  21. typedef int (*codec_type_fn)(struct wcd9xxx *dev,
  22. struct wcd9xxx_codec_type *wcd_type);
  23. codec_bringdown_fn wcd9xxx_bringdown_fn(int type);
  24. codec_bringup_fn wcd9xxx_bringup_fn(int type);
  25. codec_type_fn wcd9xxx_get_codec_info_fn(int type);
  26. #endif