platform_arm_act_sdio.c 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /******************************************************************************
  2. *
  3. * Copyright(c) 2013 - 2017 Realtek Corporation.
  4. *
  5. * This program is free software; you can redistribute it and/or modify it
  6. * under the terms of version 2 of the GNU General Public License as
  7. * published by the Free Software Foundation.
  8. *
  9. * This program is distributed in the hope that it will be useful, but WITHOUT
  10. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  12. * more details.
  13. *
  14. *****************************************************************************/
  15. /*
  16. * Description:
  17. * This file can be applied to following platforms:
  18. * CONFIG_PLATFORM_ACTIONS_ATM703X
  19. */
  20. #include <drv_types.h>
  21. #ifdef CONFIG_PLATFORM_ACTIONS_ATM705X
  22. extern int acts_wifi_init(void);
  23. extern void acts_wifi_cleanup(void);
  24. #endif
  25. /*
  26. * Return:
  27. * 0: power on successfully
  28. * others: power on failed
  29. */
  30. int platform_wifi_power_on(void)
  31. {
  32. int ret = 0;
  33. #ifdef CONFIG_PLATFORM_ACTIONS_ATM705X
  34. ret = acts_wifi_init();
  35. if (unlikely(ret < 0)) {
  36. pr_err("%s Failed to register the power control driver.\n", __FUNCTION__);
  37. goto exit;
  38. }
  39. #endif
  40. exit:
  41. return ret;
  42. }
  43. void platform_wifi_power_off(void)
  44. {
  45. #ifdef CONFIG_PLATFORM_ACTIONS_ATM705X
  46. acts_wifi_cleanup();
  47. #endif
  48. }