2 * Copyright (C) 2012 Spreadtrum Communications Inc.
4 * This software is licensed under the terms of the GNU General Public
5 * License version 2, as published by the Free Software Foundation, and
6 * may be copied, distributed, and modified under those terms.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
17 #include <linux/of_device.h>
21 /*#define ROTATE_DEBUG*/
24 #define ROTATE_TRACE printk
26 #define ROTATE_TRACE pr_debug
30 typedef void (*rot_isr_func)(void *rot_k_private);
32 typedef struct _rot_param_tag {
34 ROT_DATA_FORMAT_E format;
40 ROT_PIXEL_FORMAT_E pixel_format;
41 ROT_UV_MODE_E uv_mode;
43 ROT_ENDIAN_E src_endian;
44 ROT_ENDIAN_E dst_endian;
47 struct rot_drv_private{
49 rot_isr_func user_isr_func;
50 spinlock_t rot_drv_lock;
51 void *rot_fd;/*rot file*/
54 int rot_k_module_en(struct device_node *dn);
55 int rot_k_module_dis(struct device_node *dn);
56 int rot_k_isr_reg(rot_isr_func user_func,struct rot_drv_private *drv_private);
57 int rot_k_is_end(ROT_PARAM_CFG_T *s);
58 int rot_k_set_UV_param(ROT_PARAM_CFG_T *s);
59 void rot_k_register_cfg(ROT_PARAM_CFG_T *s);
60 void rot_k_close(void);
61 int rot_k_io_cfg(ROT_CFG_T * param_ptr, ROT_PARAM_CFG_T *s);