Logo Search packages:      
Sourcecode: linux-fsl-imx51 version File versions  Download package

PMIC_STATUS pmic_bklit_get_boost_mode ( bool *  en_dis  ) 

This function gets the boost mode. Only on mc13783 2.0 or higher

Parameters:
en_dis Enable or disable the boost mode
Returns:
This function returns 0 if successful.

Definition at line 2191 of file pmic_light.c.

References pmic_get_version(), pmic_read_reg(), pmic_version_t::revision, and suspend_flag.

Referenced by pmic_light_ioctl().

{
      pmic_version_t mc13783_ver;
      unsigned int mask;
      unsigned int value;
      mc13783_ver = pmic_get_version();
      if (mc13783_ver.revision >= 20) {

            if (suspend_flag == 1) {
                  return -EBUSY;
            }
            mask = BITFMASK(BIT_BOOSTEN);
            CHECK_ERROR(pmic_read_reg(LREG_0, &value, mask));
            *en_dis = BITFEXT(value, BIT_BOOSTEN);
            return PMIC_SUCCESS;
      } else {
            return PMIC_NOT_SUPPORTED;
      }
}


Generated by  Doxygen 1.6.0   Back to index