diff options
author | Hu Kejun <william.hu@rock-chips.com> | 2018-10-31 19:37:20 +0800 |
---|---|---|
committer | Tao Huang <huangtao@rock-chips.com> | 2018-12-12 17:24:29 +0800 |
commit | c0202e0bc539e89d2253ddf5321eaee0c4ceeded (patch) | |
tree | 8f7fbbb77c2121bd1d483215598167030e6fcdc5 /include | |
parent | 642bed250f89e85ff26cfc04a62b2e1db059ee10 (diff) |
media: spi: add driver for rk1608
Change-Id: I8508668fcd1e35c49fe581875fcf9045e004ae9c
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/uapi/linux/rk-preisp.h | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/include/uapi/linux/rk-preisp.h b/include/uapi/linux/rk-preisp.h new file mode 100644 index 000000000000..3b58c2f7e137 --- /dev/null +++ b/include/uapi/linux/rk-preisp.h @@ -0,0 +1,56 @@ +/* SPDX-License-Identifier: ((GPL-2.0+ WITH Linux-syscall-note) OR MIT) */ +/* + * Rockchip preisp driver + * Copyright (C) 2018 Rockchip Electronics Co., Ltd. + */ + +#ifndef _UAPI_RKPREISP_H +#define _UAPI_RKPREISP_H + +#include <linux/types.h> + +#define PREISP_LSCTBL_SIZE 289 + +#define PREISP_CMD_SET_HDRAE_EXP \ + _IOW('V', BASE_VIDIOC_PRIVATE + 0, struct preisp_hdrae_exp_s) + +#define PREISP_CMD_SAVE_HDRAE_PARAM \ + _IOW('V', BASE_VIDIOC_PRIVATE + 1, struct preisp_hdrae_para_s) + +/** + * struct preisp_hdrae_para_s - awb and lsc para for preisp + * + * @r_gain: awb r gain + * @b_gain: awb b gain + * @gr_gain: awb gr gain + * @gb_gain: awb gb gain + * @lsc_table: lsc data of gr + */ +struct preisp_hdrae_para_s { + unsigned short r_gain; + unsigned short b_gain; + unsigned short gr_gain; + unsigned short gb_gain; + int lsc_table[PREISP_LSCTBL_SIZE]; +}; + +/** + * struct preisp_hdrae_exp_s - hdrae exposure + * + */ +struct preisp_hdrae_exp_s { + unsigned int long_exp_reg; + unsigned int long_gain_reg; + unsigned int middle_exp_reg; + unsigned int middle_gain_reg; + unsigned int short_exp_reg; + unsigned int short_gain_reg; + unsigned int long_exp_val; + unsigned int long_gain_val; + unsigned int middle_exp_val; + unsigned int middle_gain_val; + unsigned int short_exp_val; + unsigned int short_gain_val; +}; + +#endif /* _UAPI_RKPREISP_H */ |