isp_compand.c 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * Copyright (C) 2021 Alibaba Group Holding Limited
  3. * Author: LuChongzhi <chongzhi.lcz@alibaba-inc.com>
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License version 2 as
  7. * published by the Free Software Foundation.
  8. */
  9. #include <stdio.h>
  10. #include <stdlib.h>
  11. #include <stdint.h>
  12. #include <unistd.h>
  13. #include <string.h>
  14. #include "ra_common.h"
  15. #define REG_BASE 0x00003200
  16. static const reg_field_s reg_desc[] = {
  17. /* structure field order
  18. reg_name, offset,reset_value,msb,lsb, field_name, field_desc */
  19. {"ISP_COMPAND_CTRL", "Compand Control Register",
  20. 0x00003200, 0x00000000, 3, 3, "compand_ctrl_bls_enable", "Enable Black Level Subtraction in the Compand module"},
  21. {NULL, NULL, 0x00003200, 0x00000000, 2, 2, "compand_ctrl_soft_reset_flag", "Soft reset of compand module"},
  22. {NULL, NULL, 0x00003200, 0x00000000, 0, 0, "compand_ctrl_expand_enable", "Enable Expand in the Compand module"},
  23. };
  24. int light_isp_compand_reg_dump(reg_analyzer_info_s *ra_info)
  25. {
  26. uint32_t count = sizeof(reg_desc) / sizeof(reg_desc[0]);
  27. return ra_dump_reg_fields(ra_info, reg_desc, count);
  28. }
  29. int light_isp_compand_reg_define(reg_analyzer_info_s *ra_info)
  30. {
  31. uint32_t count = sizeof(reg_desc) / sizeof(reg_desc[0]);
  32. return ra_dump_reg_define(ra_info, reg_desc, count);
  33. }
  34. int light_isp_compand_reg_find(reg_analyzer_info_s *ra_info)
  35. {
  36. uint32_t count = sizeof(reg_desc) / sizeof(reg_desc[0]);
  37. return ra_dump_reg_find(ra_info, reg_desc, count);
  38. }