wcd9xxx-utils.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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. #ifndef __WCD9XXX_UTILS_H__
  13. #define __WCD9XXX_UTILS_H__
  14. #include <linux/kernel.h>
  15. #include <linux/device.h>
  16. #include <linux/regmap.h>
  17. #include "pdata.h"
  18. #include "core.h"
  19. struct wcd9xxx_pdata *wcd9xxx_populate_dt_data(struct device *dev);
  20. int wcd9xxx_bringup(struct device *dev);
  21. int wcd9xxx_bringdown(struct device *dev);
  22. struct regmap *wcd9xxx_regmap_init(struct device *dev,
  23. const struct regmap_config *config);
  24. int wcd9xxx_reset(struct device *dev);
  25. int wcd9xxx_reset_low(struct device *dev);
  26. int wcd9xxx_get_codec_info(struct device *dev);
  27. typedef int (*codec_bringup_fn)(struct wcd9xxx *);
  28. typedef int (*codec_bringdown_fn)(struct wcd9xxx *);
  29. typedef int (*codec_type_fn)(struct wcd9xxx *,
  30. struct wcd9xxx_codec_type *);
  31. codec_bringdown_fn wcd9xxx_bringdown_fn(int type);
  32. codec_bringup_fn wcd9xxx_bringup_fn(int type);
  33. codec_type_fn wcd9xxx_get_codec_info_fn(int type);
  34. #endif