Lines Matching refs:ret

131 	int ret;  in exynos_ppmu_disable()  local
135 ret = regmap_write(info->regmap, PPMU_CNTENC, in exynos_ppmu_disable()
141 if (ret < 0) in exynos_ppmu_disable()
142 return ret; in exynos_ppmu_disable()
145 ret = regmap_read(info->regmap, PPMU_PMNC, &pmnc); in exynos_ppmu_disable()
146 if (ret < 0) in exynos_ppmu_disable()
147 return ret; in exynos_ppmu_disable()
150 ret = regmap_write(info->regmap, PPMU_PMNC, pmnc); in exynos_ppmu_disable()
151 if (ret < 0) in exynos_ppmu_disable()
152 return ret; in exynos_ppmu_disable()
161 int ret; in exynos_ppmu_set_event() local
168 ret = regmap_read(info->regmap, PPMU_CNTENS, &cntens); in exynos_ppmu_set_event()
169 if (ret < 0) in exynos_ppmu_set_event()
170 return ret; in exynos_ppmu_set_event()
173 ret = regmap_write(info->regmap, PPMU_CNTENS, cntens); in exynos_ppmu_set_event()
174 if (ret < 0) in exynos_ppmu_set_event()
175 return ret; in exynos_ppmu_set_event()
178 ret = regmap_write(info->regmap, PPMU_BEVTxSEL(id), in exynos_ppmu_set_event()
180 if (ret < 0) in exynos_ppmu_set_event()
181 return ret; in exynos_ppmu_set_event()
184 ret = regmap_read(info->regmap, PPMU_PMNC, &pmnc); in exynos_ppmu_set_event()
185 if (ret < 0) in exynos_ppmu_set_event()
186 return ret; in exynos_ppmu_set_event()
194 ret = regmap_write(info->regmap, PPMU_PMNC, pmnc); in exynos_ppmu_set_event()
195 if (ret < 0) in exynos_ppmu_set_event()
196 return ret; in exynos_ppmu_set_event()
209 int ret; in exynos_ppmu_get_event() local
215 ret = regmap_read(info->regmap, PPMU_PMNC, &pmnc); in exynos_ppmu_get_event()
216 if (ret < 0) in exynos_ppmu_get_event()
217 return ret; in exynos_ppmu_get_event()
220 ret = regmap_write(info->regmap, PPMU_PMNC, pmnc); in exynos_ppmu_get_event()
221 if (ret < 0) in exynos_ppmu_get_event()
222 return ret; in exynos_ppmu_get_event()
225 ret = regmap_read(info->regmap, PPMU_CCNT, &total_count); in exynos_ppmu_get_event()
226 if (ret < 0) in exynos_ppmu_get_event()
227 return ret; in exynos_ppmu_get_event()
235 ret = regmap_read(info->regmap, PPMU_PMNCT(id), &load_count); in exynos_ppmu_get_event()
236 if (ret < 0) in exynos_ppmu_get_event()
237 return ret; in exynos_ppmu_get_event()
241 ret = regmap_read(info->regmap, PPMU_PMCNT3_HIGH, &pmcnt3_high); in exynos_ppmu_get_event()
242 if (ret < 0) in exynos_ppmu_get_event()
243 return ret; in exynos_ppmu_get_event()
245 ret = regmap_read(info->regmap, PPMU_PMCNT3_LOW, &pmcnt3_low); in exynos_ppmu_get_event()
246 if (ret < 0) in exynos_ppmu_get_event()
247 return ret; in exynos_ppmu_get_event()
256 ret = regmap_read(info->regmap, PPMU_CNTENC, &cntenc); in exynos_ppmu_get_event()
257 if (ret < 0) in exynos_ppmu_get_event()
258 return ret; in exynos_ppmu_get_event()
261 ret = regmap_write(info->regmap, PPMU_CNTENC, cntenc); in exynos_ppmu_get_event()
262 if (ret < 0) in exynos_ppmu_get_event()
263 return ret; in exynos_ppmu_get_event()
283 int ret; in exynos_ppmu_v2_disable() local
289 ret = regmap_write(info->regmap, PPMU_V2_FLAG, clear); in exynos_ppmu_v2_disable()
290 if (ret < 0) in exynos_ppmu_v2_disable()
291 return ret; in exynos_ppmu_v2_disable()
293 ret = regmap_write(info->regmap, PPMU_V2_INTENC, clear); in exynos_ppmu_v2_disable()
294 if (ret < 0) in exynos_ppmu_v2_disable()
295 return ret; in exynos_ppmu_v2_disable()
297 ret = regmap_write(info->regmap, PPMU_V2_CNTENC, clear); in exynos_ppmu_v2_disable()
298 if (ret < 0) in exynos_ppmu_v2_disable()
299 return ret; in exynos_ppmu_v2_disable()
301 ret = regmap_write(info->regmap, PPMU_V2_CNT_RESET, clear); in exynos_ppmu_v2_disable()
302 if (ret < 0) in exynos_ppmu_v2_disable()
303 return ret; in exynos_ppmu_v2_disable()
305 ret = regmap_write(info->regmap, PPMU_V2_CIG_CFG0, 0x0); in exynos_ppmu_v2_disable()
306 if (ret < 0) in exynos_ppmu_v2_disable()
307 return ret; in exynos_ppmu_v2_disable()
309 ret = regmap_write(info->regmap, PPMU_V2_CIG_CFG1, 0x0); in exynos_ppmu_v2_disable()
310 if (ret < 0) in exynos_ppmu_v2_disable()
311 return ret; in exynos_ppmu_v2_disable()
313 ret = regmap_write(info->regmap, PPMU_V2_CIG_CFG2, 0x0); in exynos_ppmu_v2_disable()
314 if (ret < 0) in exynos_ppmu_v2_disable()
315 return ret; in exynos_ppmu_v2_disable()
317 ret = regmap_write(info->regmap, PPMU_V2_CIG_RESULT, 0x0); in exynos_ppmu_v2_disable()
318 if (ret < 0) in exynos_ppmu_v2_disable()
319 return ret; in exynos_ppmu_v2_disable()
321 ret = regmap_write(info->regmap, PPMU_V2_CNT_AUTO, 0x0); in exynos_ppmu_v2_disable()
322 if (ret < 0) in exynos_ppmu_v2_disable()
323 return ret; in exynos_ppmu_v2_disable()
325 ret = regmap_write(info->regmap, PPMU_V2_CH_EV0_TYPE, 0x0); in exynos_ppmu_v2_disable()
326 if (ret < 0) in exynos_ppmu_v2_disable()
327 return ret; in exynos_ppmu_v2_disable()
329 ret = regmap_write(info->regmap, PPMU_V2_CH_EV1_TYPE, 0x0); in exynos_ppmu_v2_disable()
330 if (ret < 0) in exynos_ppmu_v2_disable()
331 return ret; in exynos_ppmu_v2_disable()
333 ret = regmap_write(info->regmap, PPMU_V2_CH_EV2_TYPE, 0x0); in exynos_ppmu_v2_disable()
334 if (ret < 0) in exynos_ppmu_v2_disable()
335 return ret; in exynos_ppmu_v2_disable()
337 ret = regmap_write(info->regmap, PPMU_V2_CH_EV3_TYPE, 0x0); in exynos_ppmu_v2_disable()
338 if (ret < 0) in exynos_ppmu_v2_disable()
339 return ret; in exynos_ppmu_v2_disable()
341 ret = regmap_write(info->regmap, PPMU_V2_SM_ID_V, 0x0); in exynos_ppmu_v2_disable()
342 if (ret < 0) in exynos_ppmu_v2_disable()
343 return ret; in exynos_ppmu_v2_disable()
345 ret = regmap_write(info->regmap, PPMU_V2_SM_ID_A, 0x0); in exynos_ppmu_v2_disable()
346 if (ret < 0) in exynos_ppmu_v2_disable()
347 return ret; in exynos_ppmu_v2_disable()
349 ret = regmap_write(info->regmap, PPMU_V2_SM_OTHERS_V, 0x0); in exynos_ppmu_v2_disable()
350 if (ret < 0) in exynos_ppmu_v2_disable()
351 return ret; in exynos_ppmu_v2_disable()
353 ret = regmap_write(info->regmap, PPMU_V2_SM_OTHERS_A, 0x0); in exynos_ppmu_v2_disable()
354 if (ret < 0) in exynos_ppmu_v2_disable()
355 return ret; in exynos_ppmu_v2_disable()
357 ret = regmap_write(info->regmap, PPMU_V2_INTERRUPT_RESET, 0x0); in exynos_ppmu_v2_disable()
358 if (ret < 0) in exynos_ppmu_v2_disable()
359 return ret; in exynos_ppmu_v2_disable()
362 ret = regmap_read(info->regmap, PPMU_V2_PMNC, &pmnc); in exynos_ppmu_v2_disable()
363 if (ret < 0) in exynos_ppmu_v2_disable()
364 return ret; in exynos_ppmu_v2_disable()
367 ret = regmap_write(info->regmap, PPMU_V2_PMNC, pmnc); in exynos_ppmu_v2_disable()
368 if (ret < 0) in exynos_ppmu_v2_disable()
369 return ret; in exynos_ppmu_v2_disable()
379 int ret; in exynos_ppmu_v2_set_event() local
382 ret = regmap_read(info->regmap, PPMU_V2_CNTENS, &cntens); in exynos_ppmu_v2_set_event()
383 if (ret < 0) in exynos_ppmu_v2_set_event()
384 return ret; in exynos_ppmu_v2_set_event()
387 ret = regmap_write(info->regmap, PPMU_V2_CNTENS, cntens); in exynos_ppmu_v2_set_event()
388 if (ret < 0) in exynos_ppmu_v2_set_event()
389 return ret; in exynos_ppmu_v2_set_event()
392 ret = regmap_write(info->regmap, PPMU_V2_CH_EVx_TYPE(id), in exynos_ppmu_v2_set_event()
394 if (ret < 0) in exynos_ppmu_v2_set_event()
395 return ret; in exynos_ppmu_v2_set_event()
398 ret = regmap_read(info->regmap, PPMU_V2_PMNC, &pmnc); in exynos_ppmu_v2_set_event()
399 if (ret < 0) in exynos_ppmu_v2_set_event()
400 return ret; in exynos_ppmu_v2_set_event()
412 ret = regmap_write(info->regmap, PPMU_V2_PMNC, pmnc); in exynos_ppmu_v2_set_event()
413 if (ret < 0) in exynos_ppmu_v2_set_event()
414 return ret; in exynos_ppmu_v2_set_event()
424 int ret; in exynos_ppmu_v2_get_event() local
431 ret = regmap_read(info->regmap, PPMU_V2_PMNC, &pmnc); in exynos_ppmu_v2_get_event()
432 if (ret < 0) in exynos_ppmu_v2_get_event()
433 return ret; in exynos_ppmu_v2_get_event()
436 ret = regmap_write(info->regmap, PPMU_V2_PMNC, pmnc); in exynos_ppmu_v2_get_event()
437 if (ret < 0) in exynos_ppmu_v2_get_event()
438 return ret; in exynos_ppmu_v2_get_event()
441 ret = regmap_read(info->regmap, PPMU_V2_CCNT, &total_count); in exynos_ppmu_v2_get_event()
442 if (ret < 0) in exynos_ppmu_v2_get_event()
443 return ret; in exynos_ppmu_v2_get_event()
450 ret = regmap_read(info->regmap, PPMU_V2_PMNCT(id), &count); in exynos_ppmu_v2_get_event()
451 if (ret < 0) in exynos_ppmu_v2_get_event()
452 return ret; in exynos_ppmu_v2_get_event()
456 ret = regmap_read(info->regmap, PPMU_V2_PMCNT3_HIGH, in exynos_ppmu_v2_get_event()
458 if (ret < 0) in exynos_ppmu_v2_get_event()
459 return ret; in exynos_ppmu_v2_get_event()
461 ret = regmap_read(info->regmap, PPMU_V2_PMCNT3_LOW, &pmcnt_low); in exynos_ppmu_v2_get_event()
462 if (ret < 0) in exynos_ppmu_v2_get_event()
463 return ret; in exynos_ppmu_v2_get_event()
471 ret = regmap_read(info->regmap, PPMU_V2_CNTENC, &cntenc); in exynos_ppmu_v2_get_event()
472 if (ret < 0) in exynos_ppmu_v2_get_event()
476 ret = regmap_write(info->regmap, PPMU_V2_CNTENC, cntenc); in exynos_ppmu_v2_get_event()
477 if (ret < 0) in exynos_ppmu_v2_get_event()
478 return ret; in exynos_ppmu_v2_get_event()
511 int ret; in of_get_devfreq_events() local
561 ret = of_property_read_u32(node, "event-data-type", in of_get_devfreq_events()
563 if (ret) { in of_get_devfreq_events()
612 int ret = 0; in exynos_ppmu_parse_dt() local
639 ret = of_get_devfreq_events(np, info); in exynos_ppmu_parse_dt()
640 if (ret < 0) { in exynos_ppmu_parse_dt()
642 return ret; in exynos_ppmu_parse_dt()
653 int i, ret = 0, size; in exynos_ppmu_probe() local
662 ret = exynos_ppmu_parse_dt(pdev, info); in exynos_ppmu_probe()
663 if (ret < 0) { in exynos_ppmu_probe()
666 return ret; in exynos_ppmu_probe()
690 ret = clk_prepare_enable(info->ppmu.clk); in exynos_ppmu_probe()
691 if (ret) { in exynos_ppmu_probe()
693 return ret; in exynos_ppmu_probe()