dev_sdio_dm.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * Copyright (c) 2006-2022, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2022-12-06 GuEe-GUI first version
  9. */
  10. #ifndef __DEV_SDIO_DM_H__
  11. #define __DEV_SDIO_DM_H__
  12. #include <rthw.h>
  13. #include <rtthread.h>
  14. #include <rtdevice.h>
  15. int sdio_host_set_name(struct rt_mmcsd_host *host, char *out_devname);
  16. #ifdef RT_USING_REGULATOR
  17. rt_err_t sdio_regulator_set_ocr(struct rt_mmcsd_host *host,
  18. struct rt_regulator *supply, rt_uint16_t vdd_bit);
  19. rt_err_t sdio_regulator_set_vqmmc(struct rt_mmcsd_host *host,
  20. struct rt_mmcsd_io_cfg *ios);
  21. rt_err_t sdio_regulator_get_supply(struct rt_device *dev, struct rt_mmcsd_host *host);
  22. rt_err_t sdio_regulator_enable_vqmmc(struct rt_mmcsd_host *host);
  23. void sdio_regulator_disable_vqmmc(struct rt_mmcsd_host *host);
  24. #endif /* RT_USING_REGULATOR */
  25. #ifdef RT_USING_OFW
  26. rt_err_t sdio_ofw_parse(struct rt_ofw_node *dev_np, struct rt_mmcsd_host *host);
  27. #else
  28. rt_inline rt_err_t sdio_ofw_parse(struct rt_ofw_node *dev_np, struct rt_mmcsd_host *host)
  29. {
  30. return RT_EOK;
  31. }
  32. #endif /* RT_USING_OFW */
  33. #endif /* __DEV_SDIO_DM_H__ */