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

PMIC_STATUS pmic_bklit_set_cycle_time ( unsigned char  period  ) 

This function sets a backlight channel cycle time. Cycle Time is defined as the period of a complete cycle of Time_on + Time_off. The default Cycle Time is set to 0.01 seconds such that the 100 Hz on-off cycling is averaged out by the eye to eliminate flickering. Additionally, the Cycle Time can be programmed to intentionally extend the period of on-off cycles for a visual pulsating or blinking effect.

period Backlight cycle time, as the following table.
                                period      Cycle Time
                               --------    ------------
                                  0          0.01 seconds
                                  1          0.1 seconds
                                  2          0.5 seconds
                                  3          2 seconds
This function returns PMIC_SUCCESS if successful.

Definition at line 438 of file pmic_light.c.

References pmic_write_reg(), and suspend_flag.

Referenced by pmic_light_ioctl().

      unsigned int mask;
      unsigned int value;

      if (suspend_flag == 1) {
            return -EBUSY;
      if (period > 3) {
            return PMIC_PARAMETER_ERROR;
      mask = BITFMASK(BIT_PERIOD);
      value = BITFVAL(BIT_PERIOD, period);
      CHECK_ERROR(pmic_write_reg(LREG_2, value, mask));
      return PMIC_SUCCESS;

Generated by  Doxygen 1.6.0   Back to index