1 /* 2 * Copyright (C) 2012-2014 NXP Semiconductors 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 /** 18 * \addtogroup SPI_Power_Management 19 * 20 * @{ */ 21 #define PH_PALESE_RESETDEVICE (0x00008001) 22 typedef enum { 23 PN67T_POWER_SCHEME = 0x01, 24 PN80T_LEGACY_SCHEME, 25 PN80T_EXT_PMU_SCHEME, 26 } phNxpEse_PowerScheme; 27 28 typedef enum { 29 phPalEse_e_Invalid = 0, /*!< Invalid control code */ 30 phPalEse_e_ResetDevice = PH_PALESE_RESETDEVICE, /*!< Reset the device */ 31 phPalEse_e_EnableLog, /*!< Enable the spi driver logs */ 32 phPalEse_e_EnablePollMode, /*!< Enable the polling for SPI */ 33 phPalEse_e_GetEseAccess, /*!< get the bus access in specified timeout */ 34 phPalEse_e_ChipRst, /*!< eSE Chip reset using ISO RST pin*/ 35 phPalEse_e_EnableThroughputMeasurement, /*!< Enable throughput measurement */ 36 phPalEse_e_SetPowerScheme, /*!< Set power scheme */ 37 phPalEse_e_GetSPMStatus, /*!< Get SPM(power mgt) status */ 38 phPalEse_e_DisablePwrCntrl, 39 phPalEse_e_SetJcopDwnldState, /*!< Set Jcop Download state */ 40 } phPalEse_ControlCode_t; 41 42 /******************************************************************************* 43 ** 44 ** Function phPalEse_spi_ioctl 45 ** 46 ** Description Exposed ioctl by p61 spi driver 47 ** 48 ** Parameters pDevHandle - valid device handle 49 ** level - reset level 50 ** 51 ** Returns 0 - ioctl operation success 52 ** -1 - ioctl operation failure 53 ** 54 *******************************************************************************/ 55 int phPalEse_spi_ioctl(phPalEse_ControlCode_t eControlCode,void *pDevHandle, long level); 56 57