linux/drivers/mxc/pmic/core/pmic_event.c File Reference

This file manage all event of PMIC component. More...

Data Structures

struct  pmic_event_callback_list_t

Functions

void pmic_event_list_init (void)
PMIC_STATUS pmic_event_subscribe (type_event event, pmic_event_callback_t callback)
PMIC_STATUS pmic_event_unsubscribe (type_event event, pmic_event_callback_t callback)
void pmic_event_callback (type_event event)

Detailed Description

This file manage all event of PMIC component.

It contains event subscription, unsubscription and callback launch methods implemeted.


Function Documentation

void pmic_event_callback ( type_event  event  ) 

This function calls all callback of a specific event.

Parameters:
event the active event number
Returns:
None

References pmic_event_callback_list_t::callback, pmic_event_callback_t::func, and pmic_event_callback_t::param.

Referenced by pmic_event_task().

void pmic_event_list_init ( void   ) 

This function initializes event list for PMIC event handling.

Referenced by pmic_probe().

PMIC_STATUS pmic_event_subscribe ( type_event  event,
pmic_event_callback_t  callback 
)

This function is used to subscribe on an event.

Parameters:
event the event number to be subscribed
callback the callback funtion to be subscribed
Returns:
This function returns 0 on SUCCESS, error on FAILURE.

References pmic_event_callback_t::func, pmic_event_callback_t::param, and pmic_event_unmask().

Referenced by pmic_adc_init(), pmic_audio_set_callback(), pmic_convity_set_callback(), pmic_dev_ioctl(), pmic_power_event(), pmic_rtc_event(), pmic_rtc_ioctl(), and pmic_rtc_wait_alarm().

PMIC_STATUS pmic_event_unsubscribe ( type_event  event,
pmic_event_callback_t  callback 
)

This function is used to unsubscribe on an event.

Parameters:
event the event number to be unsubscribed
callback the callback funtion to be unsubscribed
Returns:
This function returns 0 on SUCCESS, error on FAILURE.

References pmic_event_callback_list_t::callback, pmic_event_callback_t::func, pmic_event_callback_t::param, and pmic_event_mask().

Referenced by pmic_adc_deinit(), pmic_audio_deregister(), pmic_audio_set_callback(), pmic_convity_deregister_all(), pmic_convity_set_callback(), pmic_dev_ioctl(), pmic_power_event(), pmic_rtc_event(), pmic_rtc_ioctl(), and pmic_rtc_wait_alarm().

footer
©  Freescale Semiconductor, Inc., 2007.  All rights reserved.
Freescale Confidential Proprietary
NDA Required
doxygen