18c2ecf20Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0-only 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Copyright (c) 2015, The Linux Foundation. All rights reserved. 48c2ecf20Sopenharmony_ci */ 58c2ecf20Sopenharmony_ci 68c2ecf20Sopenharmony_ci#include "dsi_cfg.h" 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_cistatic const char * const dsi_v2_bus_clk_names[] = { 98c2ecf20Sopenharmony_ci "core_mmss", "iface", "bus", 108c2ecf20Sopenharmony_ci}; 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_cistatic const struct msm_dsi_config apq8064_dsi_cfg = { 138c2ecf20Sopenharmony_ci .io_offset = 0, 148c2ecf20Sopenharmony_ci .reg_cfg = { 158c2ecf20Sopenharmony_ci .num = 3, 168c2ecf20Sopenharmony_ci .regs = { 178c2ecf20Sopenharmony_ci {"vdda", 100000, 100}, /* 1.2 V */ 188c2ecf20Sopenharmony_ci {"avdd", 10000, 100}, /* 3.0 V */ 198c2ecf20Sopenharmony_ci {"vddio", 100000, 100}, /* 1.8 V */ 208c2ecf20Sopenharmony_ci }, 218c2ecf20Sopenharmony_ci }, 228c2ecf20Sopenharmony_ci .bus_clk_names = dsi_v2_bus_clk_names, 238c2ecf20Sopenharmony_ci .num_bus_clks = ARRAY_SIZE(dsi_v2_bus_clk_names), 248c2ecf20Sopenharmony_ci .io_start = { 0x4700000, 0x5800000 }, 258c2ecf20Sopenharmony_ci .num_dsi = 2, 268c2ecf20Sopenharmony_ci}; 278c2ecf20Sopenharmony_ci 288c2ecf20Sopenharmony_cistatic const char * const dsi_6g_bus_clk_names[] = { 298c2ecf20Sopenharmony_ci "mdp_core", "iface", "bus", "core_mmss", 308c2ecf20Sopenharmony_ci}; 318c2ecf20Sopenharmony_ci 328c2ecf20Sopenharmony_cistatic const struct msm_dsi_config msm8974_apq8084_dsi_cfg = { 338c2ecf20Sopenharmony_ci .io_offset = DSI_6G_REG_SHIFT, 348c2ecf20Sopenharmony_ci .reg_cfg = { 358c2ecf20Sopenharmony_ci .num = 4, 368c2ecf20Sopenharmony_ci .regs = { 378c2ecf20Sopenharmony_ci {"gdsc", -1, -1}, 388c2ecf20Sopenharmony_ci {"vdd", 150000, 100}, /* 3.0 V */ 398c2ecf20Sopenharmony_ci {"vdda", 100000, 100}, /* 1.2 V */ 408c2ecf20Sopenharmony_ci {"vddio", 100000, 100}, /* 1.8 V */ 418c2ecf20Sopenharmony_ci }, 428c2ecf20Sopenharmony_ci }, 438c2ecf20Sopenharmony_ci .bus_clk_names = dsi_6g_bus_clk_names, 448c2ecf20Sopenharmony_ci .num_bus_clks = ARRAY_SIZE(dsi_6g_bus_clk_names), 458c2ecf20Sopenharmony_ci .io_start = { 0xfd922800, 0xfd922b00 }, 468c2ecf20Sopenharmony_ci .num_dsi = 2, 478c2ecf20Sopenharmony_ci}; 488c2ecf20Sopenharmony_ci 498c2ecf20Sopenharmony_cistatic const char * const dsi_8916_bus_clk_names[] = { 508c2ecf20Sopenharmony_ci "mdp_core", "iface", "bus", 518c2ecf20Sopenharmony_ci}; 528c2ecf20Sopenharmony_ci 538c2ecf20Sopenharmony_cistatic const struct msm_dsi_config msm8916_dsi_cfg = { 548c2ecf20Sopenharmony_ci .io_offset = DSI_6G_REG_SHIFT, 558c2ecf20Sopenharmony_ci .reg_cfg = { 568c2ecf20Sopenharmony_ci .num = 3, 578c2ecf20Sopenharmony_ci .regs = { 588c2ecf20Sopenharmony_ci {"gdsc", -1, -1}, 598c2ecf20Sopenharmony_ci {"vdda", 100000, 100}, /* 1.2 V */ 608c2ecf20Sopenharmony_ci {"vddio", 100000, 100}, /* 1.8 V */ 618c2ecf20Sopenharmony_ci }, 628c2ecf20Sopenharmony_ci }, 638c2ecf20Sopenharmony_ci .bus_clk_names = dsi_8916_bus_clk_names, 648c2ecf20Sopenharmony_ci .num_bus_clks = ARRAY_SIZE(dsi_8916_bus_clk_names), 658c2ecf20Sopenharmony_ci .io_start = { 0x1a98000 }, 668c2ecf20Sopenharmony_ci .num_dsi = 1, 678c2ecf20Sopenharmony_ci}; 688c2ecf20Sopenharmony_ci 698c2ecf20Sopenharmony_cistatic const char * const dsi_8976_bus_clk_names[] = { 708c2ecf20Sopenharmony_ci "mdp_core", "iface", "bus", 718c2ecf20Sopenharmony_ci}; 728c2ecf20Sopenharmony_ci 738c2ecf20Sopenharmony_cistatic const struct msm_dsi_config msm8976_dsi_cfg = { 748c2ecf20Sopenharmony_ci .io_offset = DSI_6G_REG_SHIFT, 758c2ecf20Sopenharmony_ci .reg_cfg = { 768c2ecf20Sopenharmony_ci .num = 3, 778c2ecf20Sopenharmony_ci .regs = { 788c2ecf20Sopenharmony_ci {"gdsc", -1, -1}, 798c2ecf20Sopenharmony_ci {"vdda", 100000, 100}, /* 1.2 V */ 808c2ecf20Sopenharmony_ci {"vddio", 100000, 100}, /* 1.8 V */ 818c2ecf20Sopenharmony_ci }, 828c2ecf20Sopenharmony_ci }, 838c2ecf20Sopenharmony_ci .bus_clk_names = dsi_8976_bus_clk_names, 848c2ecf20Sopenharmony_ci .num_bus_clks = ARRAY_SIZE(dsi_8976_bus_clk_names), 858c2ecf20Sopenharmony_ci .io_start = { 0x1a94000, 0x1a96000 }, 868c2ecf20Sopenharmony_ci .num_dsi = 2, 878c2ecf20Sopenharmony_ci}; 888c2ecf20Sopenharmony_ci 898c2ecf20Sopenharmony_cistatic const struct msm_dsi_config msm8994_dsi_cfg = { 908c2ecf20Sopenharmony_ci .io_offset = DSI_6G_REG_SHIFT, 918c2ecf20Sopenharmony_ci .reg_cfg = { 928c2ecf20Sopenharmony_ci .num = 7, 938c2ecf20Sopenharmony_ci .regs = { 948c2ecf20Sopenharmony_ci {"gdsc", -1, -1}, 958c2ecf20Sopenharmony_ci {"vdda", 100000, 100}, /* 1.25 V */ 968c2ecf20Sopenharmony_ci {"vddio", 100000, 100}, /* 1.8 V */ 978c2ecf20Sopenharmony_ci {"vcca", 10000, 100}, /* 1.0 V */ 988c2ecf20Sopenharmony_ci {"vdd", 100000, 100}, /* 1.8 V */ 998c2ecf20Sopenharmony_ci {"lab_reg", -1, -1}, 1008c2ecf20Sopenharmony_ci {"ibb_reg", -1, -1}, 1018c2ecf20Sopenharmony_ci }, 1028c2ecf20Sopenharmony_ci }, 1038c2ecf20Sopenharmony_ci .bus_clk_names = dsi_6g_bus_clk_names, 1048c2ecf20Sopenharmony_ci .num_bus_clks = ARRAY_SIZE(dsi_6g_bus_clk_names), 1058c2ecf20Sopenharmony_ci .io_start = { 0xfd998000, 0xfd9a0000 }, 1068c2ecf20Sopenharmony_ci .num_dsi = 2, 1078c2ecf20Sopenharmony_ci}; 1088c2ecf20Sopenharmony_ci 1098c2ecf20Sopenharmony_ci/* 1108c2ecf20Sopenharmony_ci * TODO: core_mmss_clk fails to enable for some reason, but things work fine 1118c2ecf20Sopenharmony_ci * without it too. Figure out why it doesn't enable and uncomment below 1128c2ecf20Sopenharmony_ci */ 1138c2ecf20Sopenharmony_cistatic const char * const dsi_8996_bus_clk_names[] = { 1148c2ecf20Sopenharmony_ci "mdp_core", "iface", "bus", /* "core_mmss", */ 1158c2ecf20Sopenharmony_ci}; 1168c2ecf20Sopenharmony_ci 1178c2ecf20Sopenharmony_cistatic const struct msm_dsi_config msm8996_dsi_cfg = { 1188c2ecf20Sopenharmony_ci .io_offset = DSI_6G_REG_SHIFT, 1198c2ecf20Sopenharmony_ci .reg_cfg = { 1208c2ecf20Sopenharmony_ci .num = 3, 1218c2ecf20Sopenharmony_ci .regs = { 1228c2ecf20Sopenharmony_ci {"vdda", 18160, 1 }, /* 1.25 V */ 1238c2ecf20Sopenharmony_ci {"vcca", 17000, 32 }, /* 0.925 V */ 1248c2ecf20Sopenharmony_ci {"vddio", 100000, 100 },/* 1.8 V */ 1258c2ecf20Sopenharmony_ci }, 1268c2ecf20Sopenharmony_ci }, 1278c2ecf20Sopenharmony_ci .bus_clk_names = dsi_8996_bus_clk_names, 1288c2ecf20Sopenharmony_ci .num_bus_clks = ARRAY_SIZE(dsi_8996_bus_clk_names), 1298c2ecf20Sopenharmony_ci .io_start = { 0x994000, 0x996000 }, 1308c2ecf20Sopenharmony_ci .num_dsi = 2, 1318c2ecf20Sopenharmony_ci}; 1328c2ecf20Sopenharmony_ci 1338c2ecf20Sopenharmony_cistatic const char * const dsi_msm8998_bus_clk_names[] = { 1348c2ecf20Sopenharmony_ci "iface", "bus", "core", 1358c2ecf20Sopenharmony_ci}; 1368c2ecf20Sopenharmony_ci 1378c2ecf20Sopenharmony_cistatic const struct msm_dsi_config msm8998_dsi_cfg = { 1388c2ecf20Sopenharmony_ci .io_offset = DSI_6G_REG_SHIFT, 1398c2ecf20Sopenharmony_ci .reg_cfg = { 1408c2ecf20Sopenharmony_ci .num = 2, 1418c2ecf20Sopenharmony_ci .regs = { 1428c2ecf20Sopenharmony_ci {"vdd", 367000, 16 }, /* 0.9 V */ 1438c2ecf20Sopenharmony_ci {"vdda", 62800, 2 }, /* 1.2 V */ 1448c2ecf20Sopenharmony_ci }, 1458c2ecf20Sopenharmony_ci }, 1468c2ecf20Sopenharmony_ci .bus_clk_names = dsi_msm8998_bus_clk_names, 1478c2ecf20Sopenharmony_ci .num_bus_clks = ARRAY_SIZE(dsi_msm8998_bus_clk_names), 1488c2ecf20Sopenharmony_ci .io_start = { 0xc994000, 0xc996000 }, 1498c2ecf20Sopenharmony_ci .num_dsi = 2, 1508c2ecf20Sopenharmony_ci}; 1518c2ecf20Sopenharmony_ci 1528c2ecf20Sopenharmony_cistatic const char * const dsi_sdm660_bus_clk_names[] = { 1538c2ecf20Sopenharmony_ci "iface", "bus", "core", "core_mmss", 1548c2ecf20Sopenharmony_ci}; 1558c2ecf20Sopenharmony_ci 1568c2ecf20Sopenharmony_cistatic const struct msm_dsi_config sdm660_dsi_cfg = { 1578c2ecf20Sopenharmony_ci .io_offset = DSI_6G_REG_SHIFT, 1588c2ecf20Sopenharmony_ci .reg_cfg = { 1598c2ecf20Sopenharmony_ci .num = 1, 1608c2ecf20Sopenharmony_ci .regs = { 1618c2ecf20Sopenharmony_ci {"vdda", 12560, 4 }, /* 1.2 V */ 1628c2ecf20Sopenharmony_ci }, 1638c2ecf20Sopenharmony_ci }, 1648c2ecf20Sopenharmony_ci .bus_clk_names = dsi_sdm660_bus_clk_names, 1658c2ecf20Sopenharmony_ci .num_bus_clks = ARRAY_SIZE(dsi_sdm660_bus_clk_names), 1668c2ecf20Sopenharmony_ci .io_start = { 0xc994000, 0xc996000 }, 1678c2ecf20Sopenharmony_ci .num_dsi = 2, 1688c2ecf20Sopenharmony_ci}; 1698c2ecf20Sopenharmony_ci 1708c2ecf20Sopenharmony_cistatic const char * const dsi_sdm845_bus_clk_names[] = { 1718c2ecf20Sopenharmony_ci "iface", "bus", 1728c2ecf20Sopenharmony_ci}; 1738c2ecf20Sopenharmony_ci 1748c2ecf20Sopenharmony_cistatic const char * const dsi_sc7180_bus_clk_names[] = { 1758c2ecf20Sopenharmony_ci "iface", "bus", 1768c2ecf20Sopenharmony_ci}; 1778c2ecf20Sopenharmony_ci 1788c2ecf20Sopenharmony_cistatic const struct msm_dsi_config sdm845_dsi_cfg = { 1798c2ecf20Sopenharmony_ci .io_offset = DSI_6G_REG_SHIFT, 1808c2ecf20Sopenharmony_ci .reg_cfg = { 1818c2ecf20Sopenharmony_ci .num = 1, 1828c2ecf20Sopenharmony_ci .regs = { 1838c2ecf20Sopenharmony_ci {"vdda", 21800, 4 }, /* 1.2 V */ 1848c2ecf20Sopenharmony_ci }, 1858c2ecf20Sopenharmony_ci }, 1868c2ecf20Sopenharmony_ci .bus_clk_names = dsi_sdm845_bus_clk_names, 1878c2ecf20Sopenharmony_ci .num_bus_clks = ARRAY_SIZE(dsi_sdm845_bus_clk_names), 1888c2ecf20Sopenharmony_ci .io_start = { 0xae94000, 0xae96000 }, 1898c2ecf20Sopenharmony_ci .num_dsi = 2, 1908c2ecf20Sopenharmony_ci}; 1918c2ecf20Sopenharmony_ci 1928c2ecf20Sopenharmony_cistatic const struct msm_dsi_config sc7180_dsi_cfg = { 1938c2ecf20Sopenharmony_ci .io_offset = DSI_6G_REG_SHIFT, 1948c2ecf20Sopenharmony_ci .reg_cfg = { 1958c2ecf20Sopenharmony_ci .num = 1, 1968c2ecf20Sopenharmony_ci .regs = { 1978c2ecf20Sopenharmony_ci {"vdda", 21800, 4 }, /* 1.2 V */ 1988c2ecf20Sopenharmony_ci }, 1998c2ecf20Sopenharmony_ci }, 2008c2ecf20Sopenharmony_ci .bus_clk_names = dsi_sc7180_bus_clk_names, 2018c2ecf20Sopenharmony_ci .num_bus_clks = ARRAY_SIZE(dsi_sc7180_bus_clk_names), 2028c2ecf20Sopenharmony_ci .io_start = { 0xae94000 }, 2038c2ecf20Sopenharmony_ci .num_dsi = 1, 2048c2ecf20Sopenharmony_ci}; 2058c2ecf20Sopenharmony_ci 2068c2ecf20Sopenharmony_cistatic const struct msm_dsi_host_cfg_ops msm_dsi_v2_host_ops = { 2078c2ecf20Sopenharmony_ci .link_clk_set_rate = dsi_link_clk_set_rate_v2, 2088c2ecf20Sopenharmony_ci .link_clk_enable = dsi_link_clk_enable_v2, 2098c2ecf20Sopenharmony_ci .link_clk_disable = dsi_link_clk_disable_v2, 2108c2ecf20Sopenharmony_ci .clk_init_ver = dsi_clk_init_v2, 2118c2ecf20Sopenharmony_ci .tx_buf_alloc = dsi_tx_buf_alloc_v2, 2128c2ecf20Sopenharmony_ci .tx_buf_get = dsi_tx_buf_get_v2, 2138c2ecf20Sopenharmony_ci .tx_buf_put = NULL, 2148c2ecf20Sopenharmony_ci .dma_base_get = dsi_dma_base_get_v2, 2158c2ecf20Sopenharmony_ci .calc_clk_rate = dsi_calc_clk_rate_v2, 2168c2ecf20Sopenharmony_ci}; 2178c2ecf20Sopenharmony_ci 2188c2ecf20Sopenharmony_cistatic const struct msm_dsi_host_cfg_ops msm_dsi_6g_host_ops = { 2198c2ecf20Sopenharmony_ci .link_clk_set_rate = dsi_link_clk_set_rate_6g, 2208c2ecf20Sopenharmony_ci .link_clk_enable = dsi_link_clk_enable_6g, 2218c2ecf20Sopenharmony_ci .link_clk_disable = dsi_link_clk_disable_6g, 2228c2ecf20Sopenharmony_ci .clk_init_ver = NULL, 2238c2ecf20Sopenharmony_ci .tx_buf_alloc = dsi_tx_buf_alloc_6g, 2248c2ecf20Sopenharmony_ci .tx_buf_get = dsi_tx_buf_get_6g, 2258c2ecf20Sopenharmony_ci .tx_buf_put = dsi_tx_buf_put_6g, 2268c2ecf20Sopenharmony_ci .dma_base_get = dsi_dma_base_get_6g, 2278c2ecf20Sopenharmony_ci .calc_clk_rate = dsi_calc_clk_rate_6g, 2288c2ecf20Sopenharmony_ci}; 2298c2ecf20Sopenharmony_ci 2308c2ecf20Sopenharmony_cistatic const struct msm_dsi_host_cfg_ops msm_dsi_6g_v2_host_ops = { 2318c2ecf20Sopenharmony_ci .link_clk_set_rate = dsi_link_clk_set_rate_6g, 2328c2ecf20Sopenharmony_ci .link_clk_enable = dsi_link_clk_enable_6g, 2338c2ecf20Sopenharmony_ci .link_clk_disable = dsi_link_clk_disable_6g, 2348c2ecf20Sopenharmony_ci .clk_init_ver = dsi_clk_init_6g_v2, 2358c2ecf20Sopenharmony_ci .tx_buf_alloc = dsi_tx_buf_alloc_6g, 2368c2ecf20Sopenharmony_ci .tx_buf_get = dsi_tx_buf_get_6g, 2378c2ecf20Sopenharmony_ci .tx_buf_put = dsi_tx_buf_put_6g, 2388c2ecf20Sopenharmony_ci .dma_base_get = dsi_dma_base_get_6g, 2398c2ecf20Sopenharmony_ci .calc_clk_rate = dsi_calc_clk_rate_6g, 2408c2ecf20Sopenharmony_ci}; 2418c2ecf20Sopenharmony_ci 2428c2ecf20Sopenharmony_cistatic const struct msm_dsi_cfg_handler dsi_cfg_handlers[] = { 2438c2ecf20Sopenharmony_ci {MSM_DSI_VER_MAJOR_V2, MSM_DSI_V2_VER_MINOR_8064, 2448c2ecf20Sopenharmony_ci &apq8064_dsi_cfg, &msm_dsi_v2_host_ops}, 2458c2ecf20Sopenharmony_ci {MSM_DSI_VER_MAJOR_6G, MSM_DSI_6G_VER_MINOR_V1_0, 2468c2ecf20Sopenharmony_ci &msm8974_apq8084_dsi_cfg, &msm_dsi_6g_host_ops}, 2478c2ecf20Sopenharmony_ci {MSM_DSI_VER_MAJOR_6G, MSM_DSI_6G_VER_MINOR_V1_1, 2488c2ecf20Sopenharmony_ci &msm8974_apq8084_dsi_cfg, &msm_dsi_6g_host_ops}, 2498c2ecf20Sopenharmony_ci {MSM_DSI_VER_MAJOR_6G, MSM_DSI_6G_VER_MINOR_V1_1_1, 2508c2ecf20Sopenharmony_ci &msm8974_apq8084_dsi_cfg, &msm_dsi_6g_host_ops}, 2518c2ecf20Sopenharmony_ci {MSM_DSI_VER_MAJOR_6G, MSM_DSI_6G_VER_MINOR_V1_2, 2528c2ecf20Sopenharmony_ci &msm8974_apq8084_dsi_cfg, &msm_dsi_6g_host_ops}, 2538c2ecf20Sopenharmony_ci {MSM_DSI_VER_MAJOR_6G, MSM_DSI_6G_VER_MINOR_V1_3, 2548c2ecf20Sopenharmony_ci &msm8994_dsi_cfg, &msm_dsi_6g_host_ops}, 2558c2ecf20Sopenharmony_ci {MSM_DSI_VER_MAJOR_6G, MSM_DSI_6G_VER_MINOR_V1_3_1, 2568c2ecf20Sopenharmony_ci &msm8916_dsi_cfg, &msm_dsi_6g_host_ops}, 2578c2ecf20Sopenharmony_ci {MSM_DSI_VER_MAJOR_6G, MSM_DSI_6G_VER_MINOR_V1_4_1, 2588c2ecf20Sopenharmony_ci &msm8996_dsi_cfg, &msm_dsi_6g_host_ops}, 2598c2ecf20Sopenharmony_ci {MSM_DSI_VER_MAJOR_6G, MSM_DSI_6G_VER_MINOR_V1_4_2, 2608c2ecf20Sopenharmony_ci &msm8976_dsi_cfg, &msm_dsi_6g_host_ops}, 2618c2ecf20Sopenharmony_ci {MSM_DSI_VER_MAJOR_6G, MSM_DSI_6G_VER_MINOR_V2_1_0, 2628c2ecf20Sopenharmony_ci &sdm660_dsi_cfg, &msm_dsi_6g_v2_host_ops}, 2638c2ecf20Sopenharmony_ci {MSM_DSI_VER_MAJOR_6G, MSM_DSI_6G_VER_MINOR_V2_2_0, 2648c2ecf20Sopenharmony_ci &msm8998_dsi_cfg, &msm_dsi_6g_v2_host_ops}, 2658c2ecf20Sopenharmony_ci {MSM_DSI_VER_MAJOR_6G, MSM_DSI_6G_VER_MINOR_V2_2_1, 2668c2ecf20Sopenharmony_ci &sdm845_dsi_cfg, &msm_dsi_6g_v2_host_ops}, 2678c2ecf20Sopenharmony_ci {MSM_DSI_VER_MAJOR_6G, MSM_DSI_6G_VER_MINOR_V2_3_0, 2688c2ecf20Sopenharmony_ci &sdm845_dsi_cfg, &msm_dsi_6g_v2_host_ops}, 2698c2ecf20Sopenharmony_ci {MSM_DSI_VER_MAJOR_6G, MSM_DSI_6G_VER_MINOR_V2_4_0, 2708c2ecf20Sopenharmony_ci &sdm845_dsi_cfg, &msm_dsi_6g_v2_host_ops}, 2718c2ecf20Sopenharmony_ci {MSM_DSI_VER_MAJOR_6G, MSM_DSI_6G_VER_MINOR_V2_4_1, 2728c2ecf20Sopenharmony_ci &sc7180_dsi_cfg, &msm_dsi_6g_v2_host_ops}, 2738c2ecf20Sopenharmony_ci}; 2748c2ecf20Sopenharmony_ci 2758c2ecf20Sopenharmony_ciconst struct msm_dsi_cfg_handler *msm_dsi_cfg_get(u32 major, u32 minor) 2768c2ecf20Sopenharmony_ci{ 2778c2ecf20Sopenharmony_ci const struct msm_dsi_cfg_handler *cfg_hnd = NULL; 2788c2ecf20Sopenharmony_ci int i; 2798c2ecf20Sopenharmony_ci 2808c2ecf20Sopenharmony_ci for (i = ARRAY_SIZE(dsi_cfg_handlers) - 1; i >= 0; i--) { 2818c2ecf20Sopenharmony_ci if ((dsi_cfg_handlers[i].major == major) && 2828c2ecf20Sopenharmony_ci (dsi_cfg_handlers[i].minor == minor)) { 2838c2ecf20Sopenharmony_ci cfg_hnd = &dsi_cfg_handlers[i]; 2848c2ecf20Sopenharmony_ci break; 2858c2ecf20Sopenharmony_ci } 2868c2ecf20Sopenharmony_ci } 2878c2ecf20Sopenharmony_ci 2888c2ecf20Sopenharmony_ci return cfg_hnd; 2898c2ecf20Sopenharmony_ci} 2908c2ecf20Sopenharmony_ci 291