Home
last modified time | relevance | path

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

12345678910>>...16

/drivers/base/power/
Druntime.c72 delta = now - dev->power.accounting_timestamp; in update_pm_runtime_accounting()
74 dev->power.accounting_timestamp = now; in update_pm_runtime_accounting()
76 if (dev->power.disable_depth > 0) in update_pm_runtime_accounting()
79 if (dev->power.runtime_status == RPM_SUSPENDED) in update_pm_runtime_accounting()
80 dev->power.suspended_jiffies += delta; in update_pm_runtime_accounting()
82 dev->power.active_jiffies += delta; in update_pm_runtime_accounting()
88 dev->power.runtime_status = status; in __update_runtime_status()
97 if (dev->power.timer_expires > 0) { in pm_runtime_deactivate_timer()
98 del_timer(&dev->power.suspend_timer); in pm_runtime_deactivate_timer()
99 dev->power.timer_expires = 0; in pm_runtime_deactivate_timer()
[all …]
Dsysfs.c106 dev->power.runtime_auto ? ctrl_auto : ctrl_on); in control_show()
135 spin_lock_irq(&dev->power.lock); in rtpm_active_time_show()
137 ret = sprintf(buf, "%i\n", jiffies_to_msecs(dev->power.active_jiffies)); in rtpm_active_time_show()
138 spin_unlock_irq(&dev->power.lock); in rtpm_active_time_show()
148 spin_lock_irq(&dev->power.lock); in rtpm_suspended_time_show()
151 jiffies_to_msecs(dev->power.suspended_jiffies)); in rtpm_suspended_time_show()
152 spin_unlock_irq(&dev->power.lock); in rtpm_suspended_time_show()
163 if (dev->power.runtime_error) { in rtpm_status_show()
165 } else if (dev->power.disable_depth) { in rtpm_status_show()
168 switch (dev->power.runtime_status) { in rtpm_status_show()
[all …]
Dqos.c63 struct dev_pm_qos *qos = dev->power.qos; in __dev_pm_qos_flags()
91 spin_lock_irqsave(&dev->power.lock, irqflags); in dev_pm_qos_flags()
93 spin_unlock_irqrestore(&dev->power.lock, irqflags); in dev_pm_qos_flags()
107 return IS_ERR_OR_NULL(dev->power.qos) ? in __dev_pm_qos_read_value()
108 0 : pm_qos_read_value(&dev->power.qos->resume_latency); in __dev_pm_qos_read_value()
120 spin_lock_irqsave(&dev->power.lock, flags); in dev_pm_qos_read_value()
122 spin_unlock_irqrestore(&dev->power.lock, flags); in dev_pm_qos_read_value()
140 struct dev_pm_qos *qos = req->dev->power.qos; in apply_constraint()
159 req->dev->power.set_latency_tolerance(req->dev, value); in apply_constraint()
214 spin_lock_irq(&dev->power.lock); in dev_pm_qos_constraints_allocate()
[all …]
Dmain.c94 dev->power.is_prepared = false; in device_pm_sleep_init()
95 dev->power.is_suspended = false; in device_pm_sleep_init()
96 dev->power.is_noirq_suspended = false; in device_pm_sleep_init()
97 dev->power.is_late_suspended = false; in device_pm_sleep_init()
98 init_completion(&dev->power.completion); in device_pm_sleep_init()
99 complete_all(&dev->power.completion); in device_pm_sleep_init()
100 dev->power.wakeup = NULL; in device_pm_sleep_init()
101 INIT_LIST_HEAD(&dev->power.entry); in device_pm_sleep_init()
129 if (dev->parent && dev->parent->power.is_prepared) in device_pm_add()
132 list_add_tail(&dev->power.entry, &dpm_list); in device_pm_add()
[all …]
Dwakeup.c206 spin_lock_irq(&dev->power.lock); in device_wakeup_attach()
207 if (dev->power.wakeup) { in device_wakeup_attach()
208 spin_unlock_irq(&dev->power.lock); in device_wakeup_attach()
211 dev->power.wakeup = ws; in device_wakeup_attach()
212 spin_unlock_irq(&dev->power.lock); in device_wakeup_attach()
227 if (!dev || !dev->power.can_wakeup) in device_wakeup_enable()
252 spin_lock_irq(&dev->power.lock); in device_wakeup_detach()
253 ws = dev->power.wakeup; in device_wakeup_detach()
254 dev->power.wakeup = NULL; in device_wakeup_detach()
255 spin_unlock_irq(&dev->power.lock); in device_wakeup_detach()
[all …]
Dcommon.c33 spin_lock_irq(&dev->power.lock); in dev_pm_get_subsys_data()
35 if (dev->power.subsys_data) { in dev_pm_get_subsys_data()
36 dev->power.subsys_data->refcount++; in dev_pm_get_subsys_data()
40 dev->power.subsys_data = psd; in dev_pm_get_subsys_data()
45 spin_unlock_irq(&dev->power.lock); in dev_pm_get_subsys_data()
67 spin_lock_irq(&dev->power.lock); in dev_pm_put_subsys_data()
74 dev->power.subsys_data = NULL; in dev_pm_put_subsys_data()
81 spin_unlock_irq(&dev->power.lock); in dev_pm_put_subsys_data()
/drivers/staging/nvec/
Dnvec_power.c91 struct nvec_power *power = in nvec_power_notifier() local
99 if (power->on != res->plu) { in nvec_power_notifier()
100 power->on = res->plu; in nvec_power_notifier()
113 static void get_bat_mfg_data(struct nvec_power *power) in get_bat_mfg_data() argument
120 nvec_write_async(power->nvec, buf, 2); in get_bat_mfg_data()
127 struct nvec_power *power = in nvec_power_bat_notifier() local
138 if (power->bat_present == 0) { in nvec_power_bat_notifier()
140 get_bat_mfg_data(power); in nvec_power_bat_notifier()
143 power->bat_present = 1; in nvec_power_bat_notifier()
147 power->bat_status = in nvec_power_bat_notifier()
[all …]
/drivers/usb/musb/
Dmusb_virthub.c50 u8 power; in musb_host_finish_resume() local
56 power = musb_readb(musb->mregs, MUSB_POWER); in musb_host_finish_resume()
57 power &= ~MUSB_POWER_RESUME; in musb_host_finish_resume()
59 power); in musb_host_finish_resume()
60 musb_writeb(musb->mregs, MUSB_POWER, power); in musb_host_finish_resume()
80 u8 power; in musb_port_suspend() local
91 power = musb_readb(mbase, MUSB_POWER); in musb_port_suspend()
95 power &= ~MUSB_POWER_RESUME; in musb_port_suspend()
96 power |= MUSB_POWER_SUSPENDM; in musb_port_suspend()
97 musb_writeb(mbase, MUSB_POWER, power); in musb_port_suspend()
[all …]
/drivers/staging/vt6656/
Drf.c626 u8 power = priv->cck_pwr; in vnt_rf_setpower() local
639 power = priv->cck_pwr_tbl[channel]; in vnt_rf_setpower()
650 power = priv->ofdm_a_pwr_tbl[channel-15]; in vnt_rf_setpower()
652 power = priv->ofdm_pwr_tbl[channel-1]; in vnt_rf_setpower()
656 return vnt_rf_set_txpower(priv, power, rate); in vnt_rf_setpower()
686 int vnt_rf_set_txpower(struct vnt_private *priv, u8 power, u32 rate) in vnt_rf_set_txpower() argument
691 power += vnt_rf_addpower(priv); in vnt_rf_set_txpower()
692 if (power > VNT_RF_MAX_POWER) in vnt_rf_set_txpower()
693 power = VNT_RF_MAX_POWER; in vnt_rf_set_txpower()
695 if (priv->power == power) in vnt_rf_set_txpower()
[all …]
/drivers/power/
Dwm831x_power.c496 struct wm831x_power *power; in wm831x_power_probe() local
502 power = kzalloc(sizeof(struct wm831x_power), GFP_KERNEL); in wm831x_power_probe()
503 if (power == NULL) in wm831x_power_probe()
506 power->wm831x = wm831x; in wm831x_power_probe()
507 platform_set_drvdata(pdev, power); in wm831x_power_probe()
509 usb = &power->usb; in wm831x_power_probe()
510 battery = &power->battery; in wm831x_power_probe()
511 wall = &power->wall; in wm831x_power_probe()
514 snprintf(power->wall_name, sizeof(power->wall_name), in wm831x_power_probe()
516 snprintf(power->battery_name, sizeof(power->wall_name), in wm831x_power_probe()
[all …]
Dwm8350_power.c47 if (!wm8350->power.rev_g_coeff) in wm8350_charge_time_min()
190 struct wm8350_power *power = &wm8350->power; in wm8350_charger_handler() local
191 struct wm8350_charger_policy *policy = power->policy; in wm8350_charger_handler()
199 power_supply_changed(&power->battery); in wm8350_charger_handler()
206 power_supply_changed(&power->battery); in wm8350_charger_handler()
234 power_supply_changed(&power->battery); in wm8350_charger_handler()
235 power_supply_changed(&power->usb); in wm8350_charger_handler()
236 power_supply_changed(&power->ac); in wm8350_charger_handler()
448 struct wm8350_power *power = &wm8350->power; in wm8350_power_probe() local
449 struct wm8350_charger_policy *policy = power->policy; in wm8350_power_probe()
[all …]
/drivers/video/backlight/
Dlms501kf03.c28 unsigned int power; member
220 static int lms501kf03_power_is_on(int power) in lms501kf03_power_is_on() argument
222 return (power) <= FB_BLANK_NORMAL; in lms501kf03_power_is_on()
283 static int lms501kf03_power(struct lms501kf03 *lcd, int power) in lms501kf03_power() argument
287 if (lms501kf03_power_is_on(power) && in lms501kf03_power()
288 !lms501kf03_power_is_on(lcd->power)) in lms501kf03_power()
290 else if (!lms501kf03_power_is_on(power) && in lms501kf03_power()
291 lms501kf03_power_is_on(lcd->power)) in lms501kf03_power()
295 lcd->power = power; in lms501kf03_power()
304 return lcd->power; in lms501kf03_get_power()
[all …]
Dams369fg06.c40 unsigned int power; member
306 static int ams369fg06_power_is_on(int power) in ams369fg06_power_is_on() argument
308 return power <= FB_BLANK_NORMAL; in ams369fg06_power_is_on()
376 static int ams369fg06_power(struct ams369fg06 *lcd, int power) in ams369fg06_power() argument
380 if (ams369fg06_power_is_on(power) && in ams369fg06_power()
381 !ams369fg06_power_is_on(lcd->power)) in ams369fg06_power()
383 else if (!ams369fg06_power_is_on(power) && in ams369fg06_power()
384 ams369fg06_power_is_on(lcd->power)) in ams369fg06_power()
388 lcd->power = power; in ams369fg06_power()
397 return lcd->power; in ams369fg06_get_power()
[all …]
Dili9320.c129 static int ili9320_power(struct ili9320 *lcd, int power) in ili9320_power() argument
133 dev_dbg(lcd->dev, "power %d => %d\n", lcd->power, power); in ili9320_power()
135 if (POWER_IS_ON(power) && !POWER_IS_ON(lcd->power)) in ili9320_power()
137 else if (!POWER_IS_ON(power) && POWER_IS_ON(lcd->power)) in ili9320_power()
141 lcd->power = power; in ili9320_power()
143 dev_warn(lcd->dev, "failed to set power mode %d\n", power); in ili9320_power()
153 static int ili9320_set_power(struct lcd_device *ld, int power) in ili9320_set_power() argument
157 return ili9320_power(lcd, power); in ili9320_set_power()
164 return lcd->power; in ili9320_get_power()
229 ili->power = FB_BLANK_POWERDOWN; in ili9320_probe_spi()
[all …]
Dld9040.c41 unsigned int power; member
551 static int ld9040_power_is_on(int power) in ld9040_power_is_on() argument
553 return power <= FB_BLANK_NORMAL; in ld9040_power_is_on()
610 static int ld9040_power(struct ld9040 *lcd, int power) in ld9040_power() argument
614 if (ld9040_power_is_on(power) && !ld9040_power_is_on(lcd->power)) in ld9040_power()
616 else if (!ld9040_power_is_on(power) && ld9040_power_is_on(lcd->power)) in ld9040_power()
620 lcd->power = power; in ld9040_power()
625 static int ld9040_set_power(struct lcd_device *ld, int power) in ld9040_set_power() argument
629 if (power != FB_BLANK_UNBLANK && power != FB_BLANK_POWERDOWN && in ld9040_set_power()
630 power != FB_BLANK_NORMAL) { in ld9040_set_power()
[all …]
Dltv350qv.c26 int power; member
195 static int ltv350qv_power(struct ltv350qv *lcd, int power) in ltv350qv_power() argument
199 if (POWER_IS_ON(power) && !POWER_IS_ON(lcd->power)) in ltv350qv_power()
201 else if (!POWER_IS_ON(power) && POWER_IS_ON(lcd->power)) in ltv350qv_power()
205 lcd->power = power; in ltv350qv_power()
210 static int ltv350qv_set_power(struct lcd_device *ld, int power) in ltv350qv_set_power() argument
214 return ltv350qv_power(lcd, power); in ltv350qv_set_power()
221 return lcd->power; in ltv350qv_get_power()
240 lcd->power = FB_BLANK_POWERDOWN; in ltv350qv_probe()
Ds6e63m0.c40 unsigned int power; member
493 static int s6e63m0_power_is_on(int power) in s6e63m0_power_is_on() argument
495 return power <= FB_BLANK_NORMAL; in s6e63m0_power_is_on()
565 static int s6e63m0_power(struct s6e63m0 *lcd, int power) in s6e63m0_power() argument
569 if (s6e63m0_power_is_on(power) && !s6e63m0_power_is_on(lcd->power)) in s6e63m0_power()
571 else if (!s6e63m0_power_is_on(power) && s6e63m0_power_is_on(lcd->power)) in s6e63m0_power()
575 lcd->power = power; in s6e63m0_power()
580 static int s6e63m0_set_power(struct lcd_device *ld, int power) in s6e63m0_set_power() argument
584 if (power != FB_BLANK_UNBLANK && power != FB_BLANK_POWERDOWN && in s6e63m0_set_power()
585 power != FB_BLANK_NORMAL) { in s6e63m0_set_power()
[all …]
Dplatform_lcd.c29 unsigned int power; member
42 return plcd->power; in platform_lcd_get_power()
45 static int platform_lcd_set_power(struct lcd_device *lcd, int power) in platform_lcd_set_power() argument
50 if (power == FB_BLANK_POWERDOWN || plcd->suspended) in platform_lcd_set_power()
54 plcd->power = power; in platform_lcd_set_power()
121 platform_lcd_set_power(plcd->lcd, plcd->power); in platform_lcd_suspend()
131 platform_lcd_set_power(plcd->lcd, plcd->power); in platform_lcd_resume()
/drivers/acpi/
Dprocessor_idle.c137 struct acpi_processor_power *pwr = &pr->power; in lapic_timer_check_state()
154 pr->power.timer_broadcast_on_state = state; in lapic_timer_check_state()
162 reason = pr->power.timer_broadcast_on_state < INT_MAX ? in __lapic_timer_propagate_broadcast()
179 int state = cx - pr->power.states; in lapic_timer_state_broadcast()
181 if (state >= pr->power.timer_broadcast_on_state) { in lapic_timer_state_broadcast()
270 pr->power.states[ACPI_STATE_C2].type = ACPI_STATE_C2; in acpi_processor_get_power_info_fadt()
271 pr->power.states[ACPI_STATE_C3].type = ACPI_STATE_C3; in acpi_processor_get_power_info_fadt()
284 pr->power.states[ACPI_STATE_C2].address = pr->pblk + 4; in acpi_processor_get_power_info_fadt()
285 pr->power.states[ACPI_STATE_C3].address = pr->pblk + 5; in acpi_processor_get_power_info_fadt()
288 pr->power.states[ACPI_STATE_C2].latency = acpi_gbl_FADT.c2_latency; in acpi_processor_get_power_info_fadt()
[all …]
Ddevice_pm.c77 device->parent->power.state : ACPI_STATE_D0; in acpi_device_get_power()
85 if (device->power.flags.power_resources) { in acpi_device_get_power()
90 if (device->power.flags.explicit_get) { in acpi_device_get_power()
119 if (!device->power.flags.ignore_parent && device->parent in acpi_device_get_power()
120 && device->parent->power.state == ACPI_STATE_UNKNOWN in acpi_device_get_power()
122 device->parent->power.state = ACPI_STATE_D0; in acpi_device_get_power()
135 if (adev->power.states[state].flags.explicit_set) { in acpi_dev_pm_explicit_set()
165 if (state == device->power.state) { in acpi_device_set_power()
172 if (!device->power.states[state].flags.valid) { in acpi_device_set_power()
177 if (!device->power.flags.ignore_parent && in acpi_device_set_power()
[all …]
/drivers/video/fbdev/exynos/
Ds6e8ax0.c52 unsigned int power; member
666 static int s6e8ax0_set_power(struct lcd_device *ld, int power) in s6e8ax0_set_power() argument
672 if (power != FB_BLANK_UNBLANK && power != FB_BLANK_POWERDOWN && in s6e8ax0_set_power()
673 power != FB_BLANK_NORMAL) { in s6e8ax0_set_power()
678 if ((power == FB_BLANK_UNBLANK) && ops->set_blank_mode) { in s6e8ax0_set_power()
680 if ((POWER_IS_ON(power) && POWER_IS_OFF(lcd->power)) in s6e8ax0_set_power()
681 || (POWER_IS_ON(power) && POWER_IS_NRM(lcd->power))) { in s6e8ax0_set_power()
682 ret = ops->set_blank_mode(lcd_to_master(lcd), power); in s6e8ax0_set_power()
683 if (!ret && lcd->power != power) in s6e8ax0_set_power()
684 lcd->power = power; in s6e8ax0_set_power()
[all …]
/drivers/power/reset/
DKconfig2 bool "Board level reset or power off"
5 or shut it down, by manipulating the main power supply on the board.
7 Say Y here to enable board reset and power off
12 bool "ams AS3722 power-off driver"
15 This driver supports turning off board via a ams AS3722 power-off.
53 bool "GPIO power-off driver"
57 If your board needs a GPIO high/low to power down, say Y and
69 bool "Hisilicon power-off driver"
75 bool "Qualcomm MSM power-off driver"
81 bool "LTC2952 PowerPath power-off driver"
[all …]
/drivers/pcmcia/
Dpxa2xx_mainstone.c91 unsigned long power = 0; in mst_pcmcia_configure_socket() local
95 case 0: power |= MST_PCMCIA_PWR_VCC_0; break; in mst_pcmcia_configure_socket()
96 case 33: power |= MST_PCMCIA_PWR_VCC_33; break; in mst_pcmcia_configure_socket()
97 case 50: power |= MST_PCMCIA_PWR_VCC_50; break; in mst_pcmcia_configure_socket()
105 case 0: power |= MST_PCMCIA_PWR_VPP_0; break; in mst_pcmcia_configure_socket()
106 case 120: power |= MST_PCMCIA_PWR_VPP_120; break; in mst_pcmcia_configure_socket()
109 power |= MST_PCMCIA_PWR_VPP_VCC; in mst_pcmcia_configure_socket()
118 power |= MST_PCMCIA_RESET; in mst_pcmcia_configure_socket()
121 case 0: MST_PCMCIA0 = power; break; in mst_pcmcia_configure_socket()
122 case 1: MST_PCMCIA1 = power; break; in mst_pcmcia_configure_socket()
Dpxa2xx_trizeps4.c30 extern void board_pcmcia_power(int power);
99 unsigned short power = 0; in trizeps_pcmcia_configure_socket() local
103 case 0: power &= 0xfc; break; in trizeps_pcmcia_configure_socket()
104 case 33: power |= ConXS_BCR_S0_VCC_3V3; break; in trizeps_pcmcia_configure_socket()
114 case 0: power &= 0xf3; break; in trizeps_pcmcia_configure_socket()
115 case 33: power |= ConXS_BCR_S0_VPP_3V3; break; in trizeps_pcmcia_configure_socket()
128 board_pcmcia_power(power); in trizeps_pcmcia_configure_socket()
/drivers/input/misc/
Dgpio_event.c105 if (ip->info->power) in gpio_event_suspend()
106 ip->info->power(ip->info, 0); in gpio_event_suspend()
111 if (ip->info->power) in gpio_event_resume()
112 ip->info->power(ip->info, 1); in gpio_event_resume()
166 if (event_info->power) in gpio_event_probe()
167 ip->info->power(ip->info, 1); in gpio_event_probe()
188 if (event_info->power) in gpio_event_probe()
189 ip->info->power(ip->info, 0); in gpio_event_probe()
208 if (ip->info->power) in gpio_event_remove()
209 ip->info->power(ip->info, 0); in gpio_event_remove()

12345678910>>...16