Lines Matching refs:aw_cfg
646 static int aw_get_dde_type_info(struct aw_device *aw_dev, struct aw_container *aw_cfg) in aw_get_dde_type_info() argument
648 struct aw_cfg_hdr *cfg_hdr = (struct aw_cfg_hdr *)aw_cfg->data; in aw_get_dde_type_info()
650 (struct aw_cfg_dde_v1 *)(aw_cfg->data + cfg_hdr->hdr_offset); in aw_get_dde_type_info()
675 static int aw_get_dev_scene_count_v1(struct aw_device *aw_dev, struct aw_container *aw_cfg, in aw_get_dev_scene_count_v1() argument
678 struct aw_cfg_hdr *cfg_hdr = (struct aw_cfg_hdr *)aw_cfg->data; in aw_get_dev_scene_count_v1()
680 (struct aw_cfg_dde_v1 *)(aw_cfg->data + cfg_hdr->hdr_offset); in aw_get_dev_scene_count_v1()
695 struct aw_container *aw_cfg, in aw_get_default_scene_count_v1() argument
698 struct aw_cfg_hdr *cfg_hdr = (struct aw_cfg_hdr *)aw_cfg->data; in aw_get_default_scene_count_v1()
700 (struct aw_cfg_dde_v1 *)(aw_cfg->data + cfg_hdr->hdr_offset); in aw_get_default_scene_count_v1()
714 struct aw_container *aw_cfg, in aw_dev_parse_scene_count_v1() argument
719 ret = aw_get_dde_type_info(aw_dev, aw_cfg); in aw_dev_parse_scene_count_v1()
725 ret = aw_get_dev_scene_count_v1(aw_dev, aw_cfg, count); in aw_dev_parse_scene_count_v1()
728 ret = aw_get_default_scene_count_v1(aw_dev, aw_cfg, count); in aw_dev_parse_scene_count_v1()
849 struct aw_container *aw_cfg) in aw_dev_load_cfg_by_hdr_v1() argument
851 struct aw_cfg_hdr *cfg_hdr = (struct aw_cfg_hdr *)aw_cfg->data; in aw_dev_load_cfg_by_hdr_v1()
855 ret = aw_dev_parse_scene_count_v1(aw_dev, aw_cfg, &prof_info->count); in aw_dev_load_cfg_by_hdr_v1()
882 int aw88395_dev_cfg_load(struct aw_device *aw_dev, struct aw_container *aw_cfg) in aw88395_dev_cfg_load() argument
887 cfg_hdr = (struct aw_cfg_hdr *)aw_cfg->data; in aw88395_dev_cfg_load()
899 ret = aw_dev_load_cfg_by_hdr_v1(aw_dev, aw_cfg); in aw88395_dev_cfg_load()
916 static int aw_dev_check_cfg_by_hdr(struct aw_device *aw_dev, struct aw_container *aw_cfg) in aw_dev_check_cfg_by_hdr() argument
926 cfg_hdr = (struct aw_cfg_hdr *)aw_cfg->data; in aw_dev_check_cfg_by_hdr()
934 if (hdr_ddt_len > aw_cfg->len) { in aw_dev_check_cfg_by_hdr()
936 cfg_hdr->hdr_offset, aw_cfg->len); in aw_dev_check_cfg_by_hdr()
941 cfg_dde = (struct aw_cfg_dde *)((char *)aw_cfg->data + cfg_hdr->hdr_offset); in aw_dev_check_cfg_by_hdr()
946 if (act_data != aw_cfg->len) { in aw_dev_check_cfg_by_hdr()
948 act_data, aw_cfg->len); in aw_dev_check_cfg_by_hdr()
955 if (end_data_offset > aw_cfg->len) { in aw_dev_check_cfg_by_hdr()
957 i, end_data_offset, aw_cfg->len); in aw_dev_check_cfg_by_hdr()
962 act_crc8 = crc8(aw_crc8_table, aw_cfg->data + cfg_dde[i].data_offset, in aw_dev_check_cfg_by_hdr()
974 static int aw_dev_check_acf_by_hdr_v1(struct aw_device *aw_dev, struct aw_container *aw_cfg) in aw_dev_check_acf_by_hdr_v1() argument
984 cfg_hdr = (struct aw_cfg_hdr *)aw_cfg->data; in aw_dev_check_acf_by_hdr_v1()
993 if (hdr_ddt_len > aw_cfg->len) { in aw_dev_check_acf_by_hdr_v1()
995 cfg_hdr->hdr_offset, aw_cfg->len); in aw_dev_check_acf_by_hdr_v1()
1000 cfg_dde = (struct aw_cfg_dde_v1 *)((char *)aw_cfg->data + cfg_hdr->hdr_offset); in aw_dev_check_acf_by_hdr_v1()
1005 if (act_data != aw_cfg->len) { in aw_dev_check_acf_by_hdr_v1()
1007 act_data, aw_cfg->len); in aw_dev_check_acf_by_hdr_v1()
1014 if (end_data_offset > aw_cfg->len) { in aw_dev_check_acf_by_hdr_v1()
1016 i, end_data_offset, aw_cfg->len); in aw_dev_check_acf_by_hdr_v1()
1021 act_crc8 = crc8(aw_crc8_table, aw_cfg->data + cfg_dde[i].data_offset, in aw_dev_check_acf_by_hdr_v1()
1033 int aw88395_dev_load_acf_check(struct aw_device *aw_dev, struct aw_container *aw_cfg) in aw88395_dev_load_acf_check() argument
1037 if (!aw_cfg) { in aw88395_dev_load_acf_check()
1042 if (aw_cfg->len < sizeof(struct aw_cfg_hdr)) { in aw88395_dev_load_acf_check()
1044 aw_cfg->len, (int)sizeof(struct aw_cfg_hdr)); in aw88395_dev_load_acf_check()
1050 cfg_hdr = (struct aw_cfg_hdr *)aw_cfg->data; in aw88395_dev_load_acf_check()
1053 return aw_dev_check_cfg_by_hdr(aw_dev, aw_cfg); in aw88395_dev_load_acf_check()
1055 return aw_dev_check_acf_by_hdr_v1(aw_dev, aw_cfg); in aw88395_dev_load_acf_check()