aboutsummaryrefslogtreecommitdiff
path: root/drivers/gator/gator_events_mmapped.c
diff options
context:
space:
mode:
authorJon Medhurst <tixy@linaro.org>2014-08-04 15:52:55 +0100
committerJon Medhurst <tixy@linaro.org>2014-08-04 15:52:55 +0100
commited30f24e8d07d30aa3e69d1f508f4d7bd2e8ea14 (patch)
tree02ad2c99f5c728cfd9ac8ed132d987a355ddd5c2 /drivers/gator/gator_events_mmapped.c
parent14899ae67197e6e84cecf018f39d1be1a2d75b92 (diff)
parent3e8c107b31cfdc780b280180443c83e3e21727d5 (diff)
downloadlinux-linaro-stable-ed30f24e8d07d30aa3e69d1f508f4d7bd2e8ea14.tar.gz
Merge branch 'lsk-3.10-gator-5.19' into lsk-3.10-gator
Diffstat (limited to 'drivers/gator/gator_events_mmapped.c')
-rw-r--r--drivers/gator/gator_events_mmapped.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/gator/gator_events_mmapped.c b/drivers/gator/gator_events_mmapped.c
index 3b248ec24e6e..5bc01c42c3a2 100644
--- a/drivers/gator/gator_events_mmapped.c
+++ b/drivers/gator/gator_events_mmapped.c
@@ -8,21 +8,25 @@
* published by the Free Software Foundation.
*
* Similar entries to those below must be present in the events.xml file.
- * To add them to the events.xml, create an events-mmap.xml with the
+ * To add them to the events.xml, create an events-mmap.xml with the
* following contents and rebuild gatord:
*
- * <counter_set name="mmapped_cnt" count="3"/>
- * <category name="mmapped" counter_set="mmapped_cnt" per_cpu="no">
- * <event event="0x0" title="Simulated1" name="Sine" display="maximum" average_selection="yes" description="Sort-of-sine"/>
- * <event event="0x1" title="Simulated2" name="Triangle" display="maximum" average_selection="yes" description="Triangular wave"/>
- * <event event="0x2" title="Simulated3" name="PWM" display="maximum" average_selection="yes" description="PWM Signal"/>
+ * <category name="mmapped">
+ * <event counter="mmapped_cnt0" title="Simulated1" name="Sine" display="maximum" class="absolute" description="Sort-of-sine"/>
+ * <event counter="mmapped_cnt1" title="Simulated2" name="Triangle" display="maximum" class="absolute" description="Triangular wave"/>
+ * <event counter="mmapped_cnt2" title="Simulated3" name="PWM" display="maximum" class="absolute" description="PWM Signal"/>
* </category>
*
- * When adding custom events, be sure do the following
+ * When adding custom events, be sure to do the following:
* - add any needed .c files to the gator driver Makefile
* - call gator_events_install in the events init function
* - add the init function to GATOR_EVENTS_LIST in gator_main.c
* - add a new events-*.xml file to the gator daemon and rebuild
+ *
+ * Troubleshooting:
+ * - verify the new events are part of events.xml, which is created when building the daemon
+ * - verify the new events exist at /dev/gator/events/ once gatord is launched
+ * - verify the counter name in the XML matches the name at /dev/gator/events
*/
#include <linux/init.h>
@@ -37,7 +41,6 @@ static int mmapped_global_enabled;
static struct {
unsigned long enabled;
- unsigned long event;
unsigned long key;
} mmapped_counters[MMAPPED_COUNTERS_NUM];
@@ -47,7 +50,7 @@ static s64 prev_time;
/* Adds mmapped_cntX directories and enabled, event, and key files to /dev/gator/events */
static int gator_events_mmapped_create_files(struct super_block *sb,
- struct dentry *root)
+ struct dentry *root)
{
int i;
@@ -61,8 +64,6 @@ static int gator_events_mmapped_create_files(struct super_block *sb,
return -1;
gatorfs_create_ulong(sb, dir, "enabled",
&mmapped_counters[i].enabled);
- gatorfs_create_ulong(sb, dir, "event",
- &mmapped_counters[i].event);
gatorfs_create_ro_ulong(sb, dir, "key",
&mmapped_counters[i].key);
}
@@ -177,8 +178,7 @@ static int gator_events_mmapped_read(int **buffer)
if (mmapped_counters[i].enabled) {
mmapped_buffer[len++] = mmapped_counters[i].key;
mmapped_buffer[len++] =
- mmapped_simulate(mmapped_counters[i].event,
- delta_in_us);
+ mmapped_simulate(i, delta_in_us);
}
}