drivers/gpio/gpio_qmsi.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 gpio_aon_device_ctrl(struct device *port, u32_t ctrl_command,
				void *context)
{
	if (ctrl_command == DEVICE_PM_SET_POWER_STATE) {
		u32_t device_pm_state = *(u32_t *)context;
		if (device_pm_state == DEVICE_PM_SUSPEND_STATE ||
		    device_pm_state == DEVICE_PM_ACTIVE_STATE) {
			gpio_qmsi_set_power_state(port, device_pm_state);
		}
	} else if (ctrl_command == DEVICE_PM_GET_POWER_STATE) {
		*((u32_t *)context) = gpio_qmsi_get_power_state(port);
	}
	return 0;
}
static int gpio_aon_device_ctrl ( struct device * port , u32_t ctrl_command , void * context ) { if ( ctrl_command == DEVICE_PM_SET_POWER_STATE ) { u32_t device_pm_state = * ( u32_t * ) context ; if ( device_pm_state == DEVICE_PM_SUSPEND_STATE || device_pm_state == DEVICE_PM_ACTIVE_STATE ) { gpio_qmsi_set_power_state ( port , device_pm_state ) ; } } else if ( ctrl_command == DEVICE_PM_GET_POWER_STATE ) { * ( ( u32_t * ) context ) = gpio_qmsi_get_power_state ( port ) ; } 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