Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1186140

[PATCH v2 2/2] tracing: gpio: add Kconfig option for enabling/disabling trace events

From Tal Shorer <tal.shorer@gmail.com>
Newsgroups linux.kernel
Subject [PATCH v2 2/2] tracing: gpio: add Kconfig option for enabling/disabling trace events
Date 2015-07-16 19:50 +0200
Message-ID <pMVse-5iT-15@gated-at.bofh.it> (permalink)
References <pLQNX-iG-1@gated-at.bofh.it> <pMVse-5iT-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Add a new options to gpio Kconfig, CONFIG_GPIO_TRACING, that is used
for enabling/disabling compilation of gpio function trace events.

Signed-off-by: Tal Shorer <tal.shorer@gmail.com>
---
 drivers/gpio/Kconfig        | 7 +++++++
 include/trace/events/gpio.h | 4 ++++
 2 files changed, 11 insertions(+)

diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
index c1e2ca3..2829e8e 100644
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -88,6 +88,13 @@ config GPIO_SYSFS
 config GPIO_GENERIC
 	tristate
 
+config GPIO_TRACING
+	bool "gpio tracing"
+	depends on TRACING
+	help
+	  Enable tracing for gpio subsystem
+
+
 # put drivers in the right section, in alphabetical order
 
 config GPIO_DA9052
diff --git a/include/trace/events/gpio.h b/include/trace/events/gpio.h
index 927a8ad..09af636 100644
--- a/include/trace/events/gpio.h
+++ b/include/trace/events/gpio.h
@@ -1,6 +1,10 @@
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM gpio
 
+#ifndef CONFIG_GPIO_TRACING
+#define NOTRACE
+#endif
+
 #if !defined(_TRACE_GPIO_H) || defined(TRACE_HEADER_MULTI_READ)
 #define _TRACE_GPIO_H
 
-- 
2.4.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 0/2] tracing: allow disabling compilation of specific trace systems Tal Shorer <tal.shorer@gmail.com> - 2015-07-16 19:50 +0200
  [PATCH v2 2/2] tracing: gpio: add Kconfig option for enabling/disabling trace events Tal Shorer <tal.shorer@gmail.com> - 2015-07-16 19:50 +0200
  [PATCH v2 1/2] tracing: allow disabling compilation of specific trace systems Tal Shorer <tal.shorer@gmail.com> - 2015-07-16 19:50 +0200

csiph-web