blob: c4eb4b5dca20c8fa76c1c508d4dde887fb435267 [file] [log] [blame]
hualing chen7362e862021-09-08 10:08:34 +08001/*
Zhiqiang Hana67a8252023-02-25 18:23:48 +08002* Copyright (c) 2014 Amlogic, Inc. All rights reserved.
3*
4* This source code is subject to the terms and conditions defined in the
5* file 'LICENSE' which is part of this source code package.
6*
7* Description: */
hualing chen7362e862021-09-08 10:08:34 +08008
9#ifndef _AMCI_H
10#define _AMCI_H
11
12/* #include <asm/types.h> */
13#include <linux/types.h>
14
15
16enum AM_CI_IO_MODE {
hualing chen002e5b92022-02-23 17:51:21 +080017 AM_CI_IOR = 0,
18 AM_CI_IOW,
19 AM_CI_MEMR,
20 AM_CI_MEMW
hualing chen7362e862021-09-08 10:08:34 +080021};
22
23struct ci_rw_param {
hualing chen002e5b92022-02-23 17:51:21 +080024 enum AM_CI_IO_MODE mode;
25 int addr;
26 u_int8_t value;
hualing chen7362e862021-09-08 10:08:34 +080027};
28
29
30#define AMCI_IOC_MAGIC 'D'
31
32#define AMCI_IOC_RESET _IO(AMCI_IOC_MAGIC, 0x00)
33#define AMCI_IOC_IO _IOWR(AMCI_IOC_MAGIC, 0x01, struct ci_rw_param)
34#define AMCI_IOC_GET_DETECT _IOWR(AMCI_IOC_MAGIC, 0x02, int)
35#define AMCI_IOC_SET_POWER _IOW(AMCI_IOC_MAGIC, 0x03, int)
36
37
Zhiqiang Hana67a8252023-02-25 18:23:48 +080038#endif