Home
last modified time | relevance | path

Searched refs:rpm (Results 1 – 25 of 76) sorted by relevance

1234

/drivers/gpu/drm/i915/
Dintel_runtime_pm.c79 static void init_intel_runtime_pm_wakeref(struct intel_runtime_pm *rpm) in init_intel_runtime_pm_wakeref() argument
81 spin_lock_init(&rpm->debug.lock); in init_intel_runtime_pm_wakeref()
85 track_intel_runtime_pm_wakeref(struct intel_runtime_pm *rpm) in track_intel_runtime_pm_wakeref() argument
90 if (!rpm->available) in track_intel_runtime_pm_wakeref()
97 spin_lock_irqsave(&rpm->debug.lock, flags); in track_intel_runtime_pm_wakeref()
99 if (!rpm->debug.count) in track_intel_runtime_pm_wakeref()
100 rpm->debug.last_acquire = stack; in track_intel_runtime_pm_wakeref()
102 stacks = krealloc(rpm->debug.owners, in track_intel_runtime_pm_wakeref()
103 (rpm->debug.count + 1) * sizeof(*stacks), in track_intel_runtime_pm_wakeref()
106 stacks[rpm->debug.count++] = stack; in track_intel_runtime_pm_wakeref()
[all …]
Dintel_runtime_pm.h96 assert_rpm_device_not_suspended(struct intel_runtime_pm *rpm) in assert_rpm_device_not_suspended() argument
98 WARN_ONCE(rpm->suspended, in assert_rpm_device_not_suspended()
103 __assert_rpm_raw_wakeref_held(struct intel_runtime_pm *rpm, int wakeref_count) in __assert_rpm_raw_wakeref_held() argument
105 assert_rpm_device_not_suspended(rpm); in __assert_rpm_raw_wakeref_held()
111 __assert_rpm_wakelock_held(struct intel_runtime_pm *rpm, int wakeref_count) in __assert_rpm_wakelock_held() argument
113 __assert_rpm_raw_wakeref_held(rpm, wakeref_count); in __assert_rpm_wakelock_held()
119 assert_rpm_raw_wakeref_held(struct intel_runtime_pm *rpm) in assert_rpm_raw_wakeref_held() argument
121 __assert_rpm_raw_wakeref_held(rpm, atomic_read(&rpm->wakeref_count)); in assert_rpm_raw_wakeref_held()
125 assert_rpm_wakelock_held(struct intel_runtime_pm *rpm) in assert_rpm_wakelock_held() argument
127 __assert_rpm_wakelock_held(rpm, atomic_read(&rpm->wakeref_count)); in assert_rpm_wakelock_held()
[all …]
Dintel_wakeref.c14 wf->wakeref = intel_runtime_pm_get(wf->rpm); in rpm_get()
21 intel_runtime_pm_put(wf->rpm, wakeref); in rpm_put()
96 struct intel_runtime_pm *rpm, in __intel_wakeref_init() argument
100 wf->rpm = rpm; in __intel_wakeref_init()
128 intel_runtime_pm_put(wf->rpm, wakeref); in wakeref_auto_timeout()
132 struct intel_runtime_pm *rpm) in intel_wakeref_auto_init() argument
138 wf->rpm = rpm; in intel_wakeref_auto_init()
152 assert_rpm_wakelock_held(wf->rpm); in intel_wakeref_auto()
158 wf->wakeref = intel_runtime_pm_get_if_in_use(wf->rpm); in intel_wakeref_auto()
Dintel_wakeref.h43 struct intel_runtime_pm *rpm; member
50 struct intel_runtime_pm *rpm,
53 #define intel_wakeref_init(wf, rpm, ops) do { \ argument
56 __intel_wakeref_init((wf), (rpm), (ops), &__key); \
191 struct intel_runtime_pm *rpm; member
216 struct intel_runtime_pm *rpm);
Di915_drv.c1677 struct intel_runtime_pm *rpm = &dev_priv->runtime_pm; in i915_driver_release() local
1679 disable_rpm_wakeref_asserts(rpm); in i915_driver_release()
1690 enable_rpm_wakeref_asserts(rpm); in i915_driver_release()
1691 intel_runtime_pm_driver_release(rpm); in i915_driver_release()
1843 struct intel_runtime_pm *rpm = &dev_priv->runtime_pm; in i915_drm_suspend_late() local
1846 disable_rpm_wakeref_asserts(rpm); in i915_drm_suspend_late()
1886 enable_rpm_wakeref_asserts(rpm); in i915_drm_suspend_late()
1888 intel_runtime_pm_driver_release(rpm); in i915_drm_suspend_late()
2594 struct intel_runtime_pm *rpm = &dev_priv->runtime_pm; in intel_runtime_suspend() local
2605 disable_rpm_wakeref_asserts(rpm); in intel_runtime_suspend()
[all …]
/drivers/mfd/
Dqcom_rpm.c58 #define RPM_STATUS_REG(rpm, i) ((rpm)->status_regs + (i) * 4) argument
59 #define RPM_CTRL_REG(rpm, i) ((rpm)->ctrl_regs + (i) * 4) argument
60 #define RPM_REQ_REG(rpm, i) ((rpm)->req_regs + (i) * 4) argument
445 int qcom_rpm_write(struct qcom_rpm *rpm, in qcom_rpm_write() argument
451 const struct qcom_rpm_data *data = rpm->data; in qcom_rpm_write()
464 mutex_lock(&rpm->lock); in qcom_rpm_write()
467 writel_relaxed(buf[i], RPM_REQ_REG(rpm, res->target_id + i)); in qcom_rpm_write()
470 for (i = 0; i < rpm->data->req_sel_size; i++) { in qcom_rpm_write()
472 RPM_CTRL_REG(rpm, rpm->data->req_sel_off + i)); in qcom_rpm_write()
475 writel_relaxed(BIT(state), RPM_CTRL_REG(rpm, rpm->data->req_ctx_off)); in qcom_rpm_write()
[all …]
/drivers/soc/qcom/
Dsmd-rpm.c92 int qcom_rpm_smd_write(struct qcom_smd_rpm *rpm, in qcom_rpm_smd_write() argument
116 mutex_lock(&rpm->lock); in qcom_rpm_smd_write()
128 ret = rpmsg_send(rpm->rpm_channel, pkt, size); in qcom_rpm_smd_write()
132 left = wait_for_completion_timeout(&rpm->ack, RPM_REQUEST_TIMEOUT); in qcom_rpm_smd_write()
136 ret = rpm->ack_status; in qcom_rpm_smd_write()
140 mutex_unlock(&rpm->lock); in qcom_rpm_smd_write()
154 struct qcom_smd_rpm *rpm = dev_get_drvdata(&rpdev->dev); in qcom_smd_rpm_callback() local
163 dev_err(rpm->dev, "invalid request\n"); in qcom_smd_rpm_callback()
188 rpm->ack_status = status; in qcom_smd_rpm_callback()
189 complete(&rpm->ack); in qcom_smd_rpm_callback()
[all …]
Drpmpd.c105 struct qcom_smd_rpm *rpm; member
215 return qcom_rpm_smd_write(pd->rpm, QCOM_SMD_RPM_ACTIVE_STATE, in rpmpd_send_enable()
227 return qcom_rpm_smd_write(pd->rpm, state, pd->res_type, pd->res_id, in rpmpd_send_corner()
342 struct qcom_smd_rpm *rpm; in rpmpd_probe() local
346 rpm = dev_get_drvdata(pdev->dev.parent); in rpmpd_probe()
347 if (!rpm) { in rpmpd_probe()
374 rpmpds[i]->rpm = rpm; in rpmpd_probe()
/drivers/hwmon/
Dmax31790.c45 #define RPM_TO_REG(rpm, sr) ((60 * (sr) * 8192) / ((rpm) * 2)) argument
142 static u8 bits_for_tach_period(int rpm) in bits_for_tach_period() argument
146 if (rpm < 500) in bits_for_tach_period()
148 else if (rpm < 1000) in bits_for_tach_period()
150 else if (rpm < 2000) in bits_for_tach_period()
152 else if (rpm < 4000) in bits_for_tach_period()
154 else if (rpm < 8000) in bits_for_tach_period()
166 int sr, rpm; in max31790_read_fan() local
174 rpm = RPM_FROM_REG(data->tach[channel], sr); in max31790_read_fan()
175 *val = rpm; in max31790_read_fan()
[all …]
Daspeed-pwm-tacho.c610 int rpm; in rpm_show() local
613 rpm = aspeed_get_fan_tach_ch_rpm(priv, index); in rpm_show()
614 if (rpm < 0) in rpm_show()
615 return rpm; in rpm_show()
617 return sprintf(buf, "%d\n", rpm); in rpm_show()
667 static SENSOR_DEVICE_ATTR_RO(fan1_input, rpm, 0);
668 static SENSOR_DEVICE_ATTR_RO(fan2_input, rpm, 1);
669 static SENSOR_DEVICE_ATTR_RO(fan3_input, rpm, 2);
670 static SENSOR_DEVICE_ATTR_RO(fan4_input, rpm, 3);
671 static SENSOR_DEVICE_ATTR_RO(fan5_input, rpm, 4);
[all …]
Dultra45_env.c102 int rpm, period; in show_fan_speed() local
108 rpm = FAN_PERIOD_TO_RPM(period); in show_fan_speed()
110 rpm = 0; in show_fan_speed()
112 return sprintf(buf, "%d\n", rpm); in show_fan_speed()
119 unsigned long rpm; in set_fan_speed() local
125 err = kstrtoul(buf, 10, &rpm); in set_fan_speed()
129 if (!rpm) in set_fan_speed()
132 period = FAN_RPM_TO_PERIOD(rpm); in set_fan_speed()
Dgpio-fan.c25 int rpm; member
153 static int rpm_to_speed_index(struct gpio_fan_data *fan_data, unsigned long rpm) in rpm_to_speed_index() argument
159 if (speed[i].rpm >= rpm) in rpm_to_speed_index()
246 return sprintf(buf, "%d\n", fan_data->speed[0].rpm); in fan1_min_show()
255 fan_data->speed[fan_data->num_speed - 1].rpm); in fan1_max_show()
263 return sprintf(buf, "%d\n", fan_data->speed[fan_data->speed_index].rpm); in fan1_input_show()
270 unsigned long rpm; in set_rpm() local
273 if (kstrtoul(buf, 10, &rpm)) in set_rpm()
283 set_fan_speed(fan_data, rpm_to_speed_index(fan_data, rpm)); in set_rpm()
471 speed[i].rpm = u; in gpio_fan_get_of_data()
Dg762.c182 static inline unsigned char cnt_from_rpm(unsigned long rpm, u32 clk_freq, u16 p, in cnt_from_rpm() argument
188 if (!rpm) /* to stop the fan, set cnt to 255 */ in cnt_from_rpm()
191 rpm = clamp_val(rpm, f1 / (255 * f2), ULONG_MAX / f2); in cnt_from_rpm()
192 return DIV_ROUND_CLOSEST(f1, rpm * f2); in cnt_from_rpm()
727 unsigned int rpm = 0; in fan1_input_show() local
735 rpm = rpm_from_cnt(data->act_cnt, data->clk_freq, in fan1_input_show()
742 return sprintf(buf, "%u\n", rpm); in fan1_input_show()
931 unsigned int rpm; in fan1_target_show() local
937 rpm = rpm_from_cnt(data->set_cnt, data->clk_freq, in fan1_target_show()
943 return sprintf(buf, "%u\n", rpm); in fan1_target_show()
Dg760a.c110 unsigned int rpm = 0; in fan1_input_show() local
114 rpm = rpm_from_cnt(data->act_cnt, data->clk, data->fan_div); in fan1_input_show()
117 return sprintf(buf, "%d\n", rpm); in fan1_input_show()
Demc2103.c279 int rpm = 0; in fan1_input_show() local
281 rpm = (FAN_RPM_FACTOR * data->fan_multiplier) / data->fan_tach; in fan1_input_show()
282 return sprintf(buf, "%d\n", rpm); in fan1_input_show()
364 int rpm = 0; in fan1_target_show() local
368 rpm = (FAN_RPM_FACTOR * data->fan_multiplier) in fan1_target_show()
371 return sprintf(buf, "%d\n", rpm); in fan1_target_show()
Dmax6650.c262 static int max6650_set_target(struct max6650_data *data, unsigned long rpm) in max6650_set_target() argument
266 if (rpm == 0) in max6650_set_target()
269 rpm = clamp_val(rpm, FAN_RPM_MIN, FAN_RPM_MAX); in max6650_set_target()
279 ktach = ((clock * kscale) / (256 * rpm / 60)) - 1; in max6650_set_target()
Dpwm-fan.c32 unsigned int rpm; member
64 ctx->rpm = tmp; in sample_timer()
135 return sprintf(buf, "%u\n", ctx->rpm); in rpm_show()
139 static SENSOR_DEVICE_ATTR_RO(fan1_input, rpm, 0);
/drivers/clk/qcom/
Dclk-rpm.c145 struct qcom_rpm *rpm; member
150 struct qcom_rpm *rpm; member
177 ret = qcom_rpm_write(r->rpm, QCOM_RPM_ACTIVE_STATE, in clk_rpm_handoff()
181 ret = qcom_rpm_write(r->rpm, QCOM_RPM_SLEEP_STATE, in clk_rpm_handoff()
193 return qcom_rpm_write(r->rpm, QCOM_RPM_ACTIVE_STATE, in clk_rpm_set_rate_active()
201 return qcom_rpm_write(r->rpm, QCOM_RPM_SLEEP_STATE, in clk_rpm_set_rate_sleep()
313 ret = qcom_rpm_write(r->rpm, QCOM_RPM_ACTIVE_STATE, clk_id, &value, 1); in clk_rpm_xo_prepare()
334 ret = qcom_rpm_write(r->rpm, QCOM_RPM_ACTIVE_STATE, clk_id, &value, 1); in clk_rpm_xo_unprepare()
349 ret = qcom_rpm_write(r->rpm, QCOM_RPM_ACTIVE_STATE, in clk_rpm_fixed_prepare()
363 ret = qcom_rpm_write(r->rpm, QCOM_RPM_ACTIVE_STATE, in clk_rpm_fixed_unprepare()
[all …]
Dclk-smd-rpm.c132 struct qcom_smd_rpm *rpm; member
142 struct qcom_rpm *rpm; member
163 ret = qcom_rpm_smd_write(r->rpm, QCOM_SMD_RPM_ACTIVE_STATE, in clk_smd_rpm_handoff()
168 ret = qcom_rpm_smd_write(r->rpm, QCOM_SMD_RPM_SLEEP_STATE, in clk_smd_rpm_handoff()
186 return qcom_rpm_smd_write(r->rpm, QCOM_SMD_RPM_ACTIVE_STATE, in clk_smd_rpm_set_rate_active()
200 return qcom_rpm_smd_write(r->rpm, QCOM_SMD_RPM_SLEEP_STATE, in clk_smd_rpm_set_rate_sleep()
367 static int clk_smd_rpm_enable_scaling(struct qcom_smd_rpm *rpm) in clk_smd_rpm_enable_scaling() argument
376 ret = qcom_rpm_smd_write(rpm, QCOM_SMD_RPM_SLEEP_STATE, in clk_smd_rpm_enable_scaling()
384 ret = qcom_rpm_smd_write(rpm, QCOM_SMD_RPM_ACTIVE_STATE, in clk_smd_rpm_enable_scaling()
744 struct qcom_smd_rpm *rpm; in rpm_smd_clk_probe() local
[all …]
/drivers/interconnect/qcom/
DMakefile5 icc-smd-rpm-objs := smd-rpm.o
9 obj-$(CONFIG_INTERCONNECT_QCOM_SMD_RPM) += icc-smd-rpm.o
/drivers/thunderbolt/
Dicm.c80 bool rpm; member
90 size_t *nboot_acl, bool *rpm);
416 size_t *nboot_acl, bool *rpm) in icm_fr_driver_ready() argument
599 sw->rpm = !!(vss->flags & INTEL_VSS_FLAGS_RTD3); in add_switch()
962 size_t *nboot_acl, bool *rpm) in icm_tr_driver_ready() argument
981 if (rpm) in icm_tr_driver_ready()
982 *rpm = !!(reply.hdr.flags & ICM_TR_FLAGS_RTD3); in icm_tr_driver_ready()
1212 sw->rpm = true; in __icm_tr_device_connected()
1405 size_t *nboot_acl, bool *rpm) in icm_ar_driver_ready() argument
1424 if (rpm) in icm_ar_driver_ready()
[all …]
/drivers/gpu/drm/i915/gvt/
Daperture_gm.c191 struct intel_runtime_pm *rpm = &dev_priv->runtime_pm; in alloc_vgpu_fence() local
195 intel_runtime_pm_get(rpm); in alloc_vgpu_fence()
211 intel_runtime_pm_put_unchecked(rpm); in alloc_vgpu_fence()
224 intel_runtime_pm_put_unchecked(rpm); in alloc_vgpu_fence()
/drivers/gpu/drm/i915/gem/
Di915_gem_mman.c224 struct intel_runtime_pm *rpm = &i915->runtime_pm; in i915_gem_fault() local
246 wakeref = intel_runtime_pm_get(rpm); in i915_gem_fault()
307 assert_rpm_wakelock_held(rpm); in i915_gem_fault()
334 intel_runtime_pm_put(rpm, wakeref); in i915_gem_fault()
/drivers/regulator/
Dqcom_smd-regulator.c17 struct qcom_smd_rpm *rpm; member
73 ret = qcom_rpm_smd_write(vreg->rpm, QCOM_SMD_RPM_ACTIVE_STATE, in rpm_reg_write_active()
786 struct qcom_smd_rpm *rpm; in rpm_reg_probe() local
788 rpm = dev_get_drvdata(pdev->dev.parent); in rpm_reg_probe()
789 if (!rpm) { in rpm_reg_probe()
808 vreg->rpm = rpm; in rpm_reg_probe()
/drivers/gpu/drm/i915/gt/
Dintel_engine_pm.c172 struct intel_runtime_pm *rpm = &engine->i915->runtime_pm; in intel_engine_init__pm() local
174 intel_wakeref_init(&engine->wakeref, rpm, &wf_ops); in intel_engine_init__pm()

1234