diff options
author | Heikki Krogerus <heikki.krogerus@linux.intel.com> | 2021-03-10 13:46:30 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-03-12 17:32:20 +0300 |
commit | 14b02f023c094767ffc21156fbb40be52ed2b4f2 (patch) | |
tree | 3c93087602bf9c91cf26d9127e301497dc4e2052 /drivers/usb/typec/tipd | |
parent | 2786d8618a92f4108092b5f20044b06fca83f389 (diff) | |
download | linux-14b02f023c094767ffc21156fbb40be52ed2b4f2.tar.xz |
usb: typec: tipd: Separate file for tracepoint creation
Creating the tracepoints only when tracing is enabled.
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20210310104630.77945-4-heikki.krogerus@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/typec/tipd')
-rw-r--r-- | drivers/usb/typec/tipd/Makefile | 4 | ||||
-rw-r--r-- | drivers/usb/typec/tipd/core.c (renamed from drivers/usb/typec/tipd/tps6598x.c) | 6 | ||||
-rw-r--r-- | drivers/usb/typec/tipd/trace.c | 9 | ||||
-rw-r--r-- | drivers/usb/typec/tipd/trace.h (renamed from drivers/usb/typec/tipd/tps6598x_trace.h) | 2 |
4 files changed, 15 insertions, 6 deletions
diff --git a/drivers/usb/typec/tipd/Makefile b/drivers/usb/typec/tipd/Makefile index 4c19eadb5f46..aa439f80a889 100644 --- a/drivers/usb/typec/tipd/Makefile +++ b/drivers/usb/typec/tipd/Makefile @@ -1,4 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 -CFLAGS_tps6598x.o := -I$(src) +CFLAGS_trace.o := -I$(src) obj-$(CONFIG_TYPEC_TPS6598X) += tps6598x.o +tps6598x-y := core.o +tps6598x-$(CONFIG_TRACING) += trace.o diff --git a/drivers/usb/typec/tipd/tps6598x.c b/drivers/usb/typec/tipd/core.c index 2c4ab90e16e7..9e924db42179 100644 --- a/drivers/usb/typec/tipd/tps6598x.c +++ b/drivers/usb/typec/tipd/core.c @@ -6,8 +6,6 @@ * Author: Heikki Krogerus <heikki.krogerus@linux.intel.com> */ -#include "tps6598x.h" - #include <linux/i2c.h> #include <linux/acpi.h> #include <linux/module.h> @@ -17,8 +15,8 @@ #include <linux/usb/typec.h> #include <linux/usb/role.h> -#define CREATE_TRACE_POINTS -#include "tps6598x_trace.h" +#include "tps6598x.h" +#include "trace.h" /* Register offsets */ #define TPS_REG_VID 0x00 diff --git a/drivers/usb/typec/tipd/trace.c b/drivers/usb/typec/tipd/trace.c new file mode 100644 index 000000000000..016e68048dc2 --- /dev/null +++ b/drivers/usb/typec/tipd/trace.c @@ -0,0 +1,9 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * TI TPS6598x USB Power Delivery Controller Trace Support + * + * Copyright (C) 2021, Intel Corporation + * Author: Heikki Krogerus <heikki.krogerus@linux.intel.com> + */ +#define CREATE_TRACE_POINTS +#include "trace.h" diff --git a/drivers/usb/typec/tipd/tps6598x_trace.h b/drivers/usb/typec/tipd/trace.h index 21917751d61e..5d09d6f78930 100644 --- a/drivers/usb/typec/tipd/tps6598x_trace.h +++ b/drivers/usb/typec/tipd/trace.h @@ -277,7 +277,7 @@ TRACE_EVENT(tps6598x_data_status, /* This part must be outside protection */ #undef TRACE_INCLUDE_FILE -#define TRACE_INCLUDE_FILE tps6598x_trace +#define TRACE_INCLUDE_FILE trace #undef TRACE_INCLUDE_PATH #define TRACE_INCLUDE_PATH . #include <trace/define_trace.h> |