drivers/interrupt_controller/arcv2_irq_unit.c
/*
 * Implements the driver control management functionality
 * the *context may include IN data or/and OUT data
 */
Implements the driver control management functionality
the *context may include IN data or/and OUT data
Implements the driver control management functionality the * context may include IN data or / and OUT data
static int _arc_v2_irq_unit_device_ctrl(struct device *device,
		u32_t ctrl_command, void *context)
{
	if (ctrl_command == DEVICE_PM_SET_POWER_STATE) {
		if (*((u32_t *)context) == DEVICE_PM_SUSPEND_STATE) {
			return _arc_v2_irq_unit_suspend(device);
		} else if (*((u32_t *)context) == DEVICE_PM_ACTIVE_STATE) {
			return _arc_v2_irq_unit_resume(device);
		}
	} else if (ctrl_command == DEVICE_PM_GET_POWER_STATE) {
		*((u32_t *)context) = _arc_v2_irq_unit_get_state(device);
		return 0;
	}
	return 0;
}
static int _arc_v2_irq_unit_device_ctrl ( struct device * device , u32_t ctrl_command , void * context ) { if ( ctrl_command == DEVICE_PM_SET_POWER_STATE ) { if ( * ( ( u32_t * ) context ) == DEVICE_PM_SUSPEND_STATE ) { return _arc_v2_irq_unit_suspend ( device ) ; } else if ( * ( ( u32_t * ) context ) == DEVICE_PM_ACTIVE_STATE ) { return _arc_v2_irq_unit_resume ( device ) ; } } else if ( ctrl_command == DEVICE_PM_GET_POWER_STATE ) { * ( ( u32_t * ) context ) = _arc_v2_irq_unit_get_state ( device ) ; return 0 ; } return 0 ; }
Implements the driver control management functionality
 the *context may include IN data or/and OUT data
Implements the driver control management functionality the * context may include IN data or / and OUT data