Files
android/drivers/mmc/host/mediatek/rpmb/drrpmb/public/dci.h
T
threeeye bc1d038eac REVVL 6 Pro kernel bring-up: full working tree snapshot (2026-09-12)
Squashed backup commit (no shallow-clone history issues) of
xiaomi-mt6833-dev/kernel_xiaomi_mt6833 (lineage-23.2 branch, upstream
commit 9eece662e) plus all fixes applied to get everpal_defconfig building
clean against a modern (GCC 15.2.0) toolchain -- see the previous commit
message on the lineage-23.2 branch (also in this repo history is not
available here since this is a squashed snapshot; full incremental history
lives in the local DL380 checkout and the upstream GitHub remote).

Upstream: https://github.com/xiaomi-mt6833-dev/kernel_xiaomi_mt6833 (lineage-23.2)
2026-09-12 13:36:46 +00:00

62 lines
1.6 KiB
C

/*
* Copyright (c) 2013-2016 TRUSTONIC LIMITED
* All Rights Reserved.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
/**
* @file dci.h
* @brief Contains DCI (Driver Control
* Interface) definitions and data structures
*
*/
#ifndef __DCI_H__
#define __DCI_H__
typedef uint32_t dciCommandId_t;
typedef uint32_t dciResponseId_t;
typedef uint32_t dciReturnCode_t;
/**< Responses have bit 31 set */
#define RSP_ID_MASK (1U << 31)
#define RSP_ID(cmdId) (((uint32_t)(cmdId)) | RSP_ID_MASK)
#define IS_CMD(cmdId) ((((uint32_t)(cmdId)) & RSP_ID_MASK) == 0)
#define IS_RSP(cmdId) ((((uint32_t)(cmdId)) & RSP_ID_MASK) == RSP_ID_MASK)
/**
* Return codes of driver commands.
*/
#define RET_OK 0
#define RET_ERR_UNKNOWN_CMD 1
#define RET_ERR_NOT_SUPPORTED 2
#define RET_ERR_INTERNAL_ERROR 3
/* ... add more error codes when needed */
/**
* DCI command header.
*/
struct dciCommandHeader_t {
dciCommandId_t commandId; /**< Command ID */
};
/**
* DCI response header.
*/
struct dciResponseHeader_t {
/**< Response ID (must be command ID | RSP_ID_MASK )*/
dciResponseId_t responseId;
dciReturnCode_t returnCode; /**< Return code of command */
};
#endif