/linux/drivers/clk/ |
H A D | clk-bulk.c | 15 static int __must_check of_clk_bulk_get(struct device_node *np, int num_clks, in of_clk_bulk_get() argument 21 for (i = 0; i < num_clks; i++) { in of_clk_bulk_get() 26 for (i = 0; i < num_clks; i++) { in of_clk_bulk_get() 50 int num_clks; in of_clk_bulk_get_all() local 53 num_clks = of_clk_get_parent_count(np); in of_clk_bulk_get_all() 54 if (!num_clks) in of_clk_bulk_get_all() 57 clk_bulk = kmalloc_array(num_clks, sizeof(*clk_bulk), GFP_KERNEL); in of_clk_bulk_get_all() 61 ret = of_clk_bulk_get(np, num_clks, clk_bulk); in of_clk_bulk_get_all() 69 return num_clks; in of_clk_bulk_get_all() 72 void clk_bulk_put(int num_clks, struct clk_bulk_data *clks) in clk_bulk_put() argument [all …]
|
H A D | clk-devres.c | 132 int num_clks; member 139 clk_bulk_put(devres->num_clks, devres->clks); in devm_clk_bulk_release() 142 static int __devm_clk_bulk_get(struct device *dev, int num_clks, in __devm_clk_bulk_get() argument 154 ret = clk_bulk_get_optional(dev, num_clks, clks); in __devm_clk_bulk_get() 156 ret = clk_bulk_get(dev, num_clks, clks); in __devm_clk_bulk_get() 159 devres->num_clks = num_clks; in __devm_clk_bulk_get() 168 int __must_check devm_clk_bulk_get(struct device *dev, int num_clks, in devm_clk_bulk_get() argument 171 return __devm_clk_bulk_get(dev, num_clks, clks, false); in devm_clk_bulk_get() 175 int __must_check devm_clk_bulk_get_optional(struct device *dev, int num_clks, in devm_clk_bulk_get_optional() argument 178 return __devm_clk_bulk_get(dev, num_clks, clks, true); in devm_clk_bulk_get_optional() [all …]
|
H A D | clk-max77686.c | 51 size_t num_clks; member 153 if (idx >= drv_data->num_clks) { in of_clk_max77686_get() 169 int i, ret, num_clks; in max77686_clk_probe() local 185 num_clks = MAX77686_CLKS_NUM; in max77686_clk_probe() 190 num_clks = MAX77802_CLKS_NUM; in max77686_clk_probe() 195 num_clks = MAX77620_CLKS_NUM; in max77686_clk_probe() 204 drv_data->num_clks = num_clks; in max77686_clk_probe() 205 drv_data->max_clk_data = devm_kcalloc(dev, num_clks, in max77686_clk_probe() 211 for (i = 0; i < num_clks; i++) { in max77686_clk_probe()
|
/linux/include/linux/ |
H A D | clk.h | 308 int __must_check clk_bulk_prepare(int num_clks, 335 clk_bulk_prepare(int num_clks, const struct clk_bulk_data *clks) in clk_bulk_prepare() argument 358 void clk_bulk_unprepare(int num_clks, const struct clk_bulk_data *clks); 364 static inline void clk_bulk_unprepare(int num_clks, in clk_bulk_unprepare() argument 409 int __must_check clk_bulk_get(struct device *dev, int num_clks, 442 int __must_check clk_bulk_get_optional(struct device *dev, int num_clks, 456 int __must_check devm_clk_bulk_get(struct device *dev, int num_clks, 479 int __must_check devm_clk_bulk_get_optional(struct device *dev, int num_clks, 707 int __must_check clk_bulk_enable(int num_clks, 742 void clk_bulk_disable(int num_clks, const struct clk_bulk_data *clks); [all …]
|
/linux/drivers/pmdomain/imx/ |
H A D | imx93-blk-ctrl.c | 55 int num_clks; member 73 int num_clks; member 91 int num_clks; member 132 ret = clk_bulk_prepare_enable(bc->num_clks, bc->clks); in imx93_blk_ctrl_power_on() 138 ret = clk_bulk_prepare_enable(data->num_clks, domain->clks); in imx93_blk_ctrl_power_on() 140 clk_bulk_disable_unprepare(bc->num_clks, bc->clks); in imx93_blk_ctrl_power_on() 163 clk_bulk_disable_unprepare(data->num_clks, domain->clks); in imx93_blk_ctrl_power_on() 165 clk_bulk_disable_unprepare(bc->num_clks, bc->clks); in imx93_blk_ctrl_power_on() 183 clk_bulk_disable_unprepare(data->num_clks, domain->clks); in imx93_blk_ctrl_power_off() 185 clk_bulk_disable_unprepare(bc->num_clks, bc->clks); in imx93_blk_ctrl_power_off() [all …]
|
H A D | imx8m-blk-ctrl.c | 44 int num_clks; member 106 ret = clk_bulk_prepare_enable(data->num_clks, domain->clks); in imx8m_blk_ctrl_power_on() 133 clk_bulk_disable_unprepare(data->num_clks, domain->clks); in imx8m_blk_ctrl_power_on() 138 clk_bulk_disable_unprepare(data->num_clks, domain->clks); in imx8m_blk_ctrl_power_on() 232 for (j = 0; j < data->num_clks; j++) in imx8m_blk_ctrl_probe() 253 ret = devm_clk_bulk_get(dev, data->num_clks, domain->clks); in imx8m_blk_ctrl_probe() 454 .num_clks = 1, 462 .num_clks = 1, 470 .num_clks = 1, 488 .num_clks = 1, [all …]
|
H A D | imx8mp-blk-ctrl.c | 52 int num_clks; member 218 int num_clks = bc->domains[IMX8MP_HSIOBLK_PD_USB].data->num_clks; in imx8mp_hsio_power_notifier() local 227 ret = clk_bulk_prepare_enable(num_clks, usb_clk); in imx8mp_hsio_power_notifier() 235 clk_bulk_disable_unprepare(num_clks, usb_clk); in imx8mp_hsio_power_notifier() 239 ret = clk_bulk_prepare_enable(num_clks, usb_clk); in imx8mp_hsio_power_notifier() 246 clk_bulk_disable_unprepare(num_clks, usb_clk); in imx8mp_hsio_power_notifier() 259 .num_clks = 1, 275 .num_clks = 1, 455 .num_clks = 1, 461 .num_clks = 3, [all …]
|
H A D | imx93-pd.c | 30 int num_clks; member 42 ret = clk_bulk_prepare_enable(domain->num_clks, domain->clks); in imx93_pd_on() 81 clk_bulk_disable_unprepare(domain->num_clks, domain->clks); in imx93_pd_off() 112 domain->num_clks = devm_clk_bulk_get_all(dev, &domain->clks); in imx93_pd_probe() 113 if (domain->num_clks < 0) in imx93_pd_probe() 114 return dev_err_probe(dev, domain->num_clks, "Failed to get domain's clocks\n"); in imx93_pd_probe() 124 ret = clk_bulk_prepare_enable(domain->num_clks, domain->clks); in imx93_pd_probe() 148 clk_bulk_disable_unprepare(domain->num_clks, domain->clks); in imx93_pd_probe()
|
/linux/drivers/clk/mediatek/ |
H A D | clk-mt8192-imp_iic_wrap.c | 59 .num_clks = ARRAY_SIZE(imp_iic_wrap_c_clks), 64 .num_clks = ARRAY_SIZE(imp_iic_wrap_e_clks), 69 .num_clks = ARRAY_SIZE(imp_iic_wrap_n_clks), 74 .num_clks = ARRAY_SIZE(imp_iic_wrap_s_clks), 79 .num_clks = ARRAY_SIZE(imp_iic_wrap_w_clks), 84 .num_clks = ARRAY_SIZE(imp_iic_wrap_ws_clks),
|
H A D | clk-mt8188-img.c | 63 .num_clks = ARRAY_SIZE(imgsys_main_clks), 68 .num_clks = ARRAY_SIZE(imgsys_wpe1_clks), 73 .num_clks = ARRAY_SIZE(imgsys_wpe2_clks), 78 .num_clks = ARRAY_SIZE(imgsys_wpe3_clks), 83 .num_clks = ARRAY_SIZE(imgsys1_dip_top_clks), 88 .num_clks = ARRAY_SIZE(imgsys1_dip_nr_clks),
|
H A D | clk-mt8195-cam.c | 83 .num_clks = ARRAY_SIZE(cam_clks), 88 .num_clks = ARRAY_SIZE(cam_mraw_clks), 93 .num_clks = ARRAY_SIZE(cam_rawa_clks), 98 .num_clks = ARRAY_SIZE(cam_rawb_clks), 103 .num_clks = ARRAY_SIZE(cam_yuva_clks), 108 .num_clks = ARRAY_SIZE(cam_yuvb_clks),
|
H A D | clk-mt8188-cam.c | 77 .num_clks = ARRAY_SIZE(cam_main_clks), 82 .num_clks = ARRAY_SIZE(cam_rawa_clks), 87 .num_clks = ARRAY_SIZE(cam_rawb_clks), 92 .num_clks = ARRAY_SIZE(cam_yuva_clks), 97 .num_clks = ARRAY_SIZE(cam_yuvb_clks),
|
/linux/drivers/clk/renesas/ |
H A D | clk-r8a7778.c | 76 int num_clks; in r8a7778_cpg_clocks_init() local 90 num_clks = of_property_count_strings(np, "clock-output-names"); in r8a7778_cpg_clocks_init() 91 if (num_clks < 0) { in r8a7778_cpg_clocks_init() 97 clks = kcalloc(num_clks, sizeof(*clks), GFP_KERNEL); in r8a7778_cpg_clocks_init() 106 data->clk_num = num_clks; in r8a7778_cpg_clocks_init() 108 for (i = 0; i < num_clks; ++i) { in r8a7778_cpg_clocks_init()
|
H A D | clk-rz.c | 88 int num_clks; in rz_cpg_clocks_init() local 90 num_clks = of_property_count_strings(np, "clock-output-names"); in rz_cpg_clocks_init() 91 if (WARN(num_clks <= 0, "can't count CPG clocks\n")) in rz_cpg_clocks_init() 95 clks = kcalloc(num_clks, sizeof(*clks), GFP_KERNEL); in rz_cpg_clocks_init() 99 data->clk_num = num_clks; in rz_cpg_clocks_init() 103 for (i = 0; i < num_clks; ++i) { in rz_cpg_clocks_init()
|
H A D | clk-r8a7740.c | 147 int num_clks; in r8a7740_cpg_clocks_init() local 152 num_clks = of_property_count_strings(np, "clock-output-names"); in r8a7740_cpg_clocks_init() 153 if (num_clks < 0) { in r8a7740_cpg_clocks_init() 159 clks = kcalloc(num_clks, sizeof(*clks), GFP_KERNEL); in r8a7740_cpg_clocks_init() 170 cpg->data.clk_num = num_clks; in r8a7740_cpg_clocks_init() 176 for (i = 0; i < num_clks; ++i) { in r8a7740_cpg_clocks_init()
|
H A D | clk-r8a7779.c | 119 int num_clks; in r8a7779_cpg_clocks_init() local 125 num_clks = of_property_count_strings(np, "clock-output-names"); in r8a7779_cpg_clocks_init() 126 if (num_clks < 0) { in r8a7779_cpg_clocks_init() 141 data->clk_num = num_clks; in r8a7779_cpg_clocks_init() 146 for (i = 0; i < num_clks; ++i) { in r8a7779_cpg_clocks_init()
|
/linux/sound/soc/qcom/ |
H A D | lpass-sc7180.c | 130 drvdata->clks = devm_kcalloc(dev, variant->num_clks, in sc7180_lpass_init() 135 drvdata->num_clks = variant->num_clks; in sc7180_lpass_init() 137 for (i = 0; i < drvdata->num_clks; i++) in sc7180_lpass_init() 140 ret = devm_clk_bulk_get(dev, drvdata->num_clks, drvdata->clks); in sc7180_lpass_init() 146 ret = clk_bulk_prepare_enable(drvdata->num_clks, drvdata->clks); in sc7180_lpass_init() 159 clk_bulk_disable_unprepare(drvdata->num_clks, drvdata->clks); in sc7180_lpass_exit() 167 return clk_bulk_prepare_enable(drvdata->num_clks, drvdata->clks); in sc7180_lpass_dev_resume() 174 clk_bulk_disable_unprepare(drvdata->num_clks, drvdata->clks); in sc7180_lpass_dev_suspend() 288 .num_clks = 3,
|
H A D | lpass-apq8016.c | 165 drvdata->clks = devm_kcalloc(dev, variant->num_clks, in apq8016_lpass_init() 169 drvdata->num_clks = variant->num_clks; in apq8016_lpass_init() 171 for (i = 0; i < drvdata->num_clks; i++) in apq8016_lpass_init() 174 ret = devm_clk_bulk_get(dev, drvdata->num_clks, drvdata->clks); in apq8016_lpass_init() 180 ret = clk_bulk_prepare_enable(drvdata->num_clks, drvdata->clks); in apq8016_lpass_init() 211 clk_bulk_disable_unprepare(drvdata->num_clks, drvdata->clks); in apq8016_lpass_init() 219 clk_bulk_disable_unprepare(drvdata->num_clks, drvdata->clks); in apq8016_lpass_exit() 269 .num_clks = 2,
|
/linux/drivers/bus/ |
H A D | simple-pm-bus.c | 22 int num_clks; member 61 bus->num_clks = devm_clk_bulk_get_all(&pdev->dev, &bus->clks); in simple_pm_bus_probe() 62 if (bus->num_clks < 0) in simple_pm_bus_probe() 63 return dev_err_probe(&pdev->dev, bus->num_clks, "failed to get clocks\n"); in simple_pm_bus_probe() 93 clk_bulk_disable_unprepare(bus->num_clks, bus->clks); in simple_pm_bus_runtime_suspend() 103 ret = clk_bulk_prepare_enable(bus->num_clks, bus->clks); in simple_pm_bus_runtime_resume()
|
/linux/drivers/usb/cdns3/ |
H A D | cdns3-starfive.c | 40 int num_clks; member 83 ret = clk_bulk_prepare_enable(data->num_clks, data->clks); in cdns_clk_rst_init() 97 clk_bulk_disable_unprepare(data->num_clks, data->clks); in cdns_clk_rst_init() 104 clk_bulk_disable_unprepare(data->num_clks, data->clks); in cdns_clk_rst_deinit() 130 data->num_clks = devm_clk_bulk_get_all(data->dev, &data->clks); in cdns_starfive_probe() 131 if (data->num_clks < 0) in cdns_starfive_probe() 188 return clk_bulk_prepare_enable(data->num_clks, data->clks); in cdns_starfive_runtime_resume() 195 clk_bulk_disable_unprepare(data->num_clks, data->clks); in cdns_starfive_runtime_suspend()
|
/linux/drivers/pci/controller/dwc/ |
H A D | pcie-qcom.c | 179 int num_clks; member 188 int num_clks; member 197 int num_clks; member 204 int num_clks; member 211 int num_clks; member 219 int num_clks; member 226 int num_clks; member 416 res->num_clks = devm_clk_bulk_get_all(dev, &res->clks); in qcom_pcie_get_resources_2_1_0() 417 if (res->num_clks < 0) { in qcom_pcie_get_resources_2_1_0() 419 return res->num_clks; in qcom_pcie_get_resources_2_1_0() [all …]
|
/linux/drivers/clk/keystone/ |
H A D | syscon-clk.c | 113 int num_clks, num_parents, i; in ti_syscon_gate_clk_probe() local 126 num_clks = 0; in ti_syscon_gate_clk_probe() 128 num_clks++; in ti_syscon_gate_clk_probe() 137 hw_data = devm_kzalloc(dev, struct_size(hw_data, hws, num_clks), in ti_syscon_gate_clk_probe() 142 hw_data->num = num_clks; in ti_syscon_gate_clk_probe() 145 for (i = 0; i < num_clks; i++) { in ti_syscon_gate_clk_probe() 154 if (num_clks == 1) in ti_syscon_gate_clk_probe()
|
H A D | sci-clk.c | 423 int num_clks = 0; in ti_sci_scan_clocks_from_fw() local 458 if (num_clks == max_clks) { in ti_sci_scan_clocks_from_fw() 477 clks[num_clks] = sci_clk; in ti_sci_scan_clocks_from_fw() 480 num_clks++; in ti_sci_scan_clocks_from_fw() 483 provider->clocks = devm_kmalloc_array(dev, num_clks, sizeof(sci_clk), in ti_sci_scan_clocks_from_fw() 488 memcpy(provider->clocks, clks, num_clks * sizeof(sci_clk)); in ti_sci_scan_clocks_from_fw() 490 provider->num_clocks = num_clks; in ti_sci_scan_clocks_from_fw() 517 int num_clks = 0; in ti_sci_scan_clocks_from_dt() local 564 num_clks++; in ti_sci_scan_clocks_from_dt() 609 num_clks++; in ti_sci_scan_clocks_from_dt() [all …]
|
/linux/drivers/clk/microchip/ |
H A D | clk-mpfs.c | 151 unsigned int num_clks, struct mpfs_clock_data *data) in mpfs_clk_register_mssplls() argument 156 for (i = 0; i < num_clks; i++) { in mpfs_clk_register_mssplls() 199 unsigned int num_clks, struct mpfs_clock_data *data) in mpfs_clk_register_msspll_outs() argument 204 for (i = 0; i < num_clks; i++) { in mpfs_clk_register_msspll_outs() 259 unsigned int num_clks, struct mpfs_clock_data *data) in mpfs_clk_register_cfgs() argument 264 for (i = 0; i < num_clks; i++) { in mpfs_clk_register_cfgs() 341 int num_clks, struct mpfs_clock_data *data) in mpfs_clk_register_periphs() argument 346 for (i = 0; i < num_clks; i++) { in mpfs_clk_register_periphs() 366 unsigned int num_clks; in mpfs_clk_probe() local 370 num_clks = ARRAY_SIZE(mpfs_msspll_clks) + ARRAY_SIZE(mpfs_msspll_out_clks) in mpfs_clk_probe() [all …]
|
/linux/drivers/remoteproc/ |
H A D | qcom_q6v5_adsp.c | 74 int num_clks; member 88 int num_clks; member 238 clk_bulk_disable_unprepare(adsp->num_clks, adsp->clks); in qcom_wpss_shutdown() 261 clk_bulk_disable_unprepare(adsp->num_clks, adsp->clks); in qcom_adsp_shutdown() 397 ret = clk_bulk_prepare_enable(adsp->num_clks, adsp->clks); in adsp_start() 441 clk_bulk_disable_unprepare(adsp->num_clks, adsp->clks); in adsp_start() 536 int num_clks = 0; in adsp_init_clock() local 548 num_clks++; in adsp_init_clock() 550 adsp->num_clks = num_clks; in adsp_init_clock() 551 adsp->clks = devm_kcalloc(adsp->dev, adsp->num_clks, in adsp_init_clock() [all …]
|