platform_arm_act_sdio.c 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /******************************************************************************
  2. *
  3. * Copyright(c) 2013 Realtek Corporation. All rights reserved.
  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. * You should have received a copy of the GNU General Public License along with
  15. * this program; if not, write to the Free Software Foundation, Inc.,
  16. * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
  17. *
  18. *
  19. ******************************************************************************/
  20. /*
  21. * Description:
  22. * This file can be applied to following platforms:
  23. * CONFIG_PLATFORM_ACTIONS_ATM703X
  24. */
  25. #include <drv_types.h>
  26. #ifdef CONFIG_PLATFORM_ACTIONS_ATM705X
  27. extern int acts_wifi_init(void);
  28. extern void acts_wifi_cleanup(void);
  29. #endif
  30. /*
  31. * Return:
  32. * 0: power on successfully
  33. * others: power on failed
  34. */
  35. int platform_wifi_power_on(void)
  36. {
  37. int ret = 0;
  38. #ifdef CONFIG_PLATFORM_ACTIONS_ATM705X
  39. ret = acts_wifi_init();
  40. if (unlikely(ret < 0)) {
  41. pr_err("%s Failed to register the power control driver.\n", __FUNCTION__);
  42. goto exit;
  43. }
  44. #endif
  45. exit:
  46. return ret;
  47. }
  48. void platform_wifi_power_off(void)
  49. {
  50. #ifdef CONFIG_PLATFORM_ACTIONS_ATM705X
  51. acts_wifi_cleanup();
  52. #endif
  53. }