power_gate.c 549 B

12345678910111213141516171819202122232425262728
  1. #include <linux/module.h>
  2. #include <mach/am_regs.h>
  3. #include <mach/power_gate.h>
  4. #include <mach/mod_gate.h>
  5. unsigned char GCLK_ref[GCLK_IDX_MAX];
  6. EXPORT_SYMBOL(GCLK_ref);
  7. int video_dac_enable(unsigned char enable_mask)
  8. {
  9. switch_mod_gate_by_name("venc", 1);
  10. CLEAR_CBUS_REG_MASK(VENC_VDAC_SETTING, enable_mask & 0x1f);
  11. return 0;
  12. }
  13. EXPORT_SYMBOL(video_dac_enable);
  14. int video_dac_disable()
  15. {
  16. SET_CBUS_REG_MASK(VENC_VDAC_SETTING, 0x1f);
  17. switch_mod_gate_by_name("venc", 0);
  18. return 0;
  19. }
  20. EXPORT_SYMBOL(video_dac_disable);