blob: 7f2da3fe6d1657d4c593eb8d76a22fa8ed42edda [file] [log] [blame]
Pratik Pateld944cc72013-02-08 11:52:12 -08001/* Copyright (c) 2013, The Linux Foundation. All rights reserved.
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 */
12
13#ifndef _LINUX_CORESIGHT_CTI_H
14#define _LINUX_CORESIGHT_CTI_H
15
16struct coresight_cti_data {
17 int nr_ctis;
18 const char **names;
19};
20
21struct coresight_cti {
22 const char *name;
23 struct list_head link;
24};
25
26#ifdef CONFIG_CORESIGHT_CTI
27extern struct coresight_cti *coresight_cti_get(const char *name);
28extern void coresight_cti_put(struct coresight_cti *cti);
29extern int coresight_cti_map_trigin(
30 struct coresight_cti *cti, int trig, int ch);
31extern int coresight_cti_map_trigout(
32 struct coresight_cti *cti, int trig, int ch);
33extern void coresight_cti_unmap_trigin(
34 struct coresight_cti *cti, int trig, int ch);
35extern void coresight_cti_unmap_trigout(
36 struct coresight_cti *cti, int trig, int ch);
37#else
38static inline struct coresight_cti *coresight_cti_get(const char *name)
39{
40 return NULL;
41}
42static inline void coresight_cti_put(struct coresight_cti *cti) {}
43static inline int coresight_cti_map_trigin(
44 struct coresight_cti *cti, int trig, int ch)
45{
46 return -ENOSYS;
47}
48static inline int coresight_cti_map_trigout(
49 struct coresight_cti *cti, int trig, int ch)
50{
51 return -ENOSYS;
52}
53static inline void coresight_cti_unmap_trigin(
54 struct coresight_cti *cti, int trig, int ch) {}
55static inline void coresight_cti_unmap_trigout(
56 struct coresight_cti *cti, int trig, int ch) {}
57#endif
58
59#endif