summaryrefslogtreecommitdiff
path: root/halimpl/tml/spi_spm.h
blob: f10af71b48a2736e9b03784ae418163980b831b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/*
 * Copyright (C) 2018-2019 NXP Semiconductors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/**
 * \addtogroup SPI_Power_Management
 *
 * @{ */
#define PH_PALESE_RESETDEVICE (0x00008001)
typedef enum {
  PN67T_POWER_SCHEME = 0x01,
  PN80T_LEGACY_SCHEME,
  PN80T_EXT_PMU_SCHEME,
} phNxpEse_PowerScheme;

typedef enum {
  phPalEse_e_Invalid = 0,                         /*!< Invalid control code */
  phPalEse_e_ResetDevice = PH_PALESE_RESETDEVICE, /*!< Reset the device */
  phPalEse_e_EnableLog,      /*!< Enable the spi driver logs */
  phPalEse_e_EnablePollMode, /*!< Enable the polling for SPI */
  phPalEse_e_ChipRst,        /*!< eSE Chip reset using ISO RST pin*/
  phPalEse_e_EnableThroughputMeasurement, /*!< Enable throughput measurement */
  phPalEse_e_SetPowerScheme,              /*!< Set power scheme */
  phPalEse_e_GetSPMStatus,                /*!< Get SPM(power mgt) status */
  phPalEse_e_DisablePwrCntrl,
} phPalEse_ControlCode_t;

/*******************************************************************************
**
** Function         phPalEse_spi_ioctl
**
** Description      Exposed ioctl by p61 spi driver
**
** Parameters       pDevHandle     - valid device handle
**                  level          - reset level
**
** Returns           0   - ioctl operation success
**                  -1   - ioctl operation failure
**
*******************************************************************************/
int phPalEse_spi_ioctl(phPalEse_ControlCode_t eControlCode, void *pDevHandle,
                       long level);