1
0
Fork 0
alistair23-linux/drivers/base
Viresh Kumar 42f6284ae6 PM / Domains: Add support to select performance-state of domains
Some platforms have the capability to configure the performance state of
PM domains. This patch enhances the genpd core to support such
platforms.

The performance levels (within the genpd core) are identified by
positive integer values, a lower value represents lower performance
state.

This patch adds a new genpd API, which is called by user drivers (like
OPP framework):

- int dev_pm_genpd_set_performance_state(struct device *dev,
					 unsigned int state);

  This updates the performance state constraint of the device on its PM
  domain. On success, the genpd will have its performance state set to a
  value which is >= "state" passed to this routine. The genpd core calls
  the genpd->set_performance_state() callback, if implemented,
  else -ENODEV is returned to the caller.

The PM domain drivers need to implement the following callback if they
want to support performance states.

- int (*set_performance_state)(struct generic_pm_domain *genpd,
			       unsigned int state);

  This is called internally by the genpd core on several occasions. The
  genpd core passes the genpd pointer and the aggregate of the
  performance states of the devices supported by that genpd to this
  callback. This callback must update the performance state of the genpd
  (in a platform dependent way).

The power domains can avoid supplying above callback, if they don't
support setting performance-states.

Currently we aren't propagating performance state changes of a subdomain
to its masters as we don't have hardware that needs it right now. Over
that, the performance states of subdomain and its masters may not have
one-to-one mapping and would require additional information. We can get
back to this once we have hardware that needs it.

Tested-by: Rajendra Nayak <rnayak@codeaurora.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2017-10-14 00:46:04 +02:00
..
power PM / Domains: Add support to select performance-state of domains 2017-10-14 00:46:04 +02:00
regmap regmap: regmap-w1: Fix build troubles 2017-07-17 15:53:00 +01:00
test driver core: test_async: fix up typo found by 0-day 2016-11-29 22:06:42 +01:00
Kconfig firmware: Restore support for built-in firmware 2017-09-16 10:58:48 -07:00
Makefile arm, arm64: factorize common cpu capacity default code 2017-06-03 19:10:09 +09:00
arch_topology.c base: arch_topology: fix section mismatch build warnings 2017-09-18 17:05:07 +02:00
attribute_container.c attribute_container: Fix typo 2016-08-31 15:13:56 +02:00
base.h driver core: make device_{add|remove}_groups() public 2017-07-22 11:59:23 +02:00
bus.c driver core: bus: Fix a potential double free 2017-08-31 18:57:30 +02:00
cacheinfo.c Merge branch 'x86-cache-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-12-22 09:25:45 -08:00
class.c driver core: remove class_attrs from struct class 2017-06-09 10:41:00 +02:00
component.c Merge 4.5-rc4 into driver-core-next 2016-02-14 14:29:55 -08:00
container.c ACPI / hotplug / driver core: Handle containers in a special way 2013-12-29 15:25:48 +01:00
core.c Do not disable driver and bus shutdown hook when class shutdown hook is set. 2017-08-28 18:02:46 +02:00
cpu.c treewide: make "nr_cpu_ids" unsigned 2017-09-08 18:26:48 -07:00
dd.c initcall_debug: add deferred probe times 2017-08-03 17:48:49 -07:00
devcoredump.c driver core: devcoredump: convert to use class_groups 2016-11-29 21:12:12 +01:00
devres.c devres: add devm_alloc_percpu() 2016-11-15 22:34:25 -05:00
devtmpfs.c statx: Add a system call to make enhanced file info available 2017-03-02 20:51:15 -05:00
dma-coherent.c dma-coherent: fix rmem_dma_device_init regression 2017-09-17 08:20:02 -07:00
dma-contiguous.c cma: Store a name in the cma structure 2017-04-18 20:41:12 +02:00
dma-mapping.c dma-coherent: remove the DMA_MEMORY_MAP and DMA_MEMORY_IO flags 2017-09-01 11:59:17 +02:00
driver.c driver core: add missing blank line after declaration 2015-03-25 14:36:30 +01:00
firmware.c
firmware_class.c Revert "firmware: add sanity check on shutdown/suspend" 2017-09-10 21:19:06 -07:00
hypervisor.c drivers/base: Add export.h for EXPORT_SYMBOL/THIS_MODULE as required. 2011-10-31 19:31:38 -04:00
init.c drivers: of/base: move of_init to driver_init 2015-05-26 19:55:56 -07:00
isa.c isa: Call isa_bus_init before dependent ISA bus drivers register 2016-06-17 20:47:11 -07:00
map.c drivers: base: map: Use kmalloc_array instead of kmalloc 2015-03-25 14:35:08 +01:00
memory.c mm, memory_hotplug: remove zone restrictions 2017-09-06 17:27:25 -07:00
module.c base: make module_create_drivers_dir race-free 2016-06-15 19:21:31 -07:00
node.c mm: change the call sites of numa statistics items 2017-09-08 18:26:47 -07:00
pinctrl.c driver core: fix automatic pinctrl management 2017-06-13 11:07:32 +02:00
platform-msi.c irqchip/MSI: Use irq_domain_update_bus_token instead of an open coded access 2017-06-22 18:29:17 +02:00
platform.c driver core: platform: Don't read past the end of "driver_override" buffer 2017-09-18 17:16:47 +02:00
property.c device property: Introduce fwnode_property_get_reference_args 2017-07-22 00:04:51 +02:00
soc.c base: soc: Allow early registration of a single SoC device 2017-03-29 21:43:26 +02:00
syscore.c genirq: Simplify wakeup mechanism 2014-09-01 13:48:59 +02:00
topology.c base: topology: constify attribute_group structures. 2017-08-28 17:49:22 +02:00
transport_class.c drivers/base: transport_class explicitly requires EXPORT_SYMBOL 2011-10-31 19:31:15 -04:00