drivers/spi/spi_qmsi_ss.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 ss_spi_master_qmsi_device_ctrl(struct device *port,
				       u32_t ctrl_command, void *context)
{
	if (ctrl_command == DEVICE_PM_SET_POWER_STATE) {
		if (*((u32_t *)context) == DEVICE_PM_SUSPEND_STATE) {
			return ss_spi_master_suspend_device(port);
		} else if (*((u32_t *)context) == DEVICE_PM_ACTIVE_STATE) {
			return ss_spi_master_resume_device_from_suspend(port);
		}
	} else if (ctrl_command == DEVICE_PM_GET_POWER_STATE) {
		*((u32_t *)context) = ss_spi_master_get_power_state(port);
	}
	return 0;
}
static int ss_spi_master_qmsi_device_ctrl ( struct device * port , u32_t ctrl_command , void * context ) { if ( ctrl_command == DEVICE_PM_SET_POWER_STATE ) { if ( * ( ( u32_t * ) context ) == DEVICE_PM_SUSPEND_STATE ) { return ss_spi_master_suspend_device ( port ) ; } else if ( * ( ( u32_t * ) context ) == DEVICE_PM_ACTIVE_STATE ) { return ss_spi_master_resume_device_from_suspend ( port ) ; } } else if ( ctrl_command == DEVICE_PM_GET_POWER_STATE ) { * ( ( u32_t * ) context ) = ss_spi_master_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