1 /* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0)
3 * Copyright 2013-2016 Freescale Semiconductor Inc.
4 * Copyright 2016-2017 NXP
7 #ifndef _FSL_DPCON_CMD_H
8 #define _FSL_DPCON_CMD_H
11 #define DPCON_VER_MAJOR 3
12 #define DPCON_VER_MINOR 3
15 /* Command versioning */
16 #define DPCON_CMD_BASE_VERSION 1
17 #define DPCON_CMD_ID_OFFSET 4
19 #define DPCON_CMD(id) ((id << DPCON_CMD_ID_OFFSET) | DPCON_CMD_BASE_VERSION)
22 #define DPCON_CMDID_CLOSE DPCON_CMD(0x800)
23 #define DPCON_CMDID_OPEN DPCON_CMD(0x808)
24 #define DPCON_CMDID_CREATE DPCON_CMD(0x908)
25 #define DPCON_CMDID_DESTROY DPCON_CMD(0x988)
26 #define DPCON_CMDID_GET_API_VERSION DPCON_CMD(0xa08)
28 #define DPCON_CMDID_ENABLE DPCON_CMD(0x002)
29 #define DPCON_CMDID_DISABLE DPCON_CMD(0x003)
30 #define DPCON_CMDID_GET_ATTR DPCON_CMD(0x004)
31 #define DPCON_CMDID_RESET DPCON_CMD(0x005)
32 #define DPCON_CMDID_IS_ENABLED DPCON_CMD(0x006)
34 #define DPCON_CMDID_SET_NOTIFICATION DPCON_CMD(0x100)
37 struct dpcon_cmd_open {
41 struct dpcon_cmd_create {
42 uint8_t num_priorities;
45 struct dpcon_cmd_destroy {
49 #define DPCON_ENABLE 1
51 struct dpcon_rsp_is_enabled {
55 struct dpcon_rsp_get_attr {
58 uint8_t num_priorities;
62 struct dpcon_cmd_set_notification {
69 struct dpcon_rsp_get_api_version {
75 #endif /* _FSL_DPCON_CMD_H */