diff options
| author | Sahitya Tummala <stummala@codeaurora.org> | 2013-12-17 11:46:13 +0530 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-22 10:56:25 -0700 |
| commit | 7686ac5a4abde2b5abae661299805b39cc578615 (patch) | |
| tree | 0b0819f7b31c50d1e3870156293279c5399470bf /include/trace | |
| parent | b55d16cd6bf0fdbd68607a5797c70fcbbb68f219 (diff) | |
scsi: ufs: Add support for clock gating
The UFS controller clocks can be gated after certain period of
inactivity, which is typically less than runtime suspend timeout.
In addition to clocks the link will also be put into Hibern8 mode
to save more power.
The clock gating can be turned on by enabling the capability
UFSHCD_CAP_CLK_GATING. To enable entering into Hibern8 mode as part of
clock gating, set the capability UFSHCD_CAP_HIBERN8_WITH_CLK_GATING.
The tracing events for clock gating can be enabled through debugfs as:
echo 1 > /sys/kernel/debug/tracing/events/ufs/ufshcd_clk_gating/enable
cat /sys/kernel/debug/tracing/trace_pipe
Change-Id: I3e5e7e78130941ad7109fc05a46d7c3720245a1a
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
[gbroner@codeaurora.org: fix merge conflicts]
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
[subhashj@codeaurora.org: resolved merge conflicts, dropped most of the
changes as they are already present on baseline]
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Diffstat (limited to 'include/trace')
| -rw-r--r-- | include/trace/events/ufs.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/trace/events/ufs.h b/include/trace/events/ufs.h index b7b841d5767d..3042ba7680f3 100644 --- a/include/trace/events/ufs.h +++ b/include/trace/events/ufs.h @@ -19,6 +19,26 @@ #include <linux/tracepoint.h> +TRACE_EVENT(ufshcd_clk_gating, + + TP_PROTO(const char *dev_name, const char *state), + + TP_ARGS(dev_name, state), + + TP_STRUCT__entry( + __string(dev_name, dev_name) + __string(state, state) + ), + + TP_fast_assign( + __assign_str(dev_name, dev_name); + __assign_str(state, state); + ), + + TP_printk("%s: gating state changed to %s", + __get_str(dev_name), __get_str(state)) +); + DECLARE_EVENT_CLASS(ufshcd_template, TP_PROTO(const char *dev_name, int err, s64 usecs), |
