OSDN Git Service

ANDROID: Implement memory_state_time, used by qcom,cpubw
authorJames Carr <carrja@google.com>
Sat, 30 Jul 2016 02:02:16 +0000 (19:02 -0700)
committerDmitry Shmidt <dimitrysh@google.com>
Tue, 31 Jan 2017 18:45:55 +0000 (10:45 -0800)
commitad3c02f8b3a52704295eec932e1ee10a5b427991
treef6295441d80d1b577549d37f6b2c0d32df1d2bd7
parentc5b8dcdea84b79829ca51e1071777caa4ec04f05
ANDROID: Implement memory_state_time, used by qcom,cpubw

New driver memory_state_time tracks time spent in different DDR
frequency and bandwidth states.

Memory drivers such as qcom,cpubw can post updated state to the driver
after registering a callback. Processed by a workqueue

Bandwidth buckets are read in from device tree in the relevant qualcomm
section, can be defined in any quantity and spacing.

The data is exposed at /sys/kernel/memory_state_time, able to be read by
the Android framework.

Functionality is behind a config option CONFIG_MEMORY_STATE_TIME

Change-Id: I4fee165571cb975fb9eacbc9aada5e6d7dd748f0
Signed-off-by: James Carr <carrja@google.com>
Documentation/devicetree/bindings/misc/memory-state-time.txt [new file with mode: 0644]
drivers/misc/Kconfig
drivers/misc/Makefile
drivers/misc/memory_state_time.c [new file with mode: 0644]
include/linux/memory-state-time.h [new file with mode: 0644]