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

PMIC_STATUS pmic_tcled_fun_blendedramps ( t_funlight_bank  bank,
t_tcled_fun_speed  speed 
)

This function initiates Blended Ramp fun light pattern.

Parameters:
bank Tri-color LED bank
speed Speed of pattern.
Returns:
This function returns PMIC_SUCCESS if successful.

Definition at line 1545 of file pmic_light.c.

References pmic_write_reg(), and suspend_flag.

Referenced by pmic_light_ioctl().

{
      unsigned int mask = 0;
      unsigned int value = 0;

      if (suspend_flag == 1) {
            return -EBUSY;
      }

      switch (speed) {
      case TC_OFF:
            value = BITFVAL(BITS_FUN_LIGHT, FUN_LIGHTS_OFF);
            break;
      case TC_SLOW:
            value = BITFVAL(BITS_FUN_LIGHT, BLENDED_RAMPS_SLOW);
            break;
      case TC_FAST:
            value = BITFVAL(BITS_FUN_LIGHT, BLENDED_RAMPS_FAST);
            break;
      default:
            return PMIC_PARAMETER_ERROR;
      }

      mask = BITFMASK(BITS_FUN_LIGHT);
      CHECK_ERROR(pmic_write_reg(LREG_0, value, mask));

      return PMIC_SUCCESS;
}


Generated by  Doxygen 1.6.0   Back to index