Logo Search packages:      
Sourcecode: linux version File versions  Download package

PMIC_STATUS pmic_read_reg ( int  reg,
unsigned int *  reg_value,
unsigned int  reg_mask 

This function is called by PMIC clients to read a register on PMIC.

regnumber of register
reg_valuereturn value of register
reg_maskBitmap mask indicating which bits to modify
This function returns PMIC_SUCCESS if successful.

Definition at line 48 of file pmic_external.c.

      int ret = 0;
      unsigned int temp = 0;

      ret = pmic_read(reg, &temp);
      if (ret != PMIC_SUCCESS) {
            return PMIC_ERROR;
      *reg_value = (temp & reg_mask);

      pr_debug("Read REG[ %d ] = 0x%x\n", reg, *reg_value);

      return ret;

Generated by  Doxygen 1.6.0   Back to index