Home
last modified time | relevance | path

Searched refs:power (Results 1 – 25 of 536) sorted by relevance

12345678910>>...22

/drivers/base/power/
Druntime.c69 if (dev->power.disable_depth > 0) in update_pm_runtime_accounting()
72 last = dev->power.accounting_timestamp; in update_pm_runtime_accounting()
75 dev->power.accounting_timestamp = now; in update_pm_runtime_accounting()
87 if (dev->power.runtime_status == RPM_SUSPENDED) in update_pm_runtime_accounting()
88 dev->power.suspended_time += delta; in update_pm_runtime_accounting()
90 dev->power.active_time += delta; in update_pm_runtime_accounting()
97 dev->power.runtime_status = status; in __update_runtime_status()
105 spin_lock_irqsave(&dev->power.lock, flags); in rpm_get_accounted_time()
108 time = suspended ? dev->power.suspended_time : dev->power.active_time; in rpm_get_accounted_time()
110 spin_unlock_irqrestore(&dev->power.lock, flags); in rpm_get_accounted_time()
[all …]
Dqos.c54 struct dev_pm_qos *qos = dev->power.qos; in __dev_pm_qos_flags()
58 lockdep_assert_held(&dev->power.lock); in __dev_pm_qos_flags()
84 spin_lock_irqsave(&dev->power.lock, irqflags); in dev_pm_qos_flags()
86 spin_unlock_irqrestore(&dev->power.lock, irqflags); in dev_pm_qos_flags()
100 lockdep_assert_held(&dev->power.lock); in __dev_pm_qos_resume_latency()
112 struct dev_pm_qos *qos = dev->power.qos; in dev_pm_qos_read_value()
116 spin_lock_irqsave(&dev->power.lock, flags); in dev_pm_qos_read_value()
136 spin_unlock_irqrestore(&dev->power.lock, flags); in dev_pm_qos_read_value()
154 struct dev_pm_qos *qos = req->dev->power.qos; in apply_constraint()
170 req->dev->power.set_latency_tolerance(req->dev, value); in apply_constraint()
[all …]
Dsysfs.c105 dev->power.runtime_auto ? ctrl_auto : ctrl_on); in control_show()
155 if (dev->power.runtime_error) { in runtime_status_show()
157 } else if (dev->power.disable_depth) { in runtime_status_show()
160 switch (dev->power.runtime_status) { in runtime_status_show()
186 if (!dev->power.use_autosuspend) in autosuspend_delay_ms_show()
189 return sysfs_emit(buf, "%d\n", dev->power.autosuspend_delay); in autosuspend_delay_ms_show()
197 if (!dev->power.use_autosuspend) in autosuspend_delay_ms_store()
248 ret = dev_pm_qos_update_request(dev->power.qos->resume_latency_req, in pm_qos_resume_latency_us_store()
355 spin_lock_irq(&dev->power.lock); in wakeup_count_show()
356 if (dev->power.wakeup) { in wakeup_count_show()
[all …]
Dmain.c101 dev->power.is_prepared = false; in device_pm_sleep_init()
102 dev->power.is_suspended = false; in device_pm_sleep_init()
103 dev->power.is_noirq_suspended = false; in device_pm_sleep_init()
104 dev->power.is_late_suspended = false; in device_pm_sleep_init()
105 init_completion(&dev->power.completion); in device_pm_sleep_init()
106 complete_all(&dev->power.completion); in device_pm_sleep_init()
107 dev->power.wakeup = NULL; in device_pm_sleep_init()
108 INIT_LIST_HEAD(&dev->power.entry); in device_pm_sleep_init()
141 if (dev->parent && dev->parent->power.is_prepared) in device_pm_add()
144 list_add_tail(&dev->power.entry, &dpm_list); in device_pm_add()
[all …]
Dwakeirq.c26 spin_lock_irqsave(&dev->power.lock, flags); in dev_pm_attach_wake_irq()
27 if (dev_WARN_ONCE(dev, dev->power.wakeirq, in dev_pm_attach_wake_irq()
29 spin_unlock_irqrestore(&dev->power.lock, flags); in dev_pm_attach_wake_irq()
33 dev->power.wakeirq = wirq; in dev_pm_attach_wake_irq()
36 spin_unlock_irqrestore(&dev->power.lock, flags); in dev_pm_attach_wake_irq()
86 struct wake_irq *wirq = dev->power.wakeirq; in dev_pm_clear_wake_irq()
92 spin_lock_irqsave(&dev->power.lock, flags); in dev_pm_clear_wake_irq()
94 dev->power.wakeirq = NULL; in dev_pm_clear_wake_irq()
95 spin_unlock_irqrestore(&dev->power.lock, flags); in dev_pm_clear_wake_irq()
261 struct wake_irq *wirq = dev->power.wakeirq; in dev_pm_enable_wake_irq()
[all …]
/drivers/power/supply/
Daxp20x_usb_power.c77 static bool axp20x_usb_vbus_needs_polling(struct axp20x_usb_power *power) in axp20x_usb_vbus_needs_polling() argument
84 if (power->axp20x_id >= AXP221_ID && !power->online) in axp20x_usb_vbus_needs_polling()
92 struct axp20x_usb_power *power = devid; in axp20x_usb_power_irq() local
94 power_supply_changed(power->supply); in axp20x_usb_power_irq()
96 mod_delayed_work(system_power_efficient_wq, &power->vbus_detect, DEBOUNCE_TIME); in axp20x_usb_power_irq()
103 struct axp20x_usb_power *power = in axp20x_usb_power_poll_vbus() local
108 ret = regmap_read(power->regmap, AXP20X_PWR_INPUT_STATUS, &val); in axp20x_usb_power_poll_vbus()
113 if (val != power->old_status) in axp20x_usb_power_poll_vbus()
114 power_supply_changed(power->supply); in axp20x_usb_power_poll_vbus()
116 power->old_status = val; in axp20x_usb_power_poll_vbus()
[all …]
Daxp20x_ac_power.c54 struct axp20x_ac_power *power = devid; in axp20x_ac_power_irq() local
56 power_supply_changed(power->supply); in axp20x_ac_power_irq()
65 struct axp20x_ac_power *power = power_supply_get_drvdata(psy); in axp20x_ac_power_get_property() local
70 ret = regmap_read(power->regmap, AXP20X_PWR_INPUT_STATUS, &reg); in axp20x_ac_power_get_property()
83 ret = regmap_read(power->regmap, AXP20X_PWR_INPUT_STATUS, &reg); in axp20x_ac_power_get_property()
91 ret = regmap_read(power->regmap, AXP20X_PWR_INPUT_STATUS, &reg); in axp20x_ac_power_get_property()
98 if (val->intval && power->has_acin_path_sel) { in axp20x_ac_power_get_property()
99 ret = regmap_read(power->regmap, AXP813_ACIN_PATH_CTRL, in axp20x_ac_power_get_property()
110 ret = iio_read_channel_processed(power->acin_v, &val->intval); in axp20x_ac_power_get_property()
120 ret = iio_read_channel_processed(power->acin_i, &val->intval); in axp20x_ac_power_get_property()
[all …]
Dwm831x_power.c536 struct wm831x_power *power; in wm831x_power_probe() local
539 power = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_power), in wm831x_power_probe()
541 if (power == NULL) in wm831x_power_probe()
544 power->wm831x = wm831x; in wm831x_power_probe()
545 platform_set_drvdata(pdev, power); in wm831x_power_probe()
548 snprintf(power->wall_name, sizeof(power->wall_name), in wm831x_power_probe()
550 snprintf(power->battery_name, sizeof(power->wall_name), in wm831x_power_probe()
552 snprintf(power->usb_name, sizeof(power->wall_name), in wm831x_power_probe()
555 snprintf(power->wall_name, sizeof(power->wall_name), in wm831x_power_probe()
557 snprintf(power->battery_name, sizeof(power->wall_name), in wm831x_power_probe()
[all …]
Dwm8350_power.c44 if (!wm8350->power.rev_g_coeff) in wm8350_charge_time_min()
187 struct wm8350_power *power = &wm8350->power; in wm8350_charger_handler() local
188 struct wm8350_charger_policy *policy = power->policy; in wm8350_charger_handler()
196 power_supply_changed(power->battery); in wm8350_charger_handler()
203 power_supply_changed(power->battery); in wm8350_charger_handler()
232 power_supply_changed(power->battery); in wm8350_charger_handler()
233 power_supply_changed(power->usb); in wm8350_charger_handler()
234 power_supply_changed(power->ac); in wm8350_charger_handler()
539 struct wm8350_power *power = &wm8350->power; in wm8350_power_probe() local
540 struct wm8350_charger_policy *policy = power->policy; in wm8350_power_probe()
[all …]
/drivers/staging/nvec/
Dnvec_power.c87 struct nvec_power *power = in nvec_power_notifier() local
95 if (power->on != res->plu) { in nvec_power_notifier()
96 power->on = res->plu; in nvec_power_notifier()
109 static void get_bat_mfg_data(struct nvec_power *power) in get_bat_mfg_data() argument
116 nvec_write_async(power->nvec, buf, 2); in get_bat_mfg_data()
123 struct nvec_power *power = in nvec_power_bat_notifier() local
134 if (power->bat_present == 0) { in nvec_power_bat_notifier()
136 get_bat_mfg_data(power); in nvec_power_bat_notifier()
139 power->bat_present = 1; in nvec_power_bat_notifier()
143 power->bat_status = in nvec_power_bat_notifier()
[all …]
/drivers/net/ipa/
Dipa_power.c115 static int ipa_interconnect_init(struct ipa_power *power, struct device *dev, in ipa_interconnect_init() argument
122 count = power->interconnect_count; in ipa_interconnect_init()
126 power->interconnect = interconnect; in ipa_interconnect_init()
138 while (interconnect-- > power->interconnect) in ipa_interconnect_init()
140 kfree(power->interconnect); in ipa_interconnect_init()
141 power->interconnect = NULL; in ipa_interconnect_init()
147 static void ipa_interconnect_exit(struct ipa_power *power) in ipa_interconnect_exit() argument
151 interconnect = power->interconnect + power->interconnect_count; in ipa_interconnect_exit()
152 while (interconnect-- > power->interconnect) in ipa_interconnect_exit()
154 kfree(power->interconnect); in ipa_interconnect_exit()
[all …]
/drivers/gpu/drm/msm/dp/
Ddp_power.c27 static void dp_power_regulator_disable(struct dp_power_private *power) in dp_power_regulator_disable() argument
29 struct regulator_bulk_data *s = power->supplies; in dp_power_regulator_disable()
30 const struct dp_reg_entry *regs = power->parser->regulator_cfg->regs; in dp_power_regulator_disable()
31 int num = power->parser->regulator_cfg->num; in dp_power_regulator_disable()
43 static int dp_power_regulator_enable(struct dp_power_private *power) in dp_power_regulator_enable() argument
45 struct regulator_bulk_data *s = power->supplies; in dp_power_regulator_enable()
46 const struct dp_reg_entry *regs = power->parser->regulator_cfg->regs; in dp_power_regulator_enable()
47 int num = power->parser->regulator_cfg->num; in dp_power_regulator_enable()
77 static int dp_power_regulator_init(struct dp_power_private *power) in dp_power_regulator_init() argument
79 struct regulator_bulk_data *s = power->supplies; in dp_power_regulator_init()
[all …]
/drivers/soc/bcm/
Dbcm2835-power.c109 #define PM_READ(reg) readl(power->base + (reg))
110 #define PM_WRITE(reg, val) writel(PM_PASSWORD | (val), power->base + (reg))
129 #define ASB_READ(reg) readl(power->asb + (reg))
130 #define ASB_WRITE(reg, val) writel(PM_PASSWORD | (val), power->asb + (reg))
134 struct bcm2835_power *power; member
151 static int bcm2835_asb_enable(struct bcm2835_power *power, u32 reg) in bcm2835_asb_enable() argument
171 static int bcm2835_asb_disable(struct bcm2835_power *power, u32 reg) in bcm2835_asb_disable() argument
193 struct bcm2835_power *power = pd->power; in bcm2835_power_power_off() local
209 struct bcm2835_power *power = pd->power; in bcm2835_power_power_on() local
210 struct device *dev = power->dev; in bcm2835_power_power_on()
[all …]
/drivers/soc/bcm/bcm63xx/
Dbcm63xx-power.c21 struct bcm63xx_power *power; member
41 struct bcm63xx_power *power = pmd->power; in bcm63xx_power_get_state() local
48 *is_on = !(__raw_readl(power->base) & pmd->mask); in bcm63xx_power_get_state()
55 struct bcm63xx_power *power = pmd->power; in bcm63xx_power_set_state() local
62 spin_lock_irqsave(&power->lock, flags); in bcm63xx_power_set_state()
63 val = __raw_readl(power->base); in bcm63xx_power_set_state()
68 __raw_writel(val, power->base); in bcm63xx_power_set_state()
69 spin_unlock_irqrestore(&power->lock, flags); in bcm63xx_power_set_state()
96 struct bcm63xx_power *power; in bcm63xx_power_probe() local
101 power = devm_kzalloc(dev, sizeof(*power), GFP_KERNEL); in bcm63xx_power_probe()
[all …]
/drivers/usb/musb/
Dmusb_virthub.c25 u8 power; in musb_host_finish_resume() local
31 power = musb_readb(musb->mregs, MUSB_POWER); in musb_host_finish_resume()
32 power &= ~MUSB_POWER_RESUME; in musb_host_finish_resume()
33 musb_dbg(musb, "root port resume stopped, power %02x", power); in musb_host_finish_resume()
34 musb_writeb(musb->mregs, MUSB_POWER, power); in musb_host_finish_resume()
54 u8 power; in musb_port_suspend() local
65 power = musb_readb(mbase, MUSB_POWER); in musb_port_suspend()
69 if (power & MUSB_POWER_RESUME) in musb_port_suspend()
72 if (!(power & MUSB_POWER_SUSPENDM)) { in musb_port_suspend()
73 power |= MUSB_POWER_SUSPENDM; in musb_port_suspend()
[all …]
/drivers/video/backlight/
Dlms501kf03.c23 unsigned int power; member
207 static int lms501kf03_power_is_on(int power) in lms501kf03_power_is_on() argument
209 return (power) <= FB_BLANK_NORMAL; in lms501kf03_power_is_on()
270 static int lms501kf03_power(struct lms501kf03 *lcd, int power) in lms501kf03_power() argument
274 if (lms501kf03_power_is_on(power) && in lms501kf03_power()
275 !lms501kf03_power_is_on(lcd->power)) in lms501kf03_power()
277 else if (!lms501kf03_power_is_on(power) && in lms501kf03_power()
278 lms501kf03_power_is_on(lcd->power)) in lms501kf03_power()
282 lcd->power = power; in lms501kf03_power()
291 return lcd->power; in lms501kf03_get_power()
[all …]
Dams369fg06.c35 unsigned int power; member
301 static int ams369fg06_power_is_on(int power) in ams369fg06_power_is_on() argument
303 return power <= FB_BLANK_NORMAL; in ams369fg06_power_is_on()
371 static int ams369fg06_power(struct ams369fg06 *lcd, int power) in ams369fg06_power() argument
375 if (ams369fg06_power_is_on(power) && in ams369fg06_power()
376 !ams369fg06_power_is_on(lcd->power)) in ams369fg06_power()
378 else if (!ams369fg06_power_is_on(power) && in ams369fg06_power()
379 ams369fg06_power_is_on(lcd->power)) in ams369fg06_power()
383 lcd->power = power; in ams369fg06_power()
392 return lcd->power; in ams369fg06_get_power()
[all …]
Dili9320.c126 static int ili9320_power(struct ili9320 *lcd, int power) in ili9320_power() argument
130 dev_dbg(lcd->dev, "power %d => %d\n", lcd->power, power); in ili9320_power()
132 if (POWER_IS_ON(power) && !POWER_IS_ON(lcd->power)) in ili9320_power()
134 else if (!POWER_IS_ON(power) && POWER_IS_ON(lcd->power)) in ili9320_power()
138 lcd->power = power; in ili9320_power()
140 dev_warn(lcd->dev, "failed to set power mode %d\n", power); in ili9320_power()
150 static int ili9320_set_power(struct lcd_device *ld, int power) in ili9320_set_power() argument
154 return ili9320_power(lcd, power); in ili9320_set_power()
161 return lcd->power; in ili9320_get_power()
226 ili->power = FB_BLANK_POWERDOWN; in ili9320_probe_spi()
[all …]
/drivers/staging/vt6656/
Drf.c592 static int vnt_rf_set_txpower(struct vnt_private *priv, u8 power, in vnt_rf_set_txpower() argument
598 power += vnt_rf_addpower(priv); in vnt_rf_set_txpower()
599 if (power > VNT_RF_MAX_POWER) in vnt_rf_set_txpower()
600 power = VNT_RF_MAX_POWER; in vnt_rf_set_txpower()
602 if (priv->power == power) in vnt_rf_set_txpower()
605 priv->power = power; in vnt_rf_set_txpower()
609 power_setting = 0x0404090 | (power << 12); in vnt_rf_set_txpower()
622 power_setting = 0x0404090 | (power << 12); in vnt_rf_set_txpower()
657 power_setting = 0x080c0b00 | (power << 12); in vnt_rf_set_txpower()
663 power_setting = ((0x3f - power) << 20) | (0x17 << 8); in vnt_rf_set_txpower()
[all …]
/drivers/acpi/
Dprocessor_idle.c125 struct acpi_processor_power *pwr = &pr->power; in lapic_timer_check_state()
142 pr->power.timer_broadcast_on_state = state; in lapic_timer_check_state()
149 if (pr->power.timer_broadcast_on_state < INT_MAX) in __lapic_timer_propagate_broadcast()
165 return cx - pr->power.states >= pr->power.timer_broadcast_on_state; in lapic_timer_needs_broadcast()
215 pr->power.states[ACPI_STATE_C2].type = ACPI_STATE_C2; in acpi_processor_get_power_info_fadt()
216 pr->power.states[ACPI_STATE_C3].type = ACPI_STATE_C3; in acpi_processor_get_power_info_fadt()
229 pr->power.states[ACPI_STATE_C2].address = pr->pblk + 4; in acpi_processor_get_power_info_fadt()
230 pr->power.states[ACPI_STATE_C3].address = pr->pblk + 5; in acpi_processor_get_power_info_fadt()
233 pr->power.states[ACPI_STATE_C2].latency = acpi_gbl_FADT.c2_latency; in acpi_processor_get_power_info_fadt()
234 pr->power.states[ACPI_STATE_C3].latency = acpi_gbl_FADT.c3_latency; in acpi_processor_get_power_info_fadt()
[all …]
Ddevice_pm.c86 device->parent->power.state : ACPI_STATE_D0; in acpi_device_get_power()
94 if (device->power.flags.power_resources) { in acpi_device_get_power()
99 if (device->power.flags.explicit_get) { in acpi_device_get_power()
125 if (!device->power.flags.ignore_parent && device->parent in acpi_device_get_power()
126 && device->parent->power.state == ACPI_STATE_UNKNOWN in acpi_device_get_power()
128 device->parent->power.state = ACPI_STATE_D0; in acpi_device_get_power()
141 if (adev->power.states[state].flags.explicit_set) { in acpi_dev_pm_explicit_set()
170 acpi_power_state_string(device->power.state), in acpi_device_set_power()
176 if (state > ACPI_STATE_D0 && state == device->power.state) { in acpi_device_set_power()
189 if (!device->power.states[ACPI_STATE_D3_COLD].flags.valid) in acpi_device_set_power()
[all …]
/drivers/hwmon/occ/
Dcommon.c427 struct power_sensor_1 *power; in occ_show_power_1() local
436 power = ((struct power_sensor_1 *)sensors->power.data) + sattr->index; in occ_show_power_1()
440 val = get_unaligned_be16(&power->sensor_id); in occ_show_power_1()
443 val = get_unaligned_be32(&power->accumulator) / in occ_show_power_1()
444 get_unaligned_be32(&power->update_tag); in occ_show_power_1()
448 val = (u64)get_unaligned_be32(&power->update_tag) * in occ_show_power_1()
452 val = get_unaligned_be16(&power->value) * 1000000ULL; in occ_show_power_1()
474 struct power_sensor_2 *power; in occ_show_power_2() local
483 power = ((struct power_sensor_2 *)sensors->power.data) + sattr->index; in occ_show_power_2()
488 get_unaligned_be32(&power->sensor_id), in occ_show_power_2()
[all …]
/drivers/power/reset/
DKconfig3 bool "Board level reset or power off"
6 or shut it down, by manipulating the main power supply on the board.
8 Say Y here to enable board reset and power off
13 bool "ams AS3722 power-off driver"
16 This driver supports turning off board via a ams AS3722 power-off.
43 tristate "Actions Semi ATC260x PMIC power-off driver"
46 This driver provides power-off and restart support for a system
79 bool "Cortina Gemini power-off driver"
88 bool "GPIO power-off driver"
92 If your board needs a GPIO high/low to power down, say Y and
[all …]
/drivers/powercap/
DKconfig3 # Generic power capping sysfs interface configuration
9 The power capping sysfs interface allows kernel subsystems to expose power
12 power zones representing parts of the system that can be subject to power
30 technology via MSR interface, which allows power limits to be enforced
45 CPUs for power capping. Idle period can be injected
52 This enables support for the power capping for the dynamic
53 thermal power management userspace engine.
56 bool "Add CPU power capping based on the energy model"
59 This enables support for CPU power limitation based on
/drivers/thermal/
Ddevfreq_cooling.c177 u32 *power) in devfreq_cooling_get_requested_power() argument
200 res = dfc->power_ops->get_real_power(df, power, freq, voltage); in devfreq_cooling_get_requested_power()
203 dfc->res_util = dfc->em_pd->table[state].power; in devfreq_cooling_get_requested_power()
206 if (*power > 1) in devfreq_cooling_get_requested_power()
207 dfc->res_util /= *power; in devfreq_cooling_get_requested_power()
222 *power = dfc->em_pd->table[perf_idx].power; in devfreq_cooling_get_requested_power()
223 *power *= status.busy_time; in devfreq_cooling_get_requested_power()
224 *power >>= 10; in devfreq_cooling_get_requested_power()
227 trace_thermal_power_devfreq_get_power(cdev, &status, freq, *power); in devfreq_cooling_get_requested_power()
237 unsigned long state, u32 *power) in devfreq_cooling_state2power() argument
[all …]

12345678910>>...22