/*!
 * This function is the bottom half handler of the PMIC interrupt.
 * It checks for active events and launches callback for the
 * active events.
 */
void pmic_bh_handler(struct work_struct *work)
{
	unsigned int loop;
	unsigned int count = 0;

	count = pmic_get_active_events(active_events);

	for (loop = 0; loop < count; loop++) {
		pmic_event_callback(active_events[loop]);
	}

	return;
}
Example #2
0
static void pmic_event_task(struct work_struct *work)
{
	unsigned int count = 0;
	int i;

	count = pmic_get_active_events(active_events);
	pr_debug("active events number %d\n", count);

	/* call handlers for all active events */
	for (i = 0; i < count; i++)
		pmic_event_callback(active_events[i]);

	/* re-trigger this task, but only if somebody is watching */
	if (events_enabled)
		pmic_trigger_poll();

	return;
}