mirror of
https://github.com/thead-yocto-mirror/baremetal-drivers
synced 2026-08-06 19:58:25 +02:00
49 lines
1.5 KiB
C
49 lines
1.5 KiB
C
/*
|
|
* Copyright (C) 2021 Alibaba Group Holding Limited
|
|
* Author: LuChongzhi <chongzhi.lcz@alibaba-inc.com>
|
|
*
|
|
* 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.
|
|
*/
|
|
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <stdint.h>
|
|
#include <unistd.h>
|
|
#include <string.h>
|
|
|
|
#include "ra_common.h"
|
|
|
|
#define REG_BASE 0x00003200
|
|
|
|
static const reg_field_s reg_desc[] = {
|
|
/* structure field order
|
|
reg_name, offset,reset_value,msb,lsb, field_name, field_desc */
|
|
|
|
{"ISP_COMPAND_CTRL", "Compand Control Register",
|
|
0x00003200, 0x00000000, 3, 3, "compand_ctrl_bls_enable", "Enable Black Level Subtraction in the Compand module"},
|
|
{NULL, NULL, 0x00003200, 0x00000000, 2, 2, "compand_ctrl_soft_reset_flag", "Soft reset of compand module"},
|
|
{NULL, NULL, 0x00003200, 0x00000000, 0, 0, "compand_ctrl_expand_enable", "Enable Expand in the Compand module"},
|
|
};
|
|
|
|
|
|
int light_isp_compand_reg_dump(reg_analyzer_info_s *ra_info)
|
|
{
|
|
uint32_t count = sizeof(reg_desc) / sizeof(reg_desc[0]);
|
|
return ra_dump_reg_fields(ra_info, reg_desc, count);
|
|
}
|
|
|
|
int light_isp_compand_reg_define(reg_analyzer_info_s *ra_info)
|
|
{
|
|
uint32_t count = sizeof(reg_desc) / sizeof(reg_desc[0]);
|
|
return ra_dump_reg_define(ra_info, reg_desc, count);
|
|
}
|
|
|
|
int light_isp_compand_reg_find(reg_analyzer_info_s *ra_info)
|
|
{
|
|
uint32_t count = sizeof(reg_desc) / sizeof(reg_desc[0]);
|
|
return ra_dump_reg_find(ra_info, reg_desc, count);
|
|
}
|
|
|