/linux/drivers/devfreq/ |
H A D | devfreq-event.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * devfreq-event: a framework to provide raw data and events of devfreq devices 8 * This driver is based on drivers/devfreq/devfreq.c. 11 #include <linux/devfreq-event.h> 22 /* The list of all devfreq event list */ 29 * devfreq_event_enable_edev() - Enable the devfreq-event dev and increase 30 * the enable_count of devfreq-event dev. 31 * @edev : the devfreq-event device 34 * devfreq-event device. The devfreq-event device should be enabled before 35 * using it by devfreq device. [all …]
|
H A D | exynos-bus.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Generic Exynos Bus frequency driver with DEVFREQ Framework 9 * DEVFREQ framework and is based on drivers/devfreq/exynos/exynos4_bus.c. 13 #include <linux/devfreq.h> 14 #include <linux/devfreq-event.h> 29 struct devfreq *devfreq; member 42 * Control the devfreq-event device to get the current state of bus 49 for (i = 0; i < bus->edev_count; i++) { \ 50 if (!bus->edev[i]) \ 52 ret = devfreq_event_##ops(bus->edev[i]); \ [all …]
|
H A D | governor_passive.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * linux/drivers/devfreq/governor_passive.c 16 #include <linux/devfreq.h> 29 list_for_each_entry(parent_cpu_data, &p_data->cpu_data_list, node) in get_parent_cpu_data() 30 if (parent_cpu_data->first_cpu == cpumask_first(policy->related_cpus)) in get_parent_cpu_data() 40 list_for_each_entry_safe(parent_cpu_data, tmp, &p_data->cpu_data_list, node) { in delete_parent_cpu_data() 41 list_del(&parent_cpu_data->node); in delete_parent_cpu_data() 43 if (parent_cpu_data->opp_table) in delete_parent_cpu_data() 44 dev_pm_opp_put_opp_table(parent_cpu_data->opp_table); in delete_parent_cpu_data() 77 static int get_target_freq_with_cpufreq(struct devfreq *devfreq, in get_target_freq_with_cpufreq() argument [all …]
|
H A D | governor_userspace.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * linux/drivers/devfreq/governor_userspace.c 11 #include <linux/devfreq.h> 22 static int devfreq_userspace_func(struct devfreq *df, unsigned long *freq) in devfreq_userspace_func() 24 struct userspace_data *data = df->governor_data; in devfreq_userspace_func() 26 if (data->valid) in devfreq_userspace_func() 27 *freq = data->user_frequency; in devfreq_userspace_func() 29 *freq = df->previous_freq; /* No user freq specified yet */ in devfreq_userspace_func() 37 struct devfreq *devfreq = to_devfreq(dev); in set_freq_store() local 42 mutex_lock(&devfreq->lock); in set_freq_store() [all …]
|
H A D | Kconfig | 1 # SPDX-License-Identifier: GPL-2.0-only 7 devfreq, a generic DVFS framework can be registered for a device 8 in order to let the governor provided to devfreq choose an 11 Each device may have its own governor and policy. Devfreq can 13 notification to "nb", a notifier block, of devfreq. 17 determined by the single device's state, an instance of devfreq 20 to a device by 1-to-1. The device registering devfreq takes the 23 given to devfreq. 25 When OPP is used with the devfreq device, it is recommended to 26 register devfreq's nb to the OPP's notifier head. If OPP is [all …]
|
H A D | governor_powersave.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * linux/drivers/devfreq/governor_powersave.c 9 #include <linux/devfreq.h> 13 static int devfreq_powersave_func(struct devfreq *df, in devfreq_powersave_func() 18 * said in devfreq.h in devfreq_powersave_func() 24 static int devfreq_powersave_handler(struct devfreq *devfreq, in devfreq_powersave_handler() argument 25 unsigned int event, void *data) in devfreq_powersave_handler() argument 29 if (event == DEVFREQ_GOV_START) { in devfreq_powersave_handler() 30 mutex_lock(&devfreq->lock); in devfreq_powersave_handler() 31 ret = update_devfreq(devfreq); in devfreq_powersave_handler() [all …]
|
H A D | governor_performance.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * linux/drivers/devfreq/governor_performance.c 9 #include <linux/devfreq.h> 13 static int devfreq_performance_func(struct devfreq *df, in devfreq_performance_func() 18 * said in devfreq.h in devfreq_performance_func() 24 static int devfreq_performance_handler(struct devfreq *devfreq, in devfreq_performance_handler() argument 25 unsigned int event, void *data) in devfreq_performance_handler() argument 29 if (event == DEVFREQ_GOV_START) { in devfreq_performance_handler() 30 mutex_lock(&devfreq->lock); in devfreq_performance_handler() 31 ret = update_devfreq(devfreq); in devfreq_performance_handler() [all …]
|
H A D | Makefile | 1 # SPDX-License-Identifier: GPL-2.0 2 obj-$(CONFIG_PM_DEVFREQ) += devfreq.o 3 obj-$(CONFIG_PM_DEVFREQ_EVENT) += devfreq-event.o 4 obj-$(CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND) += governor_simpleondemand.o 5 obj-$(CONFIG_DEVFREQ_GOV_PERFORMANCE) += governor_performance.o 6 obj-$(CONFIG_DEVFREQ_GOV_POWERSAVE) += governor_powersave.o 7 obj-$(CONFIG_DEVFREQ_GOV_USERSPACE) += governor_userspace.o 8 obj-$(CONFIG_DEVFREQ_GOV_PASSIVE) += governor_passive.o 10 # DEVFREQ Drivers 11 obj-$(CONFIG_ARM_EXYNOS_BUS_DEVFREQ) += exynos-bus.o [all …]
|
H A D | governor_simpleondemand.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * linux/drivers/devfreq/governor_simpleondemand.c 11 #include <linux/devfreq.h> 15 /* Default constants for DevFreq-Simple-Ondemand (DFSO) */ 18 static int devfreq_simple_ondemand_func(struct devfreq *df, in devfreq_simple_ondemand_func() 26 struct devfreq_simple_ondemand_data *data = df->data; in devfreq_simple_ondemand_func() 32 stat = &df->last_status; in devfreq_simple_ondemand_func() 35 if (data->upthreshold) in devfreq_simple_ondemand_func() 36 dfso_upthreshold = data->upthreshold; in devfreq_simple_ondemand_func() 37 if (data->downdifferential) in devfreq_simple_ondemand_func() [all …]
|
H A D | governor.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 3 * governor.h - internal header for devfreq governors. 8 * This header is for devfreq governors in drivers/devfreq/ 14 #include <linux/devfreq.h> 18 #define to_devfreq(DEV) container_of((DEV), struct devfreq, dev) 20 /* Devfreq events */ 32 * - DEVFREQ_GOV_FLAG_IMMUTABLE 34 * - DEVFREQ_GOV_FLAG_IRQ_DRIVEN 35 * : The devfreq won't schedule the work for this governor. 42 * - DEVFREQ_GOV_ATTR_POLLING_INTERVAL [all …]
|
H A D | rk3399_dmc.c | 1 // SPDX-License-Identifier: GPL-2.0-only 4 * Author: Lin Huang <hl@rock-chips.com> 7 #include <linux/arm-smccc.h> 11 #include <linux/devfreq.h> 12 #include <linux/devfreq-event.h> 42 struct devfreq *devfreq; member 75 unsigned long old_clk_rate = dmcfreq->rate; in rk3399_dmcfreq_target() 93 if (dmcfreq->rate == target_rate) in rk3399_dmcfreq_target() 96 mutex_lock(&dmcfreq->lock); in rk3399_dmcfreq_target() 99 * Ensure power-domain transitions don't interfere with ARM Trusted in rk3399_dmcfreq_target() [all …]
|
H A D | devfreq.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * devfreq: Generic Dynamic Voltage and Frequency Scaling (DVFS) Framework 4 * for Non-CPU Devices. 22 #include <linux/devfreq.h> 34 #include <trace/events/devfreq.h> 43 * devfreq core provides delayed work based load monitoring helper 49 /* The list of all device-devfreq governors */ 51 /* The list of all device-devfreq */ 61 * find_device_devfreq() - find devfreq struct using device pointer 62 * @dev: device pointer used to lookup device devfreq. [all …]
|
H A D | tegra30-devfreq.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * A devfreq driver for NVIDIA Tegra SoCs 11 #include <linux/devfreq.h> 76 * struct tegra_devfreq_device_config - configuration specific to an ACTMON 152 * struct tegra_devfreq_device - state specific to an ACTMON device 160 /* Average event count sampled in the last interrupt */ 180 struct devfreq *devfreq; member 220 return readl_relaxed(tegra->regs + offset); in actmon_readl() 225 writel_relaxed(val, tegra->regs + offset); in actmon_writel() 230 return readl_relaxed(dev->regs + offset); in device_readl() [all …]
|
H A D | mtk-cci-devfreq.c | 1 // SPDX-License-Identifier: GPL-2.0-only 7 #include <linux/devfreq.h> 25 struct devfreq *devfreq; member 41 const struct mtk_ccifreq_platform_data *soc_data = drv->soc_data; in mtk_ccifreq_set_voltage() 42 struct device *dev = drv->dev; in mtk_ccifreq_set_voltage() 44 int retry_max = drv->vtrack_max; in mtk_ccifreq_set_voltage() 46 if (!drv->sram_reg) { in mtk_ccifreq_set_voltage() 47 ret = regulator_set_voltage(drv->proc_reg, new_voltage, in mtk_ccifreq_set_voltage() 48 drv->soc_data->proc_max_volt); in mtk_ccifreq_set_voltage() 52 pre_voltage = regulator_get_voltage(drv->proc_reg); in mtk_ccifreq_set_voltage() [all …]
|
/linux/include/linux/ |
H A D | devfreq-event.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 3 * devfreq-event: a framework to provide raw data and events of devfreq devices 15 * struct devfreq_event_dev - the devfreq-event device 17 * @node : Contain the devfreq-event device that have been registered. 18 * @dev : the device registered by devfreq-event class. dev.parent is 19 * the device using devfreq-event. 20 * @lock : a mutex to protect accessing devfreq-event. 22 * @desc : the description for devfreq-event device. 24 * This structure contains devfreq-event device information. 37 * struct devfreq_event_data - the devfreq-event data [all …]
|
/linux/Documentation/ABI/testing/ |
H A D | sysfs-class-devfreq-event | 1 What: /sys/class/devfreq-event/event<x>/ 5 Provide a place in sysfs for the devfreq-event objects. 6 This allows accessing various devfreq-event specific variables. 7 The name of devfreq-event object denoted as 'event<x>' which 8 includes the unique number of 'x' for each devfreq-event object. 10 What: /sys/class/devfreq-event/event<x>/name 14 The /sys/class/devfreq-event/event<x>/name attribute contains 15 the name of the devfreq-event object. This attribute is 16 read-only. 18 What: /sys/class/devfreq-event/event<x>/enable_count [all …]
|
/linux/drivers/devfreq/event/ |
H A D | Kconfig | 1 # SPDX-License-Identifier: GPL-2.0-only 3 bool "DEVFREQ-Event device Support" 5 The devfreq-event device provide the raw data and events which 6 indicate the current state of devfreq-event device. The provided 7 data from devfreq-event device is used to monitor the state of 11 The devfreq-event device can support the various type of events 13 may be used by devfreq governor and other subsystem. 18 tristate "Exynos NoC (Network On Chip) Probe DEVFREQ event Driver" 23 This add the devfreq-event driver for Exynos SoC. It provides NoC 27 tristate "Exynos PPMU (Platform Performance Monitoring Unit) DEVFREQ event Driver" [all …]
|
H A D | exynos-nocp.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * exynos-nocp.c - Exynos NoC (Network On Chip) Probe support 11 #include <linux/devfreq-event.h> 17 #include "exynos-nocp.h" 30 * The devfreq-event ops structure for nocp probe. 38 ret = regmap_update_bits(nocp->regmap, NOCP_MAIN_CTL, in exynos_nocp_set_event() 41 dev_err(nocp->dev, "failed to disable the NoC probe device\n"); in exynos_nocp_set_event() 46 ret = regmap_write(nocp->regmap, NOCP_STAT_PERIOD, 0x0); in exynos_nocp_set_event() 51 ret = regmap_update_bits(nocp->regmap, NOCP_COUNTERS_0_SRC, in exynos_nocp_set_event() 57 ret = regmap_update_bits(nocp->regmap, NOCP_COUNTERS_1_SRC, in exynos_nocp_set_event() [all …]
|
H A D | exynos-ppmu.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * exynos_ppmu.c - Exynos PPMU (Platform Performance Monitoring Unit) support 5 * Copyright (c) 2014-2015 Samsung Electronics Co., Ltd. 8 * This driver is based on drivers/devfreq/exynos/exynos_ppmu.c 20 #include <linux/devfreq-event.h> 22 #include "exynos-ppmu.h" 46 { "ppmu-event0-"#name, PPMU_PMNCNT0 }, \ 47 { "ppmu-event1-"#name, PPMU_PMNCNT1 }, \ 48 { "ppmu-event2-"#name, PPMU_PMNCNT2 }, \ 49 { "ppmu-event3-"#name, PPMU_PMNCNT3 } [all …]
|
/linux/Documentation/driver-api/ |
H A D | devfreq.rst | 1 .. SPDX-License-Identifier: GPL-2.0 8 ------------ 20 --- 23 :c:func:`devfreq_add_device` function to create a :c:type:`devfreq` instance. 25 .. kernel-doc:: include/linux/devfreq.h 26 .. kernel-doc:: include/linux/devfreq-event.h 27 .. kernel-doc:: drivers/devfreq/devfreq.c 29 .. kernel-doc:: drivers/devfreq/devfreq-event.c
|
/linux/Documentation/devicetree/bindings/devfreq/event/ |
H A D | samsung,exynos-ppmu.yaml | 1 # SPDX-License-Identifier: GPL-2.0 3 --- 4 $id: http://devicetree.org/schemas/devfreq/event/samsung,exynos-ppmu.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Chanwoo Choi <cw00.choi@samsung.com> 11 - Krzysztof Kozlowski <krzk@kernel.org> 19 Exynos PPMU driver uses the devfreq-event class to provide event data to 20 various devfreq devices. The devfreq devices would use the event data when 26 - samsung,exynos-ppmu 27 - samsung,exynos-ppmu-v2 [all …]
|
/linux/drivers/memory/samsung/ |
H A D | exynos5422-dmc.c | 1 // SPDX-License-Identifier: GPL-2.0 9 #include <linux/devfreq.h> 10 #include <linux/devfreq-event.h> 88 * Performance event types which are used for setting the preferred event 92 * the type of the event (register DREX_PEREV2CONFIG). 101 * struct dmc_opp_table - Operating level desciption 113 * struct exynos5_dmc - main structure describing DMC device 115 * @df: devfreq device structure returned by devfreq framework 116 * @gov_data: configuration of devfreq governor 142 * @counter: devfreq events [all …]
|
/linux/Documentation/devicetree/bindings/interconnect/ |
H A D | samsung,exynos-bus.yaml | 1 # SPDX-License-Identifier: GPL-2.0 3 --- 4 $id: http://devicetree.org/schemas/interconnect/samsung,exynos-bus.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Chanwoo Choi <cw00.choi@samsung.com> 11 - Krzysztof Kozlowski <krzk@kernel.org> 15 sub-blocks in SoC. Most Exynos SoCs share the common architecture for buses. 20 sub-blocks. 22 The Exynos SoC includes the various sub-blocks which have the each AXI bus. 24 line. The power line might be shared among one more sub-blocks. So, we can [all …]
|
/linux/Documentation/devicetree/bindings/memory-controllers/ |
H A D | samsung,exynos5422-dmc.yaml | 1 # SPDX-License-Identifier: GPL-2.0 3 --- 4 $id: http://devicetree.org/schemas/memory-controllers/samsung,exynos5422-dmc.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 12 - Krzysztof Kozlowski <krzk@kernel.org> 13 - Lukasz Luba <lukasz.luba@arm.com> 27 - const: samsung,exynos5422-dmc 29 clock-names: 31 - const: fout_spll 32 - const: mout_sclk_spll [all …]
|
/linux/include/ufs/ |
H A D | ufshcd.h | 1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 4 * Copyright (C) 2011-2013 Samsung India Software Operations 5 * Copyright (c) 2013-2016, The Linux Foundation. All rights reserved. 16 #include <linux/blk-crypto-profile.h> 17 #include <linux/blk-mq.h> 18 #include <linux/devfreq.h> 19 #include <linux/fault-inject.h> 23 #include <linux/dma-direction.h> 68 * struct uic_command - UIC command structure 92 /* Host <-> Device UniPro Link state */ [all …]
|