qcacmn: Define init-deinit basic framework for convergence
Define basic dispatcher framework for init/deinit. Each individual component is supposed to define its own init/deinit primitives and remove dummy place holder primitives. Change-Id: Ibaf64c6a6715da2ab02f646ddb4fca4e6f46e031 CRs-Fixed: 1095741
This commit is contained in:
131
init_deinit/dispatcher/inc/dispatcher_init_deinit.h
Normal file
131
init_deinit/dispatcher/inc/dispatcher_init_deinit.h
Normal file
@@ -0,0 +1,131 @@
|
||||
/*
|
||||
* Copyright (c) 2016 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
* above copyright notice and this permission notice appear in all
|
||||
* copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
|
||||
* AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
||||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* DOC: This file provides various init/deinit trigger point for new
|
||||
* components.
|
||||
*/
|
||||
|
||||
#if !defined(__DISPATCHER_INIT_H)
|
||||
#define __DISPATCHER_INIT_H
|
||||
|
||||
#include <qdf_types.h>
|
||||
|
||||
/**
|
||||
* dispatcher_init(): API to init all new components
|
||||
*
|
||||
* This API calls all new components init APIs. This is invoked
|
||||
* from HDD/OS_If layer during:
|
||||
* 1) Driver load sequence
|
||||
* 2) before probing the attached device.
|
||||
* 3) FW is not ready
|
||||
* 4) WMI channel is not established
|
||||
*
|
||||
* A component can't communicate with FW during init stage.
|
||||
*
|
||||
* Return: none
|
||||
*/
|
||||
QDF_STATUS dispatcher_init(void);
|
||||
|
||||
/**
|
||||
* dispatcher_deinit(): API to de-init all new components
|
||||
*
|
||||
* This API calls all new components de-init APIs. This is invoked
|
||||
* from HDD/OS_If layer during:
|
||||
* 1) Driver unload sequence
|
||||
* 2) FW is dead
|
||||
* 3) WMI channel is destroyed
|
||||
* 4) all PDEV and PSOC objects are destroyed
|
||||
*
|
||||
* A component can't communicate with FW during de-init stage.
|
||||
*
|
||||
* Return: none
|
||||
*/
|
||||
QDF_STATUS dispatcher_deinit(void);
|
||||
|
||||
/**
|
||||
* dispatcher_psoc_open(): API to trigger PSOC open for all new components
|
||||
*
|
||||
* This API calls all new components PSOC OPEN APIs. This is invoked from
|
||||
* HDD/OS_If layer during:
|
||||
* 1) Driver load sequence
|
||||
* 2) PSOC object is created
|
||||
* 3) FW is not yet ready
|
||||
* 4) WMI channel is not yet established with FW
|
||||
*
|
||||
* PSOC open happens before FW WMI ready and hence a component can't
|
||||
* communicate with FW during PSOC open sequence.
|
||||
*
|
||||
* Return: none
|
||||
*/
|
||||
QDF_STATUS dispatcher_psoc_open(void);
|
||||
|
||||
/**
|
||||
* dispatcher_psoc_close(): API to trigger PSOC close for all new components
|
||||
*
|
||||
* This API calls all new components PSOC CLOSE APIs. This is invoked from
|
||||
* HDD/OS_If layer during:
|
||||
* 1) Driver unload sequence
|
||||
* 2) PSOC object is destroyed
|
||||
* 3) FW is already dead(PDEV suspended)
|
||||
* 4) WMI channel is destroyed with FW
|
||||
*
|
||||
* A component can't communicate with FW during PSOC close.
|
||||
*
|
||||
* Return: none
|
||||
*/
|
||||
QDF_STATUS dispatcher_psoc_close(void);
|
||||
|
||||
/**
|
||||
* dispatcher_psoc_enable(): API to trigger PSOC enable(start) for all new
|
||||
* components
|
||||
*
|
||||
* This API calls all new components PSOC enable(start) APIs. This is invoked
|
||||
* from HDD/OS_If layer during:
|
||||
* 1) Driver load sequence
|
||||
* 2) PSOC object is created
|
||||
* 3) WMI endpoint and WMI channel is ready with FW
|
||||
* 4) WMI FW ready event is also received from FW.
|
||||
*
|
||||
* FW is already ready and WMI channel is established by this time so a
|
||||
* component can communicate with FW during PSOC enable sequence.
|
||||
*
|
||||
* Return: none
|
||||
*/
|
||||
QDF_STATUS dispatcher_psoc_enable(void);
|
||||
|
||||
/**
|
||||
* dispatcher_psoc_disable(): API to trigger PSOC disable(stop) for all new
|
||||
* components
|
||||
*
|
||||
* This API calls all new components PSOC disable(stop) APIs. This is invoked
|
||||
* from HDD/OS_If layer during:
|
||||
* 1) Driver unload sequence
|
||||
* 2) WMI channel is still available
|
||||
* 3) FW is still running and up
|
||||
* 4) PSOC object is not destroyed
|
||||
*
|
||||
* A component should abort all its ongign transaction with FW at this stage
|
||||
* for example scan component needs to abort all its ongoing scan in FW because
|
||||
* is goign to be stopped very soon.
|
||||
*
|
||||
* Return: none
|
||||
*/
|
||||
QDF_STATUS dispatcher_psoc_disable(void);
|
||||
|
||||
#endif /* End of !defined(__DISPATCHER_INIT_H) */
|
Reference in New Issue
Block a user