This is the main file of PMIC(mc13783) Light and Backlight driver. More...
Functions | |
static int | pmic_light_suspend (struct platform_device *dev, pm_message_t state) |
static int | pmic_light_resume (struct platform_device *pdev) |
PMIC_STATUS | pmic_bklit_tcled_master_enable (void) |
PMIC_STATUS | pmic_bklit_tcled_master_disable (void) |
PMIC_STATUS | pmic_bklit_master_enable (void) |
PMIC_STATUS | pmic_bklit_master_disable (void) |
PMIC_STATUS | pmic_bklit_set_current (t_bklit_channel channel, unsigned char level) |
PMIC_STATUS | pmic_bklit_get_current (t_bklit_channel channel, unsigned char *level) |
PMIC_STATUS | pmic_bklit_set_dutycycle (t_bklit_channel channel, unsigned char dc) |
PMIC_STATUS | pmic_bklit_get_dutycycle (t_bklit_channel channel, unsigned char *dc) |
PMIC_STATUS | pmic_bklit_set_cycle_time (unsigned char period) |
PMIC_STATUS | pmic_bklit_get_cycle_time (unsigned char *period) |
PMIC_STATUS | pmic_bklit_set_mode (t_bklit_channel channel, t_bklit_mode mode) |
PMIC_STATUS | pmic_bklit_get_mode (t_bklit_channel channel, t_bklit_mode *mode) |
PMIC_STATUS | pmic_bklit_rampup (t_bklit_channel channel) |
PMIC_STATUS | pmic_bklit_off_rampup (t_bklit_channel channel) |
PMIC_STATUS | pmic_bklit_rampdown (t_bklit_channel channel) |
PMIC_STATUS | pmic_bklit_off_rampdown (t_bklit_channel channel) |
PMIC_STATUS | pmic_bklit_enable_edge_slow (void) |
PMIC_STATUS | pmic_bklit_disable_edge_slow (void) |
PMIC_STATUS | pmic_bklit_get_edge_slow (bool *edge) |
PMIC_STATUS | pmic_bklit_set_strobemode (t_bklit_channel channel, t_bklit_strobe_mode mode) |
PMIC_STATUS | pmic_tcled_enable (t_tcled_mode mode, t_funlight_bank bank) |
PMIC_STATUS | pmic_tcled_disable (t_funlight_bank bank) |
PMIC_STATUS | pmic_tcled_get_mode (t_tcled_mode *mode, t_funlight_bank bank) |
PMIC_STATUS | pmic_tcled_ind_set_current (t_ind_channel channel, t_tcled_cur_level level, t_funlight_bank bank) |
PMIC_STATUS | pmic_tcled_ind_get_current (t_ind_channel channel, t_tcled_cur_level *level, t_funlight_bank bank) |
PMIC_STATUS | pmic_tcled_ind_set_blink_pattern (t_ind_channel channel, t_tcled_ind_blink_pattern pattern, bool skip, t_funlight_bank bank) |
PMIC_STATUS | pmic_tcled_ind_get_blink_pattern (t_ind_channel channel, t_tcled_ind_blink_pattern *pattern, bool *skip, t_funlight_bank bank) |
PMIC_STATUS | pmic_tcled_fun_set_current (t_funlight_bank bank, t_funlight_channel channel, t_tcled_cur_level level) |
PMIC_STATUS | pmic_tcled_fun_get_current (t_funlight_bank bank, t_funlight_channel channel, t_tcled_cur_level *level) |
PMIC_STATUS | pmic_tcled_fun_set_cycletime (t_funlight_bank bank, t_tcled_fun_cycle_time ct) |
PMIC_STATUS | pmic_tcled_fun_get_cycletime (t_funlight_bank bank, t_tcled_fun_cycle_time *ct) |
PMIC_STATUS | pmic_tcled_fun_set_dutycycle (t_funlight_bank bank, t_funlight_channel channel, unsigned char dc) |
PMIC_STATUS | pmic_tcled_fun_get_dutycycle (t_funlight_bank bank, t_funlight_channel channel, unsigned char *dc) |
PMIC_STATUS | pmic_tcled_fun_blendedramps (t_funlight_bank bank, t_tcled_fun_speed speed) |
PMIC_STATUS | pmic_tcled_fun_sawramps (t_funlight_bank bank, t_tcled_fun_speed speed) |
PMIC_STATUS | pmic_tcled_fun_blendedbowtie (t_funlight_bank bank, t_tcled_fun_speed speed) |
PMIC_STATUS | pmic_tcled_fun_chasinglightspattern (t_funlight_bank bank, t_chaselight_pattern pattern, t_tcled_fun_speed speed) |
PMIC_STATUS | pmic_tcled_fun_strobe (t_funlight_bank bank, t_funlight_channel channel, t_tcled_fun_strobe_speed speed) |
PMIC_STATUS | pmic_tcled_fun_rampup (t_funlight_bank bank, t_funlight_channel channel, bool rampup) |
PMIC_STATUS | pmic_tcled_get_fun_rampup (t_funlight_bank bank, t_funlight_channel channel, bool *rampup) |
PMIC_STATUS | pmic_tcled_fun_rampdown (t_funlight_bank bank, t_funlight_channel channel, bool rampdown) |
PMIC_STATUS | pmic_tcled_get_fun_rampdown (t_funlight_bank bank, t_funlight_channel channel, bool *rampdown) |
PMIC_STATUS | pmic_tcled_fun_triode_on (t_funlight_bank bank, t_funlight_channel channel) |
PMIC_STATUS | pmic_tcled_fun_triode_off (t_funlight_bank bank, t_funlight_channel channel) |
PMIC_STATUS | pmic_tcled_enable_edge_slow (void) |
PMIC_STATUS | pmic_tcled_disable_edge_slow (void) |
PMIC_STATUS | pmic_tcled_enable_half_current (void) |
PMIC_STATUS | pmic_tcled_disable_half_current (void) |
PMIC_STATUS | pmic_tcled_enable_audio_modulation (t_led_channel channel, t_aud_path path, t_aud_gain gain, bool lpf_bypass) |
PMIC_STATUS | pmic_tcled_disable_audio_modulation (void) |
PMIC_STATUS | pmic_bklit_set_boost_mode (bool en_dis) |
PMIC_STATUS | pmic_bklit_get_boost_mode (bool *en_dis) |
PMIC_STATUS | pmic_bklit_config_boost_mode (unsigned int abms, unsigned int abr) |
PMIC_STATUS | pmic_bklit_gets_boost_mode (unsigned int *abms, unsigned int *abr) |
static int | pmic_light_ioctl (struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) |
int | pmic_light_init_reg (void) |
static int | pmic_light_open (struct inode *inode, struct file *file) |
static int | pmic_light_release (struct inode *inode, struct file *file) |
Variables | |
static int | swait |
static int | suspend_flag |
static wait_queue_head_t | suspendq |
This is the main file of PMIC(mc13783) Light and Backlight driver.
PMIC_STATUS pmic_bklit_config_boost_mode | ( | unsigned int | abms, | |
unsigned int | abr | |||
) |
This function sets boost mode configuration Only on mc13783 2.0 or higher
abms | Define adaptive boost mode selection | |
abr | Define adaptive boost reference |
References pmic_get_version(), pmic_write_reg(), pmic_version_t::revision, and suspend_flag.
Referenced by pmic_light_ioctl().
PMIC_STATUS pmic_bklit_disable_edge_slow | ( | void | ) |
This function disables backlight analog edge slowing mode. The backlight drivers will default to an <93>Instant On<94> mode.
References pmic_write_reg(), and suspend_flag.
Referenced by pmic_light_ioctl().
PMIC_STATUS pmic_bklit_enable_edge_slow | ( | void | ) |
This function enables backlight analog edge slowing mode. Analog Edge Slowing slows down the transient edges to reduce the chance of coupling LED modulation activity into other circuits. Rise and fall times will be targeted for approximately 50usec.
References pmic_write_reg(), and suspend_flag.
Referenced by pmic_light_ioctl().
PMIC_STATUS pmic_bklit_get_boost_mode | ( | bool * | en_dis | ) |
This function gets the boost mode. Only on mc13783 2.0 or higher
en_dis | Enable or disable the boost mode |
References pmic_get_version(), pmic_read_reg(), pmic_version_t::revision, and suspend_flag.
Referenced by pmic_light_ioctl().
PMIC_STATUS pmic_bklit_get_current | ( | t_bklit_channel | channel, | |
unsigned char * | level | |||
) |
This function retrives backlight current level. The channels are not individually adjustable, hence the channel parameter is ignored.
channel | Backlight channel (Ignored because the channels are not individually adjustable) | |
level | Pointer to store backlight current level result. |
References pmic_read_reg(), and suspend_flag.
Referenced by pmic_light_ioctl().
PMIC_STATUS pmic_bklit_get_cycle_time | ( | unsigned char * | period | ) |
This function retrives a backlight channel cycle time setting.
period | Pointer to save backlight cycle time setting result. |
References pmic_read_reg(), and suspend_flag.
Referenced by pmic_light_ioctl().
PMIC_STATUS pmic_bklit_get_dutycycle | ( | t_bklit_channel | channel, | |
unsigned char * | dc | |||
) |
This function retrives a backlight channel duty cycle.
channel | Backlight channel. | |
dc | Pointer to backlight duty cycle. |
References pmic_read_reg(), and suspend_flag.
Referenced by pmic_light_ioctl().
PMIC_STATUS pmic_bklit_get_edge_slow | ( | bool * | edge | ) |
This function gets backlight analog edge slowing mode. DThe backlight
edge | Edge slowing mode. |
References pmic_read_reg(), and suspend_flag.
Referenced by pmic_light_ioctl().
PMIC_STATUS pmic_bklit_get_mode | ( | t_bklit_channel | channel, | |
t_bklit_mode * | mode | |||
) |
This function gets backlight operation mode. There are two modes of operations: current control and triode mode. The Duty Cycle/Cycle Time control is retained in Triode Mode. Audio coupling is not available in Triode Mode.
channel | Backlight channel. | |
mode | Backlight operation mode. |
References pmic_read_reg(), and suspend_flag.
Referenced by pmic_light_ioctl().
PMIC_STATUS pmic_bklit_gets_boost_mode | ( | unsigned int * | abms, | |
unsigned int * | abr | |||
) |
This function gets boost mode configuration Only on mc13783 2.0 or higher
abms | Define adaptive boost mode selection | |
abr | Define adaptive boost reference |
References pmic_get_version(), pmic_read_reg(), pmic_version_t::revision, and suspend_flag.
Referenced by pmic_light_ioctl().
PMIC_STATUS pmic_bklit_master_disable | ( | void | ) |
This function disables backlight. Not supported on mc13783 Use pmic_bklit_tcled_master_enable.
Referenced by pmic_light_ioctl().
PMIC_STATUS pmic_bklit_master_enable | ( | void | ) |
This function enables backlight. Not supported on mc13783 Use pmic_bklit_tcled_master_enable.
Referenced by pmic_light_ioctl().
PMIC_STATUS pmic_bklit_off_rampdown | ( | t_bklit_channel | channel | ) |
This function stops backlight brightness ramp down function.
channel | Backlight channel. |
References pmic_write_reg(), and suspend_flag.
Referenced by pmic_light_ioctl().
PMIC_STATUS pmic_bklit_off_rampup | ( | t_bklit_channel | channel | ) |
This function stops backlight brightness ramp up function;
channel | Backlight channel. |
References pmic_write_reg(), and suspend_flag.
Referenced by pmic_light_ioctl().
PMIC_STATUS pmic_bklit_rampdown | ( | t_bklit_channel | channel | ) |
This function starts backlight brightness ramp down function; ramp time is fixed at 0.5 seconds.
channel | Backlight channel. |
References pmic_write_reg(), and suspend_flag.
Referenced by pmic_light_ioctl().
PMIC_STATUS pmic_bklit_rampup | ( | t_bklit_channel | channel | ) |
This function starts backlight brightness ramp up function; ramp time is fixed at 0.5 seconds.
channel | Backlight channel. |
References pmic_write_reg(), and suspend_flag.
Referenced by pmic_light_ioctl().
PMIC_STATUS pmic_bklit_set_boost_mode | ( | bool | en_dis | ) |
This function enables the boost mode. Only on mc13783 2.0 or higher
en_dis | Enable or disable the boost mode |
References pmic_get_version(), pmic_write_reg(), pmic_version_t::revision, and suspend_flag.
Referenced by pmic_light_ioctl().
PMIC_STATUS pmic_bklit_set_current | ( | t_bklit_channel | channel, | |
unsigned char | level | |||
) |
This function sets backlight current level.
channel | Backlight channel | |
level | Backlight current level, as the following table.
* level main & aux keyboard * ------ ----------- -------- * 0 0 mA 0 mA * 1 3 mA 12 mA * 2 6 mA 24 mA * 3 9 mA 36 mA * 4 12 mA 48 mA * 5 15 mA 60 mA * 6 18 mA 72 mA * 7 21 mA 84 mA * |
References pmic_write_reg(), and suspend_flag.
Referenced by pmic_light_ioctl().
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 * |
References pmic_write_reg(), and suspend_flag.
Referenced by pmic_light_ioctl().
PMIC_STATUS pmic_bklit_set_dutycycle | ( | t_bklit_channel | channel, | |
unsigned char | dc | |||
) |
This function sets a backlight channel duty cycle. LED perceived brightness for each zone may be individually set by setting duty cycle. The default setting is for 0% duty cycle; this keeps all zone drivers turned off even after the master enable command. Each LED current sink can be turned on and adjusted for brightness with an independent 4 bit word for a duty cycle ranging from 0% to 100% in approximately 6.7% steps.
channel | Backlight channel. | |
dc | Backlight duty cycle, as the following table.
* dc Duty Cycle (% On-time over Cycle Time) * ------ --------------------------------------- * 0 0% * 1 6.7% * 2 13.3% * 3 20% * 4 26.7% * 5 33.3% * 6 40% * 7 46.7% * 8 53.3% * 9 60% * 10 66.7% * 11 73.3% * 12 80% * 13 86.7% * 14 93.3% * 15 100% * |
References pmic_read_reg(), pmic_write_reg(), and suspend_flag.
Referenced by pmic_light_ioctl().
PMIC_STATUS pmic_bklit_set_mode | ( | t_bklit_channel | channel, | |
t_bklit_mode | mode | |||
) |
This function sets backlight operation mode. There are two modes of operations: current control and triode mode. The Duty Cycle/Cycle Time control is retained in Triode Mode. Audio coupling is not available in Triode Mode.
channel | Backlight channel. | |
mode | Backlight operation mode. |
References pmic_read_reg(), pmic_write_reg(), and suspend_flag.
Referenced by pmic_light_ioctl().
PMIC_STATUS pmic_bklit_set_strobemode | ( | t_bklit_channel | channel, | |
t_bklit_strobe_mode | mode | |||
) |
This function sets backlight Strobe Light Pulsing mode.
channel | Backlight channel. | |
mode | Strobe Light Pulsing mode. |
PMIC_STATUS pmic_bklit_tcled_master_disable | ( | void | ) |
This function disables backlight & tcled.
References pmic_write_reg(), and suspend_flag.
Referenced by pmic_light_ioctl().
PMIC_STATUS pmic_bklit_tcled_master_enable | ( | void | ) |
This function enables backlight & tcled.
References pmic_write_reg(), and suspend_flag.
Referenced by pmic_light_ioctl().
int pmic_light_init_reg | ( | void | ) |
This function initialize Light registers of mc13783 with 0.
Referenced by pmic_light_suspend().
static int pmic_light_ioctl | ( | struct inode * | inode, | |
struct file * | file, | |||
unsigned int | cmd, | |||
unsigned long | arg | |||
) | [static] |
This function implements IOCTL controls on a PMIC Light device.
inode | pointer on the node | |
file | pointer on the file | |
cmd | the command | |
arg | the parameter |
References t_bklit_setting_param::abms, t_bklit_setting_param::abr, t_fun_param::bank, t_tcled_enable_param::bank, t_tcled_ind_param::channel, t_fun_param::channel, t_bklit_setting_param::channel, t_bklit_setting_param::cycle_time, t_bklit_setting_param::duty_cycle, t_bklit_setting_param::edge_slow, t_bklit_setting_param::en_dis, t_tcled_ind_param::half_current, t_tcled_ind_param::level, t_tcled_enable_param::mode, t_bklit_setting_param::mode, t_tcled_ind_param::pattern, t_fun_param::pattern, pmic_bklit_config_boost_mode(), pmic_bklit_disable_edge_slow(), pmic_bklit_enable_edge_slow(), pmic_bklit_get_boost_mode(), pmic_bklit_get_current(), pmic_bklit_get_cycle_time(), pmic_bklit_get_dutycycle(), pmic_bklit_get_edge_slow(), pmic_bklit_get_mode(), pmic_bklit_gets_boost_mode(), pmic_bklit_master_disable(), pmic_bklit_master_enable(), pmic_bklit_off_rampdown(), pmic_bklit_off_rampup(), pmic_bklit_rampdown(), pmic_bklit_rampup(), pmic_bklit_set_boost_mode(), pmic_bklit_set_current(), pmic_bklit_set_cycle_time(), pmic_bklit_set_dutycycle(), pmic_bklit_set_mode(), pmic_bklit_tcled_master_disable(), pmic_bklit_tcled_master_enable(), pmic_tcled_disable(), pmic_tcled_disable_half_current(), pmic_tcled_enable(), pmic_tcled_enable_half_current(), pmic_tcled_fun_blendedbowtie(), pmic_tcled_fun_blendedramps(), pmic_tcled_fun_chasinglightspattern(), pmic_tcled_fun_rampdown(), pmic_tcled_fun_rampup(), pmic_tcled_fun_sawramps(), pmic_tcled_fun_strobe(), pmic_tcled_get_fun_rampdown(), pmic_tcled_get_fun_rampup(), pmic_tcled_ind_get_blink_pattern(), pmic_tcled_ind_get_current(), pmic_tcled_ind_set_blink_pattern(), pmic_tcled_ind_set_current(), t_tcled_ind_param::rampdown, t_tcled_ind_param::rampup, t_tcled_ind_param::skip, and t_bklit_setting_param::strobe.
static int pmic_light_open | ( | struct inode * | inode, | |
struct file * | file | |||
) | [static] |
This function implements the open method on a mc13783 light device.
inode | pointer on the node | |
file | pointer on the file |
References suspend_flag, suspendq, and swait.
static int pmic_light_release | ( | struct inode * | inode, | |
struct file * | file | |||
) | [static] |
This function implements the release method on a mc13783 light device.
inode | pointer on the node | |
file | pointer on the file |
References suspend_flag, suspendq, and swait.
static int pmic_light_resume | ( | struct platform_device * | pdev | ) | [static] |
This is the resume of power management for the pmic light API. It suports RESTORE state.
dev | the device |
References suspend_flag, suspendq, and swait.
static int pmic_light_suspend | ( | struct platform_device * | dev, | |
pm_message_t | state | |||
) | [static] |
This is the suspend of power management for the pmic light API. It suports SAVE and POWER_DOWN state.
pdev | the device | |
state | the state |
References pmic_light_init_reg(), and suspend_flag.
PMIC_STATUS pmic_tcled_disable | ( | t_funlight_bank | bank | ) |
This function disables tri-color LED.
bank | Selected tri-color bank |
References pmic_write_reg(), and suspend_flag.
Referenced by pmic_light_ioctl().
PMIC_STATUS pmic_tcled_disable_audio_modulation | ( | void | ) |
This function disables backlight or Tri-color LED audio modulation.
PMIC_STATUS pmic_tcled_disable_edge_slow | ( | void | ) |
This function disables Tri-color LED edge slowing.
References pmic_write_reg(), and suspend_flag.
PMIC_STATUS pmic_tcled_disable_half_current | ( | void | ) |
This function disables Tri-color LED half current mode.
References pmic_write_reg(), and suspend_flag.
Referenced by pmic_light_ioctl().
PMIC_STATUS pmic_tcled_enable | ( | t_tcled_mode | mode, | |
t_funlight_bank | bank | |||
) |
This function enables tri-color LED.
mode | Tri-color LED operation mode. | |
bank | Selected tri-color bank |
References pmic_write_reg(), and suspend_flag.
Referenced by pmic_light_ioctl().
PMIC_STATUS pmic_tcled_enable_audio_modulation | ( | t_led_channel | channel, | |
t_aud_path | path, | |||
t_aud_gain | gain, | |||
bool | lpf_bypass | |||
) |
This function enables backlight or Tri-color LED audio modulation.
PMIC_STATUS pmic_tcled_enable_edge_slow | ( | void | ) |
This function enables Tri-color LED edge slowing.
References pmic_write_reg(), and suspend_flag.
PMIC_STATUS pmic_tcled_enable_half_current | ( | void | ) |
This function enables Tri-color LED half current mode.
References pmic_write_reg(), and suspend_flag.
Referenced by pmic_light_ioctl().
PMIC_STATUS pmic_tcled_fun_blendedbowtie | ( | t_funlight_bank | bank, | |
t_tcled_fun_speed | speed | |||
) |
This function initiates Blended Bowtie fun light pattern.
bank | Tri-color LED bank | |
speed | Speed of pattern. |
References pmic_write_reg(), and suspend_flag.
Referenced by pmic_light_ioctl().
PMIC_STATUS pmic_tcled_fun_blendedramps | ( | t_funlight_bank | bank, | |
t_tcled_fun_speed | speed | |||
) |
This function initiates Blended Ramp fun light pattern.
bank | Tri-color LED bank | |
speed | Speed of pattern. |
References pmic_write_reg(), and suspend_flag.
Referenced by pmic_light_ioctl().
PMIC_STATUS pmic_tcled_fun_chasinglightspattern | ( | t_funlight_bank | bank, | |
t_chaselight_pattern | pattern, | |||
t_tcled_fun_speed | speed | |||
) |
This function initiates Chasing Lights fun light pattern.
bank | Tri-color LED bank | |
pattern | Chasing light pattern mode. | |
speed | Speed of pattern. |
References pmic_write_reg(), and suspend_flag.
Referenced by pmic_light_ioctl().
PMIC_STATUS pmic_tcled_fun_get_current | ( | t_funlight_bank | bank, | |
t_funlight_channel | channel, | |||
t_tcled_cur_level * | level | |||
) |
This function retrives a tri-color LED channel current level in Fun Light mode.
bank | Tri-color LED bank | |
channel | Tri-color LED channel. | |
level | Pointer to current level. |
References pmic_read_reg(), and suspend_flag.
PMIC_STATUS pmic_tcled_fun_get_cycletime | ( | t_funlight_bank | bank, | |
t_tcled_fun_cycle_time * | ct | |||
) |
This function retrives tri-color LED cycle time in Fun Light mode.
bank | Tri-color LED bank | |
ct | Pointer to cycle time. |
References pmic_read_reg(), and suspend_flag.
PMIC_STATUS pmic_tcled_fun_get_dutycycle | ( | t_funlight_bank | bank, | |
t_funlight_channel | channel, | |||
unsigned char * | dc | |||
) |
This function retrives a tri-color LED channel duty cycle in Fun Light mode.
bank | Tri-color LED bank | |
channel | Tri-color LED channel. | |
dc | Pointer to duty cycle. |
References pmic_read_reg(), and suspend_flag.
PMIC_STATUS pmic_tcled_fun_rampdown | ( | t_funlight_bank | bank, | |
t_funlight_channel | channel, | |||
bool | rampdown | |||
) |
This function initiates Tri-color LED brightness Ramp Down function; Ramp time is fixed at 1 second.
bank | Tri-color LED bank | |
channel | Tri-color LED channel. | |
rampdown | Ramp-down configuration. |
References pmic_write_reg(), and suspend_flag.
Referenced by pmic_light_ioctl().
PMIC_STATUS pmic_tcled_fun_rampup | ( | t_funlight_bank | bank, | |
t_funlight_channel | channel, | |||
bool | rampup | |||
) |
This function initiates Tri-color LED brightness Ramp Up function; Ramp time is fixed at 1 second.
bank | Tri-color LED bank | |
channel | Tri-color LED channel. | |
rampup | Ramp-up configuration. |
References pmic_write_reg(), and suspend_flag.
Referenced by pmic_light_ioctl().
PMIC_STATUS pmic_tcled_fun_sawramps | ( | t_funlight_bank | bank, | |
t_tcled_fun_speed | speed | |||
) |
This function initiates Saw Ramp fun light pattern.
bank | Tri-color LED bank | |
speed | Speed of pattern. |
References pmic_write_reg(), and suspend_flag.
Referenced by pmic_light_ioctl().
PMIC_STATUS pmic_tcled_fun_set_current | ( | t_funlight_bank | bank, | |
t_funlight_channel | channel, | |||
t_tcled_cur_level | level | |||
) |
This function sets a tri-color LED channel current level in Fun Light mode.
bank | Tri-color LED bank | |
channel | Tri-color LED channel. | |
level | Current level. |
References pmic_write_reg(), and suspend_flag.
PMIC_STATUS pmic_tcled_fun_set_cycletime | ( | t_funlight_bank | bank, | |
t_tcled_fun_cycle_time | ct | |||
) |
This function sets tri-color LED cycle time.
bank | Tri-color LED bank | |
ct | Cycle time. |
References pmic_write_reg(), and suspend_flag.
PMIC_STATUS pmic_tcled_fun_set_dutycycle | ( | t_funlight_bank | bank, | |
t_funlight_channel | channel, | |||
unsigned char | dc | |||
) |
This function sets a tri-color LED channel duty cycle in Fun Light mode.
bank | Tri-color LED bank | |
channel | Tri-color LED channel. | |
dc | Duty cycle. |
References pmic_write_reg(), and suspend_flag.
PMIC_STATUS pmic_tcled_fun_strobe | ( | t_funlight_bank | bank, | |
t_funlight_channel | channel, | |||
t_tcled_fun_strobe_speed | speed | |||
) |
This function initiates Strobe Mode fun light pattern.
bank | Tri-color LED bank | |
channel | Tri-color LED channel. | |
speed | Speed of pattern. |
Referenced by pmic_light_ioctl().
PMIC_STATUS pmic_tcled_fun_triode_off | ( | t_funlight_bank | bank, | |
t_funlight_channel | channel | |||
) |
This function disables a Tri-color LED channel triode mode.
bank | Tri-color LED bank | |
channel | Tri-color LED channel. |
References pmic_write_reg(), and suspend_flag.
PMIC_STATUS pmic_tcled_fun_triode_on | ( | t_funlight_bank | bank, | |
t_funlight_channel | channel | |||
) |
This function enables a Tri-color channel triode mode.
bank | Tri-color LED bank | |
channel | Tri-color LED channel. |
References pmic_write_reg(), and suspend_flag.
PMIC_STATUS pmic_tcled_get_fun_rampdown | ( | t_funlight_bank | bank, | |
t_funlight_channel | channel, | |||
bool * | rampdown | |||
) |
This function initiates Tri-color LED brightness Ramp Down function; Ramp time is fixed at 1 second.
bank | Tri-color LED bank | |
channel | Tri-color LED channel. | |
rampdown | Ramp-down configuration. |
References pmic_read_reg(), and suspend_flag.
Referenced by pmic_light_ioctl().
PMIC_STATUS pmic_tcled_get_fun_rampup | ( | t_funlight_bank | bank, | |
t_funlight_channel | channel, | |||
bool * | rampup | |||
) |
This function gets Tri-color LED brightness Ramp Up function; Ramp time is fixed at 1 second.
bank | Tri-color LED bank | |
channel | Tri-color LED channel. | |
rampup | Ramp-up configuration. |
References pmic_read_reg(), and suspend_flag.
Referenced by pmic_light_ioctl().
PMIC_STATUS pmic_tcled_get_mode | ( | t_tcled_mode * | mode, | |
t_funlight_bank | bank | |||
) |
This function retrives tri-color LED operation mode.
mode | Pointer to Tri-color LED operation mode. | |
bank | Selected tri-color bank |
References pmic_read_reg(), and suspend_flag.
PMIC_STATUS pmic_tcled_ind_get_blink_pattern | ( | t_ind_channel | channel, | |
t_tcled_ind_blink_pattern * | pattern, | |||
bool * | skip, | |||
t_funlight_bank | bank | |||
) |
This function retrives a tri-color LED channel blinking pattern in indication mode.
channel | Tri-color LED channel. | |
pattern | Pointer to Blinking pattern. | |
skip | Pointer to a boolean varible indicating if skip | |
bank | Selected tri-color bank a cycle after each cycle. |
References pmic_read_reg(), and suspend_flag.
Referenced by pmic_light_ioctl().
PMIC_STATUS pmic_tcled_ind_get_current | ( | t_ind_channel | channel, | |
t_tcled_cur_level * | level, | |||
t_funlight_bank | bank | |||
) |
This function retrives a tri-color LED channel current level in indicator mode.
channel | Tri-color LED channel. | |
level | Pointer to current level. | |
bank | Selected tri-color bank |
References pmic_read_reg(), and suspend_flag.
Referenced by pmic_light_ioctl().
PMIC_STATUS pmic_tcled_ind_set_blink_pattern | ( | t_ind_channel | channel, | |
t_tcled_ind_blink_pattern | pattern, | |||
bool | skip, | |||
t_funlight_bank | bank | |||
) |
This function sets a tri-color LED channel blinking pattern in indication mode.
channel | Tri-color LED channel. | |
pattern | Blinking pattern. | |
skip | If true, skip a cycle after each cycle. | |
bank | Selected tri-color bank |
References pmic_write_reg(), and suspend_flag.
Referenced by pmic_light_ioctl().
PMIC_STATUS pmic_tcled_ind_set_current | ( | t_ind_channel | channel, | |
t_tcled_cur_level | level, | |||
t_funlight_bank | bank | |||
) |
This function sets a tri-color LED channel current level in indicator mode.
channel | Tri-color LED channel. | |
level | Current level. | |
bank | Selected tri-color bank |
References pmic_write_reg(), and suspend_flag.
Referenced by pmic_light_ioctl().
int suspend_flag [static] |
To indicate whether any of the light devices are suspending
Referenced by pmic_bklit_config_boost_mode(), pmic_bklit_disable_edge_slow(), pmic_bklit_enable_edge_slow(), pmic_bklit_get_boost_mode(), pmic_bklit_get_current(), pmic_bklit_get_cycle_time(), pmic_bklit_get_dutycycle(), pmic_bklit_get_edge_slow(), pmic_bklit_get_mode(), pmic_bklit_gets_boost_mode(), pmic_bklit_off_rampdown(), pmic_bklit_off_rampup(), pmic_bklit_rampdown(), pmic_bklit_rampup(), pmic_bklit_set_boost_mode(), pmic_bklit_set_current(), pmic_bklit_set_cycle_time(), pmic_bklit_set_dutycycle(), pmic_bklit_set_mode(), pmic_bklit_tcled_master_disable(), pmic_bklit_tcled_master_enable(), pmic_light_open(), pmic_light_release(), pmic_light_resume(), pmic_light_suspend(), pmic_tcled_disable(), pmic_tcled_disable_edge_slow(), pmic_tcled_disable_half_current(), pmic_tcled_enable(), pmic_tcled_enable_edge_slow(), pmic_tcled_enable_half_current(), pmic_tcled_fun_blendedbowtie(), pmic_tcled_fun_blendedramps(), pmic_tcled_fun_chasinglightspattern(), pmic_tcled_fun_get_current(), pmic_tcled_fun_get_cycletime(), pmic_tcled_fun_get_dutycycle(), pmic_tcled_fun_rampdown(), pmic_tcled_fun_rampup(), pmic_tcled_fun_sawramps(), pmic_tcled_fun_set_current(), pmic_tcled_fun_set_cycletime(), pmic_tcled_fun_set_dutycycle(), pmic_tcled_fun_triode_off(), pmic_tcled_fun_triode_on(), pmic_tcled_get_fun_rampdown(), pmic_tcled_get_fun_rampup(), pmic_tcled_get_mode(), pmic_tcled_ind_get_blink_pattern(), pmic_tcled_ind_get_current(), pmic_tcled_ind_set_blink_pattern(), and pmic_tcled_ind_set_current().
wait_queue_head_t suspendq [static] |
The suspendq is used to block application calls
Referenced by pmic_light_open(), pmic_light_release(), and pmic_light_resume().
int swait [static] |
Number of users waiting in suspendq
Referenced by pmic_light_open(), pmic_light_release(), and pmic_light_resume().
© Freescale Semiconductor, Inc., 2007.
All rights reserved. Freescale Confidential Proprietary NDA Required |
![]() |