/linux/drivers/input/touchscreen/ |
H A D | penmount.c | 50 struct pm { struct 59 void (*parse_packet)(struct pm *); argument 66 static void pm_mtevent(struct pm *pm, struct input_dev *input) in pm_mtevent() argument 70 for (i = 0; i < pm->maxcontacts; ++i) { in pm_mtevent() 73 pm->slots[i].active); in pm_mtevent() 74 if (pm->slots[i].active) { in pm_mtevent() 75 input_event(input, EV_ABS, ABS_MT_POSITION_X, pm->slots[i].x); in pm_mtevent() 76 input_event(input, EV_ABS, ABS_MT_POSITION_Y, pm->slots[i].y); in pm_mtevent() 99 static void pm_parse_9000(struct pm *pm) in pm_parse_9000() argument 101 struct input_dev *dev = pm->dev; in pm_parse_9000() [all …]
|
/linux/drivers/base/power/ |
H A D | generic_ops.c | 3 * drivers/base/power/generic_ops.c - Generic PM callbacks for subsystems 7 #include <linux/pm.h> 16 * If PM operations are defined for the @dev's driver and they include 22 const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL; in pm_generic_runtime_suspend() local 25 ret = pm && pm->runtime_suspend ? pm->runtime_suspend(dev) : 0; in pm_generic_runtime_suspend() 35 * If PM operations are defined for the @dev's driver and they include 41 const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL; in pm_generic_runtime_resume() local 44 ret = pm && pm->runtime_resume ? pm->runtime_resume(dev) : 0; in pm_generic_runtime_resume() 63 if (drv && drv->pm && drv->pm->prepare) in pm_generic_prepare() 64 ret = drv->pm->prepare(dev); in pm_generic_prepare() [all …]
|
H A D | common.c | 84 * dev_pm_domain_attach - Attach a device to its PM domain. 88 * The @dev may only be attached to a single PM domain. By iterating through 89 * the available alternatives we try to find a valid PM domain for the device. 95 * power management through PM domains. 100 * Returns 0 on successfully attached PM domain, or when it is found that the 101 * device doesn't need a PM domain, else a negative error code. 122 * dev_pm_domain_attach_by_id - Associate a device with one of its PM domains. 123 * @dev: The device used to lookup the PM domain. 124 * @index: The index of the PM domain. 126 * As @dev may only be attached to a single PM domain, the backend PM domain [all …]
|
/linux/drivers/gpu/drm/radeon/ |
H A D | radeon_pm.c | 64 for (i = 0; i < rdev->pm.num_power_states; i++) { in radeon_pm_get_type_index() 65 if (rdev->pm.power_state[i].type == ps_type) { in radeon_pm_get_type_index() 72 return rdev->pm.default_power_state_index; in radeon_pm_get_type_index() 77 if ((rdev->pm.pm_method == PM_METHOD_DPM) && rdev->pm.dpm_enabled) { in radeon_pm_acpi_event_handler() 78 mutex_lock(&rdev->pm.mutex); in radeon_pm_acpi_event_handler() 80 rdev->pm.dpm.ac_power = true; in radeon_pm_acpi_event_handler() 82 rdev->pm.dpm.ac_power = false; in radeon_pm_acpi_event_handler() 85 radeon_dpm_enable_bapm(rdev, rdev->pm.dpm.ac_power); in radeon_pm_acpi_event_handler() 87 mutex_unlock(&rdev->pm.mutex); in radeon_pm_acpi_event_handler() 88 } else if (rdev->pm.pm_method == PM_METHOD_PROFILE) { in radeon_pm_acpi_event_handler() [all …]
|
H A D | r600_dpm.c | 145 if (rps == rdev->pm.dpm.current_ps) in r600_dpm_print_ps_status() 147 if (rps == rdev->pm.dpm.requested_ps) in r600_dpm_print_ps_status() 149 if (rps == rdev->pm.dpm.boot_ps) in r600_dpm_print_ps_status() 756 rdev->pm.dpm.thermal.min_temp = low_temp; in r600_set_thermal_temperature_range() 757 rdev->pm.dpm.thermal.max_temp = high_temp; in r600_set_thermal_temperature_range() 790 r600_is_internal_thermal_sensor(rdev->pm.int_thermal_type)) { in r600_dpm_late_enable() 856 rdev->pm.dpm.platform_caps = le32_to_cpu(power_info->pplib.ulPlatformCaps); in r600_get_platform_caps() 857 rdev->pm.dpm.backbias_response_time = le16_to_cpu(power_info->pplib.usBackbiasTime); in r600_get_platform_caps() 858 rdev->pm.dpm.voltage_response_time = le16_to_cpu(power_info->pplib.usVoltageTime); in r600_get_platform_caps() 893 rdev->pm.dpm.fan.t_hyst = fan_info->fan.ucTHyst; in r600_parse_extended_power_table() [all …]
|
H A D | r600.c | 366 rdev->pm.dynpm_can_upclock = true; in r600_pm_get_dynpm_state() 367 rdev->pm.dynpm_can_downclock = true; in r600_pm_get_dynpm_state() 373 if (rdev->pm.num_power_states > 2) in r600_pm_get_dynpm_state() 376 switch (rdev->pm.dynpm_planned_action) { in r600_pm_get_dynpm_state() 378 rdev->pm.requested_power_state_index = min_power_state_index; in r600_pm_get_dynpm_state() 379 rdev->pm.requested_clock_mode_index = 0; in r600_pm_get_dynpm_state() 380 rdev->pm.dynpm_can_downclock = false; in r600_pm_get_dynpm_state() 383 if (rdev->pm.current_power_state_index == min_power_state_index) { in r600_pm_get_dynpm_state() 384 rdev->pm.requested_power_state_index = rdev->pm.current_power_state_index; in r600_pm_get_dynpm_state() 385 rdev->pm.dynpm_can_downclock = false; in r600_pm_get_dynpm_state() [all …]
|
/linux/drivers/input/misc/ |
H A D | powermate.c | 88 struct powermate_device *pm = urb->context; in powermate_irq() local 89 struct device *dev = &pm->intf->dev; in powermate_irq() 110 input_report_key(pm->input, BTN_0, pm->data[0] & 0x01); in powermate_irq() 111 input_report_rel(pm->input, REL_DIAL, pm->data[1]); in powermate_irq() 112 input_sync(pm->input); in powermate_irq() 121 /* Decide if we need to issue a control message and do so. Must be called with pm->lock taken */ 122 static void powermate_sync_state(struct powermate_device *pm) in powermate_sync_state() argument 124 if (pm->requires_update == 0) in powermate_sync_state() 126 if (pm->config->status == -EINPROGRESS) in powermate_sync_state() 129 if (pm->requires_update & UPDATE_PULSE_ASLEEP){ in powermate_sync_state() [all …]
|
/linux/drivers/mfd/ |
H A D | bcm2835-pm.c | 3 * PM MFD driver for Broadcom BCM2835 5 * This driver binds to the PM block and creates the MFD device for 11 #include <linux/mfd/bcm2835-pm.h> 29 struct bcm2835_pm *pm) in bcm2835_pm_get_pdata() argument 31 if (of_property_present(pm->dev->of_node, "reg-names")) { in bcm2835_pm_get_pdata() 34 pm->base = devm_platform_ioremap_resource_byname(pdev, "pm"); in bcm2835_pm_get_pdata() 35 if (IS_ERR(pm->base)) in bcm2835_pm_get_pdata() 36 return PTR_ERR(pm->base); in bcm2835_pm_get_pdata() 40 pm->asb = devm_ioremap_resource(&pdev->dev, res); in bcm2835_pm_get_pdata() 41 if (IS_ERR(pm->asb)) in bcm2835_pm_get_pdata() [all …]
|
/linux/include/linux/ |
H A D | pm_runtime.h | 13 #include <linux/pm.h> 17 /* Runtime PM flag argument bits */ 26 * Use this for defining a set of PM operations to be used in all situations 27 * (system suspend, hibernation or runtime PM). 30 * macro, which uses the provided callbacks for both runtime PM and system 102 * pm_suspend_ignore_children - Set runtime PM behavior regarding children. 107 * the runtime PM framework going forward if @enable is %true, or they will 116 * pm_runtime_get_noresume - Bump up runtime PM usage counter of a device. 125 * pm_runtime_put_noidle - Drop runtime PM usage counter of a device. 128 * Decrement the runtime PM usage counter of @dev unless it is 0 already. [all …]
|
/linux/net/mptcp/ |
H A D | pm.c | 140 lockdep_assert_held(&msk->pm.lock); in mptcp_lookup_anno_list_by_saddr() 142 list_for_each_entry(entry, &msk->pm.anno_list, list) { in mptcp_lookup_anno_list_by_saddr() 171 spin_lock_bh(&msk->pm.lock); in mptcp_pm_sport_in_anno_list() 172 list_for_each_entry(entry, &msk->pm.anno_list, list) { in mptcp_pm_sport_in_anno_list() 180 spin_unlock_bh(&msk->pm.lock); in mptcp_pm_sport_in_anno_list() 209 spin_unlock_bh(&msk->pm.lock); in mptcp_pm_send_ack() 211 spin_lock_bh(&msk->pm.lock); in mptcp_pm_send_ack() 219 lockdep_assert_held(&msk->pm.lock); in mptcp_pm_addr_send_ack() 294 spin_lock_bh(&msk->pm.lock); in mptcp_pm_add_timer() 307 spin_unlock_bh(&msk->pm.lock); in mptcp_pm_add_timer() [all …]
|
/linux/drivers/scsi/ |
H A D | scsi_pm.c | 11 #include <linux/blk-pm.h> 22 static int do_scsi_suspend(struct device *dev, const struct dev_pm_ops *pm) in do_scsi_suspend() argument 24 return pm && pm->suspend ? pm->suspend(dev) : 0; in do_scsi_suspend() 27 static int do_scsi_freeze(struct device *dev, const struct dev_pm_ops *pm) in do_scsi_freeze() argument 29 return pm && pm->freeze ? pm->freeze(dev) : 0; in do_scsi_freeze() 32 static int do_scsi_poweroff(struct device *dev, const struct dev_pm_ops *pm) in do_scsi_poweroff() argument 34 return pm && pm->poweroff ? pm->poweroff(dev) : 0; in do_scsi_poweroff() 37 static int do_scsi_resume(struct device *dev, const struct dev_pm_ops *pm) in do_scsi_resume() argument 39 return pm && pm->resume ? pm->resume(dev) : 0; in do_scsi_resume() 42 static int do_scsi_thaw(struct device *dev, const struct dev_pm_ops *pm) in do_scsi_thaw() argument [all …]
|
/linux/arch/powerpc/include/asm/ |
H A D | reg_fsl_emb.h | 44 #define PMRN_PMLCA0 0x090 /* PM Local Control A0 */ 45 #define PMRN_PMLCA1 0x091 /* PM Local Control A1 */ 46 #define PMRN_PMLCA2 0x092 /* PM Local Control A2 */ 47 #define PMRN_PMLCA3 0x093 /* PM Local Control A3 */ 48 #define PMRN_PMLCA4 0x094 /* PM Local Control A4 */ 49 #define PMRN_PMLCA5 0x095 /* PM Local Control A5 */ 63 #define PMRN_PMLCB0 0x110 /* PM Local Control B0 */ 64 #define PMRN_PMLCB1 0x111 /* PM Local Control B1 */ 65 #define PMRN_PMLCB2 0x112 /* PM Local Control B2 */ 66 #define PMRN_PMLCB3 0x113 /* PM Local Control B3 */ [all …]
|
/linux/drivers/media/platform/mediatek/vcodec/decoder/ |
H A D | mtk_vcodec_dec_pm.c | 15 int mtk_vcodec_init_dec_clk(struct platform_device *pdev, struct mtk_vcodec_pm *pm) in mtk_vcodec_init_dec_clk() argument 21 dec_clk = &pm->vdec_clk; in mtk_vcodec_init_dec_clk() 22 pm->dev = &pdev->dev; in mtk_vcodec_init_dec_clk() 57 static int mtk_vcodec_dec_pw_on(struct mtk_vcodec_pm *pm) in mtk_vcodec_dec_pw_on() argument 61 ret = pm_runtime_resume_and_get(pm->dev); in mtk_vcodec_dec_pw_on() 63 dev_err(pm->dev, "pm_runtime_resume_and_get fail %d", ret); in mtk_vcodec_dec_pw_on() 68 static void mtk_vcodec_dec_pw_off(struct mtk_vcodec_pm *pm) in mtk_vcodec_dec_pw_off() argument 72 ret = pm_runtime_put(pm->dev); in mtk_vcodec_dec_pw_off() 74 dev_err(pm->dev, "pm_runtime_put fail %d", ret); in mtk_vcodec_dec_pw_off() 77 static void mtk_vcodec_dec_clock_on(struct mtk_vcodec_pm *pm) in mtk_vcodec_dec_clock_on() argument [all …]
|
/linux/tools/power/pm-graph/ |
H A D | Makefile | 36 $(INSTALL) -d $(DESTDIR)$(LIBDIR)/pm-graph 37 $(INSTALL) sleepgraph.py $(DESTDIR)$(LIBDIR)/pm-graph 38 $(INSTALL) bootgraph.py $(DESTDIR)$(LIBDIR)/pm-graph 39 $(INSTALL) -d $(DESTDIR)$(LIBDIR)/pm-graph/config 40 $(INSTALL_DATA) config/cgskip.txt $(DESTDIR)$(LIBDIR)/pm-graph/config 41 $(INSTALL_DATA) config/freeze-callgraph.cfg $(DESTDIR)$(LIBDIR)/pm-graph/config 42 $(INSTALL_DATA) config/freeze.cfg $(DESTDIR)$(LIBDIR)/pm-graph/config 43 $(INSTALL_DATA) config/freeze-dev.cfg $(DESTDIR)$(LIBDIR)/pm-graph/config 44 $(INSTALL_DATA) config/standby-callgraph.cfg $(DESTDIR)$(LIBDIR)/pm-graph/config 45 $(INSTALL_DATA) config/standby.cfg $(DESTDIR)$(LIBDIR)/pm-graph/config [all …]
|
/linux/drivers/media/platform/mediatek/vcodec/encoder/ |
H A D | mtk_vcodec_enc_pm.c | 17 struct mtk_vcodec_pm *pm; in mtk_vcodec_init_enc_clk() local 23 pm = &mtkdev->pm; in mtk_vcodec_init_enc_clk() 24 memset(pm, 0, sizeof(struct mtk_vcodec_pm)); in mtk_vcodec_init_enc_clk() 25 pm->dev = &pdev->dev; in mtk_vcodec_init_enc_clk() 26 enc_clk = &pm->venc_clk; in mtk_vcodec_init_enc_clk() 37 dev_err(pm->dev, "[MTK VCODEC] Failed to get venc clock count"); in mtk_vcodec_init_enc_clk() 46 dev_err(pm->dev, "[MTK VCODEC] venc failed to get clk name %d", i); in mtk_vcodec_init_enc_clk() 52 dev_err(pm->dev, "[MTK VCODEC] venc devm_clk_get (%d)%s fail", i, in mtk_vcodec_init_enc_clk() 61 int mtk_vcodec_enc_pw_on(struct mtk_vcodec_pm *pm) in mtk_vcodec_enc_pw_on() argument 65 ret = pm_runtime_resume_and_get(pm->dev); in mtk_vcodec_enc_pw_on() [all …]
|
/linux/drivers/pmdomain/xilinx/ |
H A D | zynqmp-pm-domains.c | 3 * ZynqMP Generic PM domain support 29 * @node_id: PM node ID corresponding to device inside PM domain 30 * @requested: The PM node mapped to the PM domain has been requested 65 * zynqmp_gpd_power_on() - Power on PM domain 66 * @domain: Generic PM domain 68 * This function is called before devices inside a PM domain are resumed, to 69 * power on PM domain. 84 "failed to set requirement to 0x%x for PM node id %d: %d\n", in zynqmp_gpd_power_on() 89 dev_dbg(&domain->dev, "set requirement to 0x%x for PM node id %d\n", in zynqmp_gpd_power_on() 96 * zynqmp_gpd_power_off() - Power off PM domain [all …]
|
/linux/drivers/crypto/intel/qat/qat_common/ |
H A D | adf_gen4_pm_debugfs.c | 23 PM_INFO_REGSET_ENTRY(pm.status, CPM_PM_STATE), 24 PM_INFO_REGSET_ENTRY(pm.status, PENDING_WP), 25 PM_INFO_REGSET_ENTRY(pm.status, CURRENT_WP), 26 PM_INFO_REGSET_ENTRY(pm.fw_init, IDLE_ENABLE), 27 PM_INFO_REGSET_ENTRY(pm.fw_init, IDLE_FILTER), 28 PM_INFO_REGSET_ENTRY(pm.main, MIN_PWR_ACK), 29 PM_INFO_REGSET_ENTRY(pm.thread, MIN_PWR_ACK_PENDING), 30 PM_INFO_REGSET_ENTRY(pm.main, THR_VALUE), 77 PM_INFO_REGSET_ENTRY32(pm.fw_init, CPM_PM_FW_INIT), 78 PM_INFO_REGSET_ENTRY32(pm.status, CPM_PM_STATUS), [all …]
|
H A D | adf_pm_dbgfs.c | 14 struct adf_pm pm = accel_dev->power_management; in pm_status_read() local 16 if (pm.print_pm_status) in pm_status_read() 17 return pm.print_pm_status(accel_dev, buf, count, pos); in pm_status_read() 29 struct adf_pm *pm = &accel_dev->power_management; in adf_pm_dbgfs_add() local 31 if (!pm->present || !pm->print_pm_status) in adf_pm_dbgfs_add() 34 pm->debugfs_pm_status = debugfs_create_file("pm_status", 0400, in adf_pm_dbgfs_add() 41 struct adf_pm *pm = &accel_dev->power_management; in adf_pm_dbgfs_rm() local 43 if (!pm->present) in adf_pm_dbgfs_rm() 46 debugfs_remove(pm->debugfs_pm_status); in adf_pm_dbgfs_rm() 47 pm->debugfs_pm_status = NULL; in adf_pm_dbgfs_rm()
|
H A D | adf_gen4_pm.c | 26 struct adf_pm *pm = &accel_dev->power_management; in send_host_msg() local 42 pm->host_ack_counter++; in send_host_msg() 44 pm->host_nack_counter++; in send_host_msg() 66 struct adf_pm *pm = &accel_dev->power_management; in pm_bh_handler() local 70 /* PM Idle interrupt */ in pm_bh_handler() 72 pm->idle_irq_counters++; in pm_bh_handler() 79 /* PM throttle interrupt */ in pm_bh_handler() 81 pm->throttle_irq_counters++; in pm_bh_handler() 83 /* PM fw interrupt */ in pm_bh_handler() 85 pm->fw_irq_counters++; in pm_bh_handler() [all …]
|
/linux/Documentation/power/ |
H A D | pm_qos_interface.rst | 2 PM Quality Of Service Interface 9 Two different PM QoS frameworks are available: 11 * The per-device PM QoS framework provides the API to manage the 12 per-device latency constraints and PM QoS flags. 14 The latency unit used in the PM QoS framework is the microsecond (usec). 17 1. PM QoS framework 35 Clients of PM QoS need to save the returned handle for future use in other 36 PM QoS API functions. 61 Only processes can register a PM QoS request. To provide for automatic 65 To register the default PM QoS target for the CPU latency QoS, the process must [all …]
|
/linux/Documentation/arch/arm/omap/ |
H A D | omap_pm.rst | 2 The OMAP PM interface 5 This document describes the temporary OMAP PM interface. Driver 8 Over time, the intention is to merge features from the OMAP PM 9 interface into the Linux PM QoS code. 11 Drivers need to express PM parameters which: 15 - separate the drivers from the underlying PM parameter 16 implementation, whether it is the TI SRF or Linux PM QoS or Linux 19 - specify PM parameters in terms of fundamental units, such as 31 This document proposes the OMAP PM interface, including the following 55 Further documentation for all OMAP PM interface functions can be [all …]
|
/linux/Documentation/devicetree/bindings/power/ |
H A D | power_domain.txt | 1 * Generic PM domains 3 System on chip designs are often divided into multiple PM domains that can be 7 This device tree binding can be used to bind PM domain consumer devices with 8 their PM domains provided by PM domain providers. A PM domain provider can be 9 represented by any node in the device tree and can provide one or more PM 11 phandle arguments (so called PM domain specifiers) of length specified by the 12 #power-domain-cells property in the PM domain provider node. 14 ==PM domain providers== 18 ==PM domain consumers== 21 - power-domains : A list of PM domain specifiers, as defined by bindings of [all …]
|
/linux/net/mac80211/ |
H A D | mesh_ps.c | 62 mps_dbg(sta->sdata, "announcing peer-specific power mode to %pM\n", in mps_qos_null_tx() 126 mps_dbg(sdata, "setting non-peer PM to active for peering\n"); in ieee80211_mps_local_status_update() 129 mps_dbg(sdata, "setting non-peer PM to deep sleep\n"); in ieee80211_mps_local_status_update() 132 mps_dbg(sdata, "setting non-peer PM to user value\n"); in ieee80211_mps_local_status_update() 150 * ieee80211_mps_set_sta_local_pm - set local PM towards a mesh STA 153 * @pm: the power mode to set 157 enum nl80211_mesh_power_mode pm) in ieee80211_mps_set_sta_local_pm() argument 161 if (sta->mesh->local_pm == pm) in ieee80211_mps_set_sta_local_pm() 164 mps_dbg(sdata, "local STA operates in mode %d with %pM\n", in ieee80211_mps_set_sta_local_pm() 165 pm, sta->sta.addr); in ieee80211_mps_set_sta_local_pm() [all …]
|
/linux/Documentation/ABI/testing/ |
H A D | sysfs-class-powercap | 4 Contact: linux-pm@vger.kernel.org 13 Contact: linux-pm@vger.kernel.org 22 Contact: linux-pm@vger.kernel.org 30 Contact: linux-pm@vger.kernel.org 40 Contact: linux-pm@vger.kernel.org 51 Contact: linux-pm@vger.kernel.org 58 Contact: linux-pm@vger.kernel.org 67 Contact: linux-pm@vger.kernel.org 75 Contact: linux-pm@vger.kernel.org 82 Contact: linux-pm@vger.kernel.org [all …]
|
/linux/drivers/net/wireless/mediatek/mt76/mt7615/ |
H A D | sdio_mcu.c | 59 struct mt76_connac_pm *pm = &dev->pm; in __mt7663s_mcu_drv_pmctrl() local 74 pm->stats.last_wake_event = jiffies; in __mt7663s_mcu_drv_pmctrl() 75 pm->stats.doze_time += pm->stats.last_wake_event - in __mt7663s_mcu_drv_pmctrl() 76 pm->stats.last_doze_event; in __mt7663s_mcu_drv_pmctrl() 88 mutex_lock(&dev->pm.mutex); in mt7663s_mcu_drv_pmctrl() 93 mutex_unlock(&dev->pm.mutex); in mt7663s_mcu_drv_pmctrl() 102 struct mt76_connac_pm *pm = &dev->pm; in mt7663s_mcu_fw_pmctrl() local 106 mutex_lock(&pm->mutex); in mt7663s_mcu_fw_pmctrl() 108 if (mt76_connac_skip_fw_pmctrl(mphy, pm)) in mt7663s_mcu_fw_pmctrl() 121 pm->stats.last_doze_event = jiffies; in mt7663s_mcu_fw_pmctrl() [all …]
|