regulator: Add basic trace facilities
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 10 Nov 2010 14:38:30 +0000 (14:38 +0000)
committerLiam Girdwood <lrg@slimlogic.co.uk>
Wed, 12 Jan 2011 14:33:00 +0000 (14:33 +0000)
commit02fa3ec01a0df7a8ccc356d8e245a9a1423b3596
treec80875047e60cc495892bd61d51b0cba6e7ee23b
parent3a93f2a9f4d8f73d74c0e552feb68a10f778a219
regulator: Add basic trace facilities

Provide some basic trace facilities to the regulator API. We generate
events on regulator enable, disable and voltage setting over the actual
hardware operations (which are assumed to be the expensive ones which
require interaction with the actual device). This is intended to facilitate
debug of the performance and behaviour with consumers allowing unified
traces to be generated including the regulator operations within the
context of the other components of the system.

For enable we log the explicit delay for the voltage ramp separately to
the interaction with the hardware to highlight the time consumed in I/O.
We should add a similar delay for voltage changes, though there the
relatively small magnitude of the changes in the context of the I/O
costs makes it much less critical for most regulators.

Only hardware interactions are currently traced as the primary focus is
on the performance and synchronisation of actual hardware interactions.
Additional tracepoints for debugging of the logical operations can be
added later if required.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
drivers/regulator/core.c
include/trace/events/regulator.h [new file with mode: 0644]